summaryrefslogtreecommitdiff
path: root/cmds-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-device.c')
-rw-r--r--cmds-device.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmds-device.c b/cmds-device.c
index c8586a06..29da661e 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -352,7 +352,13 @@ static int cmd_dev_stats(int argc, char **argv)
fdmnt = open_path_or_dev_mnt(dev_path, &dirstream);
if (fdmnt < 0) {
- fprintf(stderr, "ERROR: can't access '%s'\n", dev_path);
+ if (errno == EINVAL)
+ fprintf(stderr,
+ "ERROR: '%s' is not a mounted btrfs device\n",
+ dev_path);
+ else
+ fprintf(stderr, "ERROR: can't access '%s': %s\n",
+ dev_path, strerror(errno));
return 1;
}