summaryrefslogtreecommitdiff
path: root/cmds-filesystem.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-filesystem.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-filesystem.c')
-rw-r--r--cmds-filesystem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index e84f12b7..ccf89c66 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];