summaryrefslogtreecommitdiffstats
path: root/init/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'init/util.cpp')
-rw-r--r--init/util.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/init/util.cpp b/init/util.cpp
index c484168..84fe536 100644
--- a/init/util.cpp
+++ b/init/util.cpp
@@ -431,10 +431,7 @@ void get_hardware_name(char *hardware, unsigned int *revision) {
hardware[n] = 0;
}
} else if (strncmp(buf, "Revision", 8) == 0) {
- const char* rev = strstr(buf, ": ");
- if (rev) {
- *revision = strtoul(rev + 2, 0, 16);
- }
+ sscanf(buf, "Revision : %ux", revision);
}
}
fclose(fp);