summaryrefslogtreecommitdiff
path: root/cmds-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-device.c')
-rw-r--r--cmds-device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds-device.c b/cmds-device.c
index 2a05f70a..d3102ba7 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -442,8 +442,8 @@ static int cmd_device_stats(int argc, char **argv)
ret = get_fs_info(dev_path, &fi_args, &di_args);
if (ret) {
- error("getting device info for %s failed: %s", dev_path,
- strerror(-ret));
+ errno = -ret;
+ error("getting device info for %s failed: %m", dev_path);
err = 1;
goto out;
}