From: Dmitry V. Levin Date: Tue, 24 May 2016 00:59:40 +0000 (+0000) Subject: btrfs.c: do not use BTRFS_SUBVOL_NAME_MAX X-Git-Tag: v4.12~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0cd7ea055278e6125d7be21efbd9b5e29cd512e0;p=strace btrfs.c: do not use BTRFS_SUBVOL_NAME_MAX * btrfs.c [BTRFS_SUBVOL_NAME_MAX]: Remove. (btrfs_ioctl): Use sizeof(struct btrfs_ioctl_vol_args_v2.name) instead of BTRFS_SUBVOL_NAME_MAX + 1. --- diff --git a/btrfs.c b/btrfs.c index dbf3d736..10625c7c 100644 --- a/btrfs.c +++ b/btrfs.c @@ -55,10 +55,6 @@ struct btrfs_ioctl_defrag_range_args { }; #endif -#ifndef BTRFS_SUBVOL_NAME_MAX -# define BTRFS_SUBVOL_NAME_MAX 4039 -#endif - #ifndef BTRFS_LABEL_SIZE # define BTRFS_LABEL_SIZE 256 #endif @@ -1326,11 +1322,9 @@ btrfs_ioctl(struct tcb *tcp, const unsigned int code, const long arg) btrfs_print_qgroup_inherit(tcp, (unsigned long)args.qgroup_inherit); - } tprintf(", name="); - print_quoted_string(args.name, - BTRFS_SUBVOL_NAME_MAX + 1, + print_quoted_string(args.name, sizeof(args.name), QUOTE_0_TERMINATED); tprints("}"); return 0;