summaryrefslogtreecommitdiff
path: root/cmds-device.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-12-08 18:37:10 +0100
committerDavid Sterba <dsterba@suse.com>2016-12-14 15:06:35 +0100
commit76be45599a9ecffb0c33f965c44a561ffef50edf (patch)
tree998b4a738b8d62a70f936bd4a997757f2866010c /cmds-device.c
parent9fa02c427d0b12cfe6fe0de29f934f62eefaf228 (diff)
btrfs-progs: dev stats: use char type path
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-device.c')
-rw-r--r--cmds-device.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmds-device.c b/cmds-device.c
index 0b25207e..a40b6166 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -432,11 +432,11 @@ static int cmd_device_stats(int argc, char **argv)
for (i = 0; i < fi_args.num_devices; i++) {
struct btrfs_ioctl_get_dev_stats args = {0};
- __u8 path[BTRFS_DEVICE_PATH_NAME_MAX + 1];
+ char path[BTRFS_DEVICE_PATH_NAME_MAX + 1];
- strncpy((char *)path, (char *)di_args[i].path,
+ strncpy(path, (char *)di_args[i].path,
BTRFS_DEVICE_PATH_NAME_MAX);
- path[BTRFS_DEVICE_PATH_NAME_MAX] = '\0';
+ path[BTRFS_DEVICE_PATH_NAME_MAX] = 0;
args.devid = di_args[i].devid;
args.nr_items = BTRFS_DEV_STAT_VALUES_MAX;
@@ -449,7 +449,7 @@ static int cmd_device_stats(int argc, char **argv)
} else {
char *canonical_path;
- canonical_path = canonicalize_path((char *)path);
+ canonical_path = canonicalize_path(path);
/* No path when device is missing. */
if (!canonical_path) {