summaryrefslogtreecommitdiff
path: root/cmds-inspect.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-06-12 13:18:44 +0200
committerDavid Sterba <dsterba@suse.cz>2015-06-12 16:44:47 +0200
commit2e151027d245a762326dac8e814db9fc59113454 (patch)
treea0292aca05d9a016513dd4876dc275c6874b025e /cmds-inspect.c
parentc55415e4cb246265b1cfc1507b3ec1bdba0e3bb3 (diff)
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 <dsterba@suse.cz>
Diffstat (limited to 'cmds-inspect.c')
-rw-r--r--cmds-inspect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds-inspect.c b/cmds-inspect.c
index bdb7f63..053cf8e 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: