Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37404970
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: FC-uri-compat.patch
Download


diff -up cups-1.5b1/backend/usb-unix.c.uri-compat cups-1.5b1/backend/usb-unix.c
--- cups-1.5b1/backend/usb-unix.c.uri-compat	2011-05-24 15:59:05.000000000 +0200
+++ cups-1.5b1/backend/usb-unix.c	2011-05-24 16:02:03.000000000 +0200
@@ -63,11 +63,34 @@ print_device(const char *uri,		/* I - De
   int		device_fd;		/* USB device */
   ssize_t	tbytes;			/* Total number of bytes written */
   struct termios opts;			/* Parallel port options */
+  char		*fixed_uri = strdup (uri);
+  char		*p;
 
 
   (void)argc;
   (void)argv;
 
+  p = strchr (fixed_uri, ':');
+  if (p++ != NULL)
+  {
+    char *e;
+    p += strspn (p, "/");
+    e = strchr (p, '/');
+    if (e > p)
+    {
+      size_t mfrlen = e - p;
+      e++;
+      if (!strncasecmp (e, p, mfrlen))
+      {
+	char *x = e + mfrlen;
+	if (!strncmp (x, "%20", 3))
+	  /* Take mfr name out of mdl name for compatibility with
+	   * Fedora 11 before bug #507244 was fixed. */
+	  strcpy (e, x + 3); puts(fixed_uri);
+      }
+    }
+  }
+
  /*
   * Open the USB port device...
   */
@@ -107,10 +130,10 @@ print_device(const char *uri,		/* I - De
              _cups_strncasecmp(hostname, "Minolta", 7);
 #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
 
-    if (use_bc && !strncmp(uri, "usb:/dev/", 9))
+    if (use_bc && !strncmp(fixed_uri, "usb:/dev/", 9))
       use_bc = 0;
 
-    if ((device_fd = open_device(uri, &use_bc)) == -1)
+    if ((device_fd = open_device(fixed_uri, &use_bc)) == -1)
     {
       if (getenv("CLASS") != NULL)
       {
 
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