]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Correctly display "Xprinter" instead of Xerox for Xprinter devices 506/head
authorRose <83477269+AtariDreams@users.noreply.github.com>
Tue, 25 Oct 2022 14:53:28 +0000 (10:53 -0400)
committerRose <83477269+AtariDreams@users.noreply.github.com>
Fri, 2 Dec 2022 13:51:21 +0000 (08:51 -0500)
CUPS currently displays "Xerox" instead of "Xprinter." This patch fixes this behavior by changing the comparison to "XPrint ", space included.

cups/ppd-attr.c

index 982f901a6c3c497ae668ffcfd42e1ba6286600fb..c25af2629489f278f215c534657ecff94e70413f 100644 (file)
@@ -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);