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-filesystem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds-filesystem.c') diff --git a/cmds-filesystem.c b/cmds-filesystem.c index e84f12b..ccf89c6 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -829,7 +829,7 @@ static int cmd_show(int argc, char **argv) /* default, search both kernel and udev */ int where = -1; int type = 0; - char mp[BTRFS_PATH_NAME_MAX + 1]; + char mp[PATH_MAX]; char path[PATH_MAX]; __u8 fsid[BTRFS_FSID_SIZE]; char uuid_buf[BTRFS_UUID_UNPARSED_SIZE]; -- cgit v1.2.1