summaryrefslogtreecommitdiff
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-01-13 18:14:32 +0100
committerDavid Sterba <dsterba@suse.com>2016-01-14 11:07:10 +0100
commitdddc3e08cbf87c1ab06f4fa55a108e538db42f8b (patch)
treed1519e359cd43b3dc1a12bbe411be796eb70af8a /cmds-subvolume.c
parent7afde59e38e78fa7c99d0b0d36718645c6a77c91 (diff)
btrfs-progs: more verbose errors from test_issubvolume
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r--cmds-subvolume.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 9866c775..d5ec8862 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -325,7 +325,7 @@ again:
res = test_issubvolume(path);
if (res < 0) {
- error("cannot access subvolume %s", path);
+ error("cannot access subvolume %s: %s", path, strerror(-res));
ret = 1;
goto out;
}
@@ -680,7 +680,7 @@ static int cmd_subvol_snapshot(int argc, char **argv)
retval = 1; /* failure */
res = test_issubvolume(subvol);
if (res < 0) {
- error("cannot access subvolume %s", subvol);
+ error("cannot access subvolume %s: %s", subvol, strerror(-res));
goto out;
}
if (!res) {
@@ -886,7 +886,7 @@ static int cmd_subvol_find_new(int argc, char **argv)
ret = test_issubvolume(subvol);
if (ret < 0) {
- error("cannot access subvolume %s", subvol);
+ error("cannot access subvolume %s: %s", subvol, strerror(-ret));
return 1;
}
if (!ret) {
@@ -957,7 +957,8 @@ static int cmd_subvol_show(int argc, char **argv)
ret = test_issubvolume(fullpath);
if (ret < 0) {
- error("cannot access subvolume %s", fullpath);
+ error("cannot access subvolume %s: %s", fullpath,
+ strerror(-ret));
goto out;
}
if (!ret) {