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