summaryrefslogtreecommitdiff
path: root/cmds-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-device.c')
-rw-r--r--cmds-device.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/cmds-device.c b/cmds-device.c
index 5f2b952a..a9354f55 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -385,18 +385,9 @@ static int cmd_device_stats(int argc, char **argv)
dev_path = argv[optind];
- fdmnt = open_path_or_dev_mnt(dev_path, &dirstream);
-
- if (fdmnt < 0) {
- 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));
+ fdmnt = open_path_or_dev_mnt(dev_path, &dirstream, 1);
+ if (fdmnt < 0)
return 1;
- }
ret = get_fs_info(dev_path, &fi_args, &di_args);
if (ret) {