[syslinux:master] ldlinux.c32: SERIAL directive: Allow octal/ hex on port/flow control

syslinux-bot for Andrew J. Schorr aschorr at telemetry-investments.com
Tue May 26 16:48:05 PDT 2015


Commit-ID:  f7eb18ad7802b6602fac23fd0cb171c7272a6edf
Gitweb:     http://www.syslinux.org/commit/f7eb18ad7802b6602fac23fd0cb171c7272a6edf
Author:     Andrew J. Schorr <aschorr at telemetry-investments.com>
AuthorDate: Sun, 24 May 2015 06:29:09 -0400
Committer:  Gene Cumm <gene.cumm at gmail.com>
CommitDate: Sun, 24 May 2015 06:30:09 -0400

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 at gmail.com>

---
 com32/elflink/ldlinux/readconfig.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index 24f1cc9..381b43f 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);
 			}
 


More information about the Syslinux-commits mailing list