Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save varadgautam/8ff25862a0d19f7bb011 to your computer and use it in GitHub Desktop.
Save varadgautam/8ff25862a0d19f7bb011 to your computer and use it in GitHub Desktop.
ignore '(' from fdt hw name
diff --git a/init/util.c b/init/util.c
index 8dd56a1..80a9854 100644
--- a/init/util.c
+++ b/init/util.c
@@ -438,7 +438,7 @@ void get_hardware_name(char *hardware, unsigned int *revision)
if (x) {
x += 2;
n = 0;
- while (*x && *x != '\n') {
+ while (*x && *x != '\n' && *x != '(') {
if (!isspace(*x))
hardware[n++] = tolower(*x);
x++;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment