powerpc-utils/SOURCES/0002-sys_ident--skip-length...

14 lines
551 B
Diff
Raw Normal View History

2021-05-18 06:33:59 +00:00
diff -up powerpc-utils-1.3.8/src/sys_ident.c.me powerpc-utils-1.3.8/src/sys_ident.c
--- powerpc-utils-1.3.8/src/sys_ident.c.me 2020-10-06 15:35:56.620350621 +0200
+++ powerpc-utils-1.3.8/src/sys_ident.c 2020-10-06 15:36:31.468849936 +0200
@@ -267,7 +267,8 @@ print_proc_sn_value(void)
"parameter from RTAS\n");
return 2;
}
- pos = strstr(buf, "uid=");
+ /* Ignore length field (first 2 bytes) */
+ pos = strstr(buf +2, "uid=");
if (pos == NULL) {
fprintf(stderr, "Parameter from RTAS does "
"not contain uid\n");