Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37721794
en ru br
ALT Linux repositórios
S:2.4.7-alt1
5.0: 1.3.10-alt1
4.1: 1.3.10-alt0.M41.4
+updates:1.3.9-alt1.M41.1
4.0: 1.2.12-alt6.M40.9
+updates:1.2.12-alt6.M40.8
3.0: 1.1.20-alt14.1

Group :: Sistema/Servidores
RPM: cups

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: cups-1.1.20-alt-usb-decode_id.patch
Download


diff -Naur cups-1.1.20/backend/usb.c cups-1.1.20.new/backend/usb.c
--- cups-1.1.20/backend/usb.c	2003-09-03 00:19:17 +0400
+++ cups-1.1.20.new/backend/usb.c	2005-05-04 17:07:13 +0400
@@ -358,7 +358,7 @@
   else if ((mdl = strstr(device_id, "MDL:")) != NULL)
     mdl += 4;
 
-  if (attr)
+  if (attr && strchr(attr,' '))
   {
     if (strncasecmp(attr, "Hewlett-Packard ", 16) == 0)
     {
@@ -379,7 +379,14 @@
     * Build a make-model string from the manufacturer and model attributes...
     */
 
-    strlcpy(make_model, mfg, mmsize);
+    if (strncasecmp(mfg, "Hewlett-Packard", 15) == 0)
+    {
+      strlcpy(make_model, "HP ", mmsize);
+    }
+    else
+    {
+      strlcpy(make_model, mfg, mmsize);
+    }
 
     if ((delim = strchr(make_model, ';')) != NULL)
       *delim = '\0';
@@ -403,7 +410,9 @@
   * Look for the serial number field...
   */
 
-  if ((attr = strstr(device_id, "SERN:")) != NULL)
+  if ((attr = strstr(device_id, "SN:")) != NULL)
+    attr += 3;
+  else if ((attr = strstr(device_id, "SERN:")) != NULL)
     attr += 5;
   else if ((attr = strstr(device_id, "SERIALNUMBER:")) != NULL)
     attr += 13;
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009