diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/vsprintf.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/vsprintf.h b/include/vsprintf.h index debf977401a..83d187e53d4 100644 --- a/include/vsprintf.h +++ b/include/vsprintf.h @@ -22,8 +22,12 @@ * the end these are ignored. In the worst case, if all characters are invalid, * 0 is returned * - * If @base is 0, octal or hex prefixes are supported (e.g. 0777, 0x123) to - * select a particular base. By default decimal is used. + * A hex prefix is supported (e.g. 0x123) regardless of the value of @base. + * If found, the base is set to hex (16). + * + * If @base is 0: + * - an octal '0' prefix (e.g. 0777) sets the base to octal (8). + * - otherwise the base defaults to decimal (10). */ ulong simple_strtoul(const char *cp, char **endp, unsigned int base); @@ -71,8 +75,12 @@ unsigned long dectoul(const char *cp, char **endp); * * echo will append a newline to the tail. * - * If @base is 0, octal or hex prefixes are supported (e.g. 0777, 0x123) to - * select a particular base. By default decimal is used. + * A hex prefix is supported (e.g. 0x123) regardless of the value of @base. + * If found, the base is set to hex (16). + * + * If @base is 0: + * - an octal '0' prefix (e.g. 0777) sets the base to octal (8). + * - otherwise the base defaults to decimal (10). * * Copied this function from Linux 2.6.38 commit ID: * 521cb40b0c44418a4fd36dc633f575813d59a43d |