diff options
author | Michael Brown | 2010-11-29 15:18:43 +0100 |
---|---|---|
committer | Michael Brown | 2010-11-29 15:18:43 +0100 |
commit | 01df5c510f4949f1d9d85c0067c24b1093e3f838 (patch) | |
tree | 42a0577df3f5120ba6fc4ebe41ad96f85cc6e04e /src/core/parseopt.c | |
parent | [shell] Add "shell" command (diff) | |
download | ipxe-01df5c510f4949f1d9d85c0067c24b1093e3f838.tar.gz ipxe-01df5c510f4949f1d9d85c0067c24b1093e3f838.tar.xz ipxe-01df5c510f4949f1d9d85c0067c24b1093e3f838.zip |
[parseopt] Allow "0x"-prefixed hexadecimal values in integer-valued options
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/parseopt.c')
-rw-r--r-- | src/core/parseopt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/parseopt.c b/src/core/parseopt.c index ccaed374..f0a3e700 100644 --- a/src/core/parseopt.c +++ b/src/core/parseopt.c @@ -72,7 +72,7 @@ int parse_integer ( const char *text, unsigned int *value ) { assert ( text != NULL ); /* Parse integer */ - *value = strtoul ( text, &endp, 10 ); + *value = strtoul ( text, &endp, 0 ); if ( *endp ) { printf ( "\"%s\": invalid integer value\n", text ); return -EINVAL; |