From 92ff4cdf8c84e91584dd6076aa5b3c774ab0a622 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 5 Aug 2024 02:45:17 +0000 Subject: automatic import of hplip --- hplip-hpmud-string-parse.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 hplip-hpmud-string-parse.patch (limited to 'hplip-hpmud-string-parse.patch') diff --git a/hplip-hpmud-string-parse.patch b/hplip-hpmud-string-parse.patch new file mode 100644 index 0000000..58bf5dd --- /dev/null +++ b/hplip-hpmud-string-parse.patch @@ -0,0 +1,16 @@ +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); -- cgit v1.2.3