[syslinux:master] SYSAPPEND: Fix space stripping

syslinux-bot for Dany St-Amant dany.ephemeral.2014 at icloud.com
Mon Jan 5 17:48:17 PST 2015


Commit-ID:  3106dcd19061b4443c5beba4f0e09412e8d37fbe
Gitweb:     http://www.syslinux.org/commit/3106dcd19061b4443c5beba4f0e09412e8d37fbe
Author:     Dany St-Amant <dany.ephemeral.2014 at icloud.com>
AuthorDate: Fri, 28 Nov 2014 13:48:32 -0500
Committer:  Gene Cumm <gene.cumm at gmail.com>
CommitDate: Mon, 5 Jan 2015 20:43:13 -0500

SYSAPPEND: Fix space stripping

The description of SYSAPPEND for the DMI information states that the spaces
are replaced by underscores, but this replacement does not occur in 6.03.

Signed-off-by: Dany St-Amant <dany.ephemeral.2014 at icloud.com>
Signed-off-by: Gene Cumm <gene.cumm at gmail.com>

---
 com32/elflink/ldlinux/readconfig.c | 2 +-
 com32/menu/readconfig.c            | 2 +-
 core/sysappend.c                   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index 347f826..24f1cc9 100644
--- a/com32/elflink/ldlinux/readconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -330,7 +330,7 @@ static char *copy_sysappend_string(char *dst, const char *src)
     char c;
 
     while ((c = *src++)) {
-	if (c <= ' ' && c == '\x7f') {
+	if (c <= ' ' || c == '\x7f') {
 	    if (!was_space)
 		*dst++ = '_';
 	    was_space = true;
diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c
index b7814be..257b042 100644
--- a/com32/menu/readconfig.c
+++ b/com32/menu/readconfig.c
@@ -299,7 +299,7 @@ static char *copy_sysappend_string(char *dst, const char *src)
     char c;
 
     while ((c = *src++)) {
-	if (c <= ' ' && c == '\x7f') {
+	if (c <= ' ' || c == '\x7f') {
 	    if (!was_space)
 		*dst++ = '_';
 	    was_space = true;
diff --git a/core/sysappend.c b/core/sysappend.c
index 5c3f650..758703e 100644
--- a/core/sysappend.c
+++ b/core/sysappend.c
@@ -35,7 +35,7 @@ static char *copy_and_mangle(char *dst, const char *src)
     char c;
 
     while ((c = *src++)) {
-	if (c <= ' ' && c == '\x7f') {
+	if (c <= ' ' || c == '\x7f') {
 	    if (!was_space)
 		*dst++ = '_';
 	    was_space = true;


More information about the Syslinux-commits mailing list