hplip/hplip-hpmud-string-parse.patch
Petr Šabata 3b7ae335f3 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/hplip#7cb6f648cdb35a0f018b511d10b516d6d9e4d638
2020-10-15 12:26:13 +02:00

17 lines
742 B
Diff

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