From a2b34a275354cf4b8a29359a86d8247ebf4d6f9f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 23 May 2015 00:11:46 +0100 Subject: [PATCH] utsname: fix reporting strings They were not getting packed as we wanted due to being const --- Kernel/include/version.h | 2 +- Kernel/makeversion | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Kernel/include/version.h b/Kernel/include/version.h index 29371352..93a7deb4 100644 --- a/Kernel/include/version.h +++ b/Kernel/include/version.h @@ -1,7 +1,7 @@ #ifndef __VERSION_DOT_H__ #define __VERSION_DOT_H__ -extern const char uname_str[]; +extern char uname_str[]; extern const uint8_t uname_len; #endif diff --git a/Kernel/makeversion b/Kernel/makeversion index 356753f1..8fc78178 100755 --- a/Kernel/makeversion +++ b/Kernel/makeversion @@ -20,7 +20,8 @@ struct sysinfoblk sysinfo = { }; /* Must follow immediately afterwards */ /* Quoting to work around cc65 bug */ -const char uname_str[] = "$1\0""Fuzix\0""$2\0""$3"; +/* Must not be const .. or gets packed elsewhere not after sysinfo */ +char uname_str[] = "$1\0""Fuzix\0""$2\0""$3"; EOF X=$(echo "$1XFuzix$2X$3X"|wc -c) echo "const uint8_t uname_len = "$X";" >>version.c -- 2.34.1