summaryrefslogtreecommitdiff
path: root/cmds-filesystem.c
diff options
context:
space:
mode:
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>2016-06-24 17:24:47 +0900
committerDavid Sterba <dsterba@suse.com>2016-06-24 14:05:43 +0200
commit034643237a9260f12e532bf0459f66234e1f8408 (patch)
tree76d334cc6a18e12a372fafcaca98bb95e43c50c3 /cmds-filesystem.c
parentcd9b35c37ae03d8ea7cc35c4ffe501925e75e629 (diff)
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 <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-filesystem.c')
-rw-r--r--cmds-filesystem.c5
1 files changed, 3 insertions, 2 deletions
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);