diff --git a/init/util.c b/init/util.c old mode 100644 new mode 100755 index 377754b79..d8ec88e17 --- a/init/util.c +++ b/init/util.c @@ -439,8 +439,9 @@ void get_hardware_name(char *hardware, unsigned int *revision) if (x) { x += 2; n = 0; - while (*x && !isspace(*x)) { - hardware[n++] = tolower(*x); + while (*x && *x != '\n') { + if (!isspace(*x)) + hardware[n++] = tolower(*x); x++; if (n == 31) break; }