diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2015-05-24 06:29:09 -0400 |
---|---|---|
committer | Gene Cumm <gene.cumm@gmail.com> | 2015-05-24 06:30:09 -0400 |
commit | f7eb18ad7802b6602fac23fd0cb171c7272a6edf (patch) | |
tree | a8485226a78708420f4ea7f1bae96a289f265cf4 | |
parent | adf8dbcbc4ce636bcae199529712db2260254231 (diff) | |
download | syslinux-f7eb18ad7802b6602fac23fd0cb171c7272a6edf.tar.gz syslinux-f7eb18ad7802b6602fac23fd0cb171c7272a6edf.tar.xz syslinux-f7eb18ad7802b6602fac23fd0cb171c7272a6edf.zip |
ldlinux.c32: SERIAL directive: Allow octal/hex on port/flow control
For the SERIAL directive, allow octal (0###) and hexidecimal (0x###)
notation on the port and flow control arguments.
Two of the old ASM getint/parseint callers
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-rw-r--r-- | com32/elflink/ldlinux/readconfig.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c index 24f1cc94..381b43ff 100644 --- a/com32/elflink/ldlinux/readconfig.c +++ b/com32/elflink/ldlinux/readconfig.c @@ -1311,7 +1311,7 @@ static void parse_config_file(FILE * f) uint32_t baud; p = skipspace(p + 6); - port = atoi(p); + port = strtoul(p, &p, 0); while (isalnum(*p)) p++; @@ -1335,7 +1335,7 @@ static void parse_config_file(FILE * f) flow = 0; if (isalnum(*p)) { /* flow control */ - flow = atoi(p); + flow = strtoul(p, NULL, 0); ignore = ((flow & 0x0F00) >> 4); } |