Commit 47da214c authored by Jamie Lokier's avatar Jamie Lokier Committed by Linus Torvalds

[PATCH] use simple_strtoul for unsigned kernel parameters

The largest "unsigned int" value doesn't fit in a "long", on many machines.
So we should use simple_strtoul, not simple_strtol, to decode these values.
parent 6ec33cfc
......@@ -165,9 +165,9 @@ int parse_args(const char *name,
}
STANDARD_PARAM_DEF(short, short, "%hi", long, simple_strtol);
STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", long, simple_strtol);
STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, simple_strtoul);
STANDARD_PARAM_DEF(int, int, "%i", long, simple_strtol);
STANDARD_PARAM_DEF(uint, unsigned int, "%u", long, simple_strtol);
STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, simple_strtoul);
STANDARD_PARAM_DEF(long, long, "%li", long, simple_strtol);
STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, simple_strtoul);
......
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