0035-SYSAPPEND-Fix-space-stripping.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From 3106dcd19061b4443c5beba4f0e09412e8d37fbe Mon Sep 17 00:00:00 2001
  2. From: Dany St-Amant <dany.ephemeral.2014@icloud.com>
  3. Date: Fri, 28 Nov 2014 13:48:32 -0500
  4. Subject: [PATCH 35/74] SYSAPPEND: Fix space stripping
  5. The description of SYSAPPEND for the DMI information states that the spaces
  6. are replaced by underscores, but this replacement does not occur in 6.03.
  7. Signed-off-by: Dany St-Amant <dany.ephemeral.2014@icloud.com>
  8. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
  9. ---
  10. com32/elflink/ldlinux/readconfig.c | 2 +-
  11. com32/menu/readconfig.c | 2 +-
  12. core/sysappend.c | 2 +-
  13. 3 files changed, 3 insertions(+), 3 deletions(-)
  14. diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
  15. index 347f826..24f1cc9 100644
  16. --- a/com32/elflink/ldlinux/readconfig.c
  17. +++ b/com32/elflink/ldlinux/readconfig.c
  18. @@ -330,7 +330,7 @@ static char *copy_sysappend_string(char *dst, const char *src)
  19. char c;
  20. while ((c = *src++)) {
  21. - if (c <= ' ' && c == '\x7f') {
  22. + if (c <= ' ' || c == '\x7f') {
  23. if (!was_space)
  24. *dst++ = '_';
  25. was_space = true;
  26. diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c
  27. index b7814be..257b042 100644
  28. --- a/com32/menu/readconfig.c
  29. +++ b/com32/menu/readconfig.c
  30. @@ -299,7 +299,7 @@ static char *copy_sysappend_string(char *dst, const char *src)
  31. char c;
  32. while ((c = *src++)) {
  33. - if (c <= ' ' && c == '\x7f') {
  34. + if (c <= ' ' || c == '\x7f') {
  35. if (!was_space)
  36. *dst++ = '_';
  37. was_space = true;
  38. diff --git a/core/sysappend.c b/core/sysappend.c
  39. index 5c3f650..758703e 100644
  40. --- a/core/sysappend.c
  41. +++ b/core/sysappend.c
  42. @@ -35,7 +35,7 @@ static char *copy_and_mangle(char *dst, const char *src)
  43. char c;
  44. while ((c = *src++)) {
  45. - if (c <= ' ' && c == '\x7f') {
  46. + if (c <= ' ' || c == '\x7f') {
  47. if (!was_space)
  48. *dst++ = '_';
  49. was_space = true;
  50. --
  51. 2.4.5