summaryrefslogtreecommitdiff
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r--cmds-subvolume.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index af04a6b8..1432b997 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -149,8 +149,8 @@ static int cmd_subvol_create(int argc, char **argv)
struct btrfs_ioctl_vol_args args;
memset(&args, 0, sizeof(args));
- strncpy(args.name, newname, BTRFS_SUBVOL_NAME_MAX);
- args.name[BTRFS_SUBVOL_NAME_MAX-1] = 0;
+ strncpy(args.name, newname, BTRFS_PATH_NAME_MAX);
+ args.name[BTRFS_PATH_NAME_MAX-1] = 0;
res = ioctl(fddst, BTRFS_IOC_SUBVOL_CREATE, &args);
}