lib/parser: Use "%u" instead "%d" (5/6)
OGAWA Hirofumi
maintainerPATCH 1/1 lib/parser: Use "%u" instead "%d" (5/6)
Hi,
If original code uses the following,
opts->value = simple_strtoul(value, &value, 0); if (*value) return error;
It doesn't recognize negative value. So option format should use "%u".
Please apply.
linux-2.6.0-test6-hirofumi/fs/affs/super.c | 10 +++++----- linux-2.6.0-test6-hirofumi/fs/autofs/inode.c | 12 ++++++------ linux-2.6.0-test6-hirofumi/fs/autofs4/inode.c | 12 ++++++------ linux-2.6.0-test6-hirofumi/fs/ext2/super.c | 6 +++--- linux-2.6.0-test6-hirofumi/fs/ext3/super.c | 6 +++--- linux-2.6.0-test6-hirofumi/fs/fat/inode.c | 10 +++++----- 6 files changed, 28 insertions(+), 28 deletions(-)
fs/affs/super.c renamed from fs/affs/super.c~parser-token-type +5 -5
@@ -150,15 +150,15 @@ enum { };static match_table_t tokens = { - {Opt_bs,"bs=%d" }, + {Opt_bs,"bs=%u" }, {Opt_mode,"mode=%o" }, {Opt_mufs,"mufs" }, {Opt_prefix,"prefix=%s" }, {Opt_protect,"protect" }, - {Opt_reserved,"reserved=%d" }, - {Opt_root,"root=%d" }, - {Opt_setgid,"setgid=%d" }, - {Opt_setuid,"setuid=%d" }, + {Opt_reserved,"reserved=%u" }, + {Opt_root,"root=%u" }, + {Opt_setgid,"setgid=%u" }, + {Opt_setuid,"setuid=%u" }, {Opt_verbose,"verbose" }, {Opt_volume,"volume=%s" }, {Opt_ignore,"grpquota" },
fs/autofs/inode.c renamed from fs/autofs/inode.c~parser-token-type +6 -6
@@ -49,12 +49,12 @@ static struct super_operations autofs_soenum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto};static match_table_t autofs_tokens = { - {Opt_fd,"fd=%d" }, - {Opt_uid,"uid=%d" }, - {Opt_gid,"gid=%d" }, - {Opt_pgrp,"pgrp=%d" }, - {Opt_minproto,"minproto=%d" }, - {Opt_maxproto,"maxproto=%d" }, + {Opt_fd,"fd=%u" }, + {Opt_uid,"uid=%u" }, + {Opt_gid,"gid=%u" }, + {Opt_pgrp,"pgrp=%u" }, + {Opt_minproto,"minproto=%u" }, + {Opt_maxproto,"maxproto=%u" }, {Opt_err,NULL } };
fs/autofs4/inode.c renamed from fs/autofs4/inode.c~parser-token-type +6 -6
@@ -98,12 +98,12 @@ static struct super_operations autofs4_senum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto};static match_table_t tokens = { - {Opt_fd,"fd=%d" }, - {Opt_uid,"uid=%d" }, - {Opt_gid,"gid=%d" }, - {Opt_pgrp,"pgrp=%d" }, - {Opt_minproto,"minproto=%d" }, - {Opt_maxproto,"maxproto=%d" }, + {Opt_fd,"fd=%u" }, + {Opt_uid,"uid=%u" }, + {Opt_gid,"gid=%u" }, + {Opt_pgrp,"pgrp=%u" }, + {Opt_minproto,"minproto=%u" }, + {Opt_maxproto,"maxproto=%u" }, {Opt_err,NULL } };
fs/ext2/super.c renamed from fs/ext2/super.c~parser-token-type +3 -3
@@ -281,9 +281,9 @@ static match_table_t tokens = { {Opt_grpid, "bsdgroups"}, {Opt_nogrpid, "nogrpid"}, {Opt_nogrpid, "sysvgroups"}, - {Opt_resgid, "resgid=%d"}, - {Opt_resuid, "resuid=%d"}, - {Opt_sb, "sb=%d"}, + {Opt_resgid, "resgid=%u"}, + {Opt_resuid, "resuid=%u"}, + {Opt_sb, "sb=%u"}, {Opt_err_cont, "errors=continue"}, {Opt_err_panic, "errors=panic"}, {Opt_err_ro, "errors=remount-ro"},
fs/ext3/super.c renamed from fs/ext3/super.c~parser-token-type +3 -3
@@ -544,9 +544,9 @@ static match_table_t tokens = { {Opt_grpid, "bsdgroups"}, {Opt_nogrpid, "nogrpid"}, {Opt_nogrpid, "sysvgroups"}, - {Opt_resgid, "resgid=%d"}, - {Opt_resuid, "resuid=%d"}, - {Opt_sb, "sb=%d"}, + {Opt_resgid, "resgid=%u"}, + {Opt_resuid, "resuid=%u"}, + {Opt_sb, "sb=%u"}, {Opt_err_cont, "errors=continue"}, {Opt_err_panic, "errors=panic"}, {Opt_err_ro, "errors=remount-ro"},
fs/fat/inode.c renamed from fs/fat/inode.c~parser-token-type +5 -5
@@ -264,12 +264,12 @@ static match_table_t fat_tokens = { {Opt_check_r, "check=r"}, {Opt_check_s, "check=s"}, {Opt_check_n, "check=n"}, - {Opt_uid, "uid=%d"}, - {Opt_gid, "gid=%d"}, + {Opt_uid, "uid=%u"}, + {Opt_gid, "gid=%u"}, {Opt_umask, "umask=%o"}, {Opt_dmask, "dmask=%o"}, {Opt_fmask, "fmask=%o"}, - {Opt_codepage, "codepage=%d"}, + {Opt_codepage, "codepage=%u"}, {Opt_nocase, "nocase"}, {Opt_quiet, "quiet"}, {Opt_showexec, "showexec"},
@@ -281,8 +281,8 @@ static match_table_t fat_tokens = { {Opt_obsolate, "conv=b"}, {Opt_obsolate, "conv=t"}, {Opt_obsolate, "conv=a"}, - {Opt_obsolate, "fat=%d"}, - {Opt_obsolate, "blocksize=%d"}, + {Opt_obsolate, "fat=%u"}, + {Opt_obsolate, "blocksize=%u"}, {Opt_obsolate, "cvf_format=%20s"}, {Opt_obsolate, "cvf_options=%100s"}, {Opt_obsolate, "posix"},
_
Signature · 1 line
OGAWA Hirofumi <[email protected]>