From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Tue, 25 Oct 2022 14:53:28 +0000 (-0400) Subject: Correctly display "Xprinter" instead of Xerox for Xprinter devices X-Git-Tag: v2.4.3~77^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F506%2Fhead;p=thirdparty%2Fcups.git Correctly display "Xprinter" instead of Xerox for Xprinter devices CUPS currently displays "Xerox" instead of "Xprinter." This patch fixes this behavior by changing the comparison to "XPrint ", space included. --- diff --git a/cups/ppd-attr.c b/cups/ppd-attr.c index 982f901a6c..c25af26294 100644 --- a/cups/ppd-attr.c +++ b/cups/ppd-attr.c @@ -170,10 +170,12 @@ _ppdNormalizeMakeAndModel( if ((bufptr = strrchr(buffer, ')')) != NULL) *bufptr = '\0'; } - else if (!_cups_strncasecmp(make_and_model, "XPrint", 6)) + else if (!_cups_strncasecmp(make_and_model, "XPrint ", 7)) { /* * Xerox XPrint... + * Note: We check for the space after XPrint to ensure we do not display + * Xerox for Xprinter devices, which are NOT by Xerox. */ snprintf(buffer, bufsize, "Xerox %s", make_and_model);