summaryrefslogtreecommitdiff
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r--cmds-subvolume.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 5e821c71..9ab5287b 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -933,6 +933,13 @@ static int cmd_subvol_show(int argc, char **argv)
"%s\n", fullpath, strerror(-ret));
goto out;
}
+ if (ret > 0) {
+ fprintf(stderr,
+ "ERROR: %s doesn't belong to btrfs mount point\n",
+ fullpath);
+ ret = -EINVAL;
+ goto out;
+ }
ret = 1;
svpath = get_subvol_name(mnt, fullpath);