projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f166a3
)
Btrfs-progs: output the error reason when qgroup_show fails
author
Wang Shilong
<wangsl-fnst@cn.fujitsu.com>
Wed, 27 Feb 2013 11:04:18 +0000
(19:04 +0800)
committer
David Sterba
<dsterba@suse.cz>
Wed, 27 Feb 2013 15:13:20 +0000
(16:13 +0100)
The original code forgot to output the reason why the commands failed,
fix it.
Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
cmds-qgroup.c
patch
|
blob
|
history
diff --git
a/cmds-qgroup.c
b/cmds-qgroup.c
index
79888c8
..
275f00f
100644
(file)
--- a/
cmds-qgroup.c
+++ b/
cmds-qgroup.c
@@
-298,6
+298,7
@@
static int cmd_qgroup_show(int argc, char **argv)
{
int ret = 0;
int fd;
+ int e;
char *path = argv[1];
if (check_argc_exact(argc, 2))
@@
-310,9
+311,11
@@
static int cmd_qgroup_show(int argc, char **argv)
}
ret = list_qgroups(fd);
+ e = errno;
close(fd);
if (ret < 0) {
- fprintf(stderr, "ERROR: can't list qgroups\n");
+ fprintf(stderr, "ERROR: can't list qgroups: %s\n",
+ strerror(e));
return 30;
}