From: Satoru Takeuchi Date: Fri, 24 Jun 2016 08:24:47 +0000 (+0900) Subject: btrfs-progs: fi show: print error message if no valid Btrfs is specified X-Git-Tag: upstream/4.16.1~1481 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=034643237a9260f12e532bf0459f66234e1f8408;p=platform%2Fupstream%2Fbtrfs-progs.git btrfs-progs: fi show: print error message if no valid Btrfs is specified * Before this patch =============================== # ./btrfs fi show foo # "foo" doesn't mean any valid Btrfs # # no error message # echo $? 1 =============================== * After this patch =============================== # ./btrfs fi show foo ERROR: foo is not a valid Btrfs # # echo $? 1 =============================== Signed-off-by: Satoru Takeuchi Signed-off-by: David Sterba --- diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 88867a3d..9392a30b 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -898,9 +898,10 @@ devs_only: list_for_each_entry(fs_devices, &all_uuids, list) print_one_uuid(fs_devices, unit_mode); - if (search && !found) + if (search && !found) { + error("not a valid btrfs filesystem: %s", search); ret = 1; - + } while (!list_empty(&all_uuids)) { fs_devices = list_entry(all_uuids.next, struct btrfs_fs_devices, list);