Small modification

Only calculate FS started with /dev
Use && to detect whether a command executes correctly