Blame SOURCES/hplip-hpmud-string-parse.patch
|
|
b1d80f |
diff --git a/io/hpmud/model.c b/io/hpmud/model.c
|
|
|
b1d80f |
index 4ea8990..72c630b 100644
|
|
|
b1d80f |
--- a/io/hpmud/model.c
|
|
|
b1d80f |
+++ b/io/hpmud/model.c
|
|
|
b1d80f |
@@ -420,7 +420,10 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int *
|
|
|
b1d80f |
strncpy(section, rcbuf+1, sizeof(section)); /* found new section */
|
|
|
b1d80f |
n = strlen(section);
|
|
|
b1d80f |
section[n-2]=0; /* remove ']' and CR */
|
|
|
b1d80f |
- if (strcasecmp(model, section) == 0)
|
|
|
b1d80f |
+ if (strcasecmp(model, section) == 0 ||
|
|
|
b1d80f |
+ (section[0] == 'h' && section[1] == 'p' &&
|
|
|
b1d80f |
+ section[2] == '_' &&
|
|
|
b1d80f |
+ strcasecmp(model, section + 3) == 0))
|
|
|
b1d80f |
{
|
|
|
b1d80f |
/* Found model match. */
|
|
|
b1d80f |
*bytes_read = ResolveAttributes(fp, attr, attrSize);
|