From d8063a3a5e783379f99e5cb1ca1bfb6e7db49d3a Mon Sep 17 00:00:00 2001 From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Tue, 25 Oct 2022 10:53:28 -0400 Subject: [PATCH] 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. --- cups/ppd-attr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.47.2