From 2e151027d245a762326dac8e814db9fc59113454 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Fri, 12 Jun 2015 13:18:44 +0200 Subject: btrfs-progs: use PATH_MAX instead of BTRFS_PATH_NAME_MAX The path bufferes should be PATH_MAX but BTRFS_PATH_NAME_MAX is shorter due to embedding in 4k aligned structures. The only reason to use BTRFS_PATH_NAME_MAX is for the respective structures btrfs_ioctl_vol_args::name. Signed-off-by: David Sterba --- cmds-inspect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmds-inspect.c') diff --git a/cmds-inspect.c b/cmds-inspect.c index bdb7f637..053cf8ea 100644 --- a/cmds-inspect.c +++ b/cmds-inspect.c @@ -270,7 +270,7 @@ static int cmd_subvolid_resolve(int argc, char **argv) int ret; int fd = -1; u64 subvol_id; - char path[BTRFS_PATH_NAME_MAX + 1]; + char path[PATH_MAX]; DIR *dirstream = NULL; if (check_argc_exact(argc, 3)) @@ -293,7 +293,7 @@ static int cmd_subvolid_resolve(int argc, char **argv) goto out; } - path[BTRFS_PATH_NAME_MAX] = '\0'; + path[PATH_MAX] = '\0'; printf("%s\n", path); out: -- cgit v1.2.3