Commit 5163200e authored by Hirofumi Ogawa's avatar Hirofumi Ogawa Committed by Linus Torvalds

[PATCH] lib/parser: Use "%u" instead "%d" (5/6)

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".
parent e85bed01
...@@ -150,15 +150,15 @@ enum { ...@@ -150,15 +150,15 @@ enum {
}; };
static match_table_t tokens = { static match_table_t tokens = {
{Opt_bs, "bs=%d"}, {Opt_bs, "bs=%u"},
{Opt_mode, "mode=%o"}, {Opt_mode, "mode=%o"},
{Opt_mufs, "mufs"}, {Opt_mufs, "mufs"},
{Opt_prefix, "prefix=%s"}, {Opt_prefix, "prefix=%s"},
{Opt_protect, "protect"}, {Opt_protect, "protect"},
{Opt_reserved, "reserved=%d"}, {Opt_reserved, "reserved=%u"},
{Opt_root, "root=%d"}, {Opt_root, "root=%u"},
{Opt_setgid, "setgid=%d"}, {Opt_setgid, "setgid=%u"},
{Opt_setuid, "setuid=%d"}, {Opt_setuid, "setuid=%u"},
{Opt_verbose, "verbose"}, {Opt_verbose, "verbose"},
{Opt_volume, "volume=%s"}, {Opt_volume, "volume=%s"},
{Opt_ignore, "grpquota"}, {Opt_ignore, "grpquota"},
......
...@@ -49,12 +49,12 @@ static struct super_operations autofs_sops = { ...@@ -49,12 +49,12 @@ static struct super_operations autofs_sops = {
enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto}; enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto};
static match_table_t autofs_tokens = { static match_table_t autofs_tokens = {
{Opt_fd, "fd=%d"}, {Opt_fd, "fd=%u"},
{Opt_uid, "uid=%d"}, {Opt_uid, "uid=%u"},
{Opt_gid, "gid=%d"}, {Opt_gid, "gid=%u"},
{Opt_pgrp, "pgrp=%d"}, {Opt_pgrp, "pgrp=%u"},
{Opt_minproto, "minproto=%d"}, {Opt_minproto, "minproto=%u"},
{Opt_maxproto, "maxproto=%d"}, {Opt_maxproto, "maxproto=%u"},
{Opt_err, NULL} {Opt_err, NULL}
}; };
......
...@@ -98,12 +98,12 @@ static struct super_operations autofs4_sops = { ...@@ -98,12 +98,12 @@ static struct super_operations autofs4_sops = {
enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto}; enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto};
static match_table_t tokens = { static match_table_t tokens = {
{Opt_fd, "fd=%d"}, {Opt_fd, "fd=%u"},
{Opt_uid, "uid=%d"}, {Opt_uid, "uid=%u"},
{Opt_gid, "gid=%d"}, {Opt_gid, "gid=%u"},
{Opt_pgrp, "pgrp=%d"}, {Opt_pgrp, "pgrp=%u"},
{Opt_minproto, "minproto=%d"}, {Opt_minproto, "minproto=%u"},
{Opt_maxproto, "maxproto=%d"}, {Opt_maxproto, "maxproto=%u"},
{Opt_err, NULL} {Opt_err, NULL}
}; };
......
...@@ -281,9 +281,9 @@ static match_table_t tokens = { ...@@ -281,9 +281,9 @@ static match_table_t tokens = {
{Opt_grpid, "bsdgroups"}, {Opt_grpid, "bsdgroups"},
{Opt_nogrpid, "nogrpid"}, {Opt_nogrpid, "nogrpid"},
{Opt_nogrpid, "sysvgroups"}, {Opt_nogrpid, "sysvgroups"},
{Opt_resgid, "resgid=%d"}, {Opt_resgid, "resgid=%u"},
{Opt_resuid, "resuid=%d"}, {Opt_resuid, "resuid=%u"},
{Opt_sb, "sb=%d"}, {Opt_sb, "sb=%u"},
{Opt_err_cont, "errors=continue"}, {Opt_err_cont, "errors=continue"},
{Opt_err_panic, "errors=panic"}, {Opt_err_panic, "errors=panic"},
{Opt_err_ro, "errors=remount-ro"}, {Opt_err_ro, "errors=remount-ro"},
......
...@@ -544,9 +544,9 @@ static match_table_t tokens = { ...@@ -544,9 +544,9 @@ static match_table_t tokens = {
{Opt_grpid, "bsdgroups"}, {Opt_grpid, "bsdgroups"},
{Opt_nogrpid, "nogrpid"}, {Opt_nogrpid, "nogrpid"},
{Opt_nogrpid, "sysvgroups"}, {Opt_nogrpid, "sysvgroups"},
{Opt_resgid, "resgid=%d"}, {Opt_resgid, "resgid=%u"},
{Opt_resuid, "resuid=%d"}, {Opt_resuid, "resuid=%u"},
{Opt_sb, "sb=%d"}, {Opt_sb, "sb=%u"},
{Opt_err_cont, "errors=continue"}, {Opt_err_cont, "errors=continue"},
{Opt_err_panic, "errors=panic"}, {Opt_err_panic, "errors=panic"},
{Opt_err_ro, "errors=remount-ro"}, {Opt_err_ro, "errors=remount-ro"},
......
...@@ -264,12 +264,12 @@ static match_table_t fat_tokens = { ...@@ -264,12 +264,12 @@ static match_table_t fat_tokens = {
{Opt_check_r, "check=r"}, {Opt_check_r, "check=r"},
{Opt_check_s, "check=s"}, {Opt_check_s, "check=s"},
{Opt_check_n, "check=n"}, {Opt_check_n, "check=n"},
{Opt_uid, "uid=%d"}, {Opt_uid, "uid=%u"},
{Opt_gid, "gid=%d"}, {Opt_gid, "gid=%u"},
{Opt_umask, "umask=%o"}, {Opt_umask, "umask=%o"},
{Opt_dmask, "dmask=%o"}, {Opt_dmask, "dmask=%o"},
{Opt_fmask, "fmask=%o"}, {Opt_fmask, "fmask=%o"},
{Opt_codepage, "codepage=%d"}, {Opt_codepage, "codepage=%u"},
{Opt_nocase, "nocase"}, {Opt_nocase, "nocase"},
{Opt_quiet, "quiet"}, {Opt_quiet, "quiet"},
{Opt_showexec, "showexec"}, {Opt_showexec, "showexec"},
...@@ -281,8 +281,8 @@ static match_table_t fat_tokens = { ...@@ -281,8 +281,8 @@ static match_table_t fat_tokens = {
{Opt_obsolate, "conv=b"}, {Opt_obsolate, "conv=b"},
{Opt_obsolate, "conv=t"}, {Opt_obsolate, "conv=t"},
{Opt_obsolate, "conv=a"}, {Opt_obsolate, "conv=a"},
{Opt_obsolate, "fat=%d"}, {Opt_obsolate, "fat=%u"},
{Opt_obsolate, "blocksize=%d"}, {Opt_obsolate, "blocksize=%u"},
{Opt_obsolate, "cvf_format=%20s"}, {Opt_obsolate, "cvf_format=%20s"},
{Opt_obsolate, "cvf_options=%100s"}, {Opt_obsolate, "cvf_options=%100s"},
{Opt_obsolate, "posix"}, {Opt_obsolate, "posix"},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment