projects
/
profile
/
extras
/
intel-gpu-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34c66d0
)
intel_error_decode: Don't barf on a malformed PCI ID line
author
Chris Wilson
<chris@chris-wilson.co.uk>
Mon, 4 Feb 2013 21:41:13 +0000
(21:41 +0000)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Mon, 4 Feb 2013 21:42:21 +0000
(21:42 +0000)
Whoops, someone added UTS_RELEASE with no newline before PCI ID which
upsets our naive parser.
tools/intel_error_decode.c
patch
|
blob
|
history
diff --git
a/tools/intel_error_decode.c
b/tools/intel_error_decode.c
index
ca03c83
..
56bb984
100644
(file)
--- a/
tools/intel_error_decode.c
+++ b/
tools/intel_error_decode.c
@@
-365,6
+365,11
@@
read_data_file (FILE *file)
matched = sscanf (line, "PCI ID: 0x%04x\n", ®);
if (matched == 0)
matched = sscanf (line, " PCI ID: 0x%04x\n", ®);
+ if (matched == 0) {
+ const char *pci_id_start = strstr (line, "PCI ID");
+ if (pci_id_start)
+ matched = sscanf (pci_id_start, "PCI ID: 0x%04x\n", ®);
+ }
if (matched == 1) {
devid = reg;
printf("Detected GEN%i chipset\n",