* [PATCH] btrfs-progs: fi show: print error message if no valid Btrfs is specified
@ 2016-06-24 8:24 Satoru Takeuchi
2016-06-24 12:01 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Satoru Takeuchi @ 2016-06-24 8:24 UTC (permalink / raw)
To: linux-btrfs
* 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>
---
cmds-filesystem.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 88867a3..90f3c49 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("%s is not a valid Btrfs", search);
ret = 1;
-
+ }
while (!list_empty(&all_uuids)) {
fs_devices = list_entry(all_uuids.next,
struct btrfs_fs_devices, list);
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs-progs: fi show: print error message if no valid Btrfs is specified
2016-06-24 8:24 [PATCH] btrfs-progs: fi show: print error message if no valid Btrfs is specified Satoru Takeuchi
@ 2016-06-24 12:01 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2016-06-24 12:01 UTC (permalink / raw)
To: Satoru Takeuchi; +Cc: linux-btrfs
On Fri, Jun 24, 2016 at 05:24:47PM +0900, Satoru Takeuchi wrote:
> * 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-24 12:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-24 8:24 [PATCH] btrfs-progs: fi show: print error message if no valid Btrfs is specified Satoru Takeuchi
2016-06-24 12:01 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.