]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Don't list "file" device.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 23 Mar 2001 13:58:17 +0000 (13:58 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 23 Mar 2001 13:58:17 +0000 (13:58 +0000)
Add support for /dev/lpa# parallel ports under *BSD.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@1643 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES.txt
backend/parallel.c
scheduler/devices.c

index 282156107803731e38559dad4ebf9900ab0c0aed..e63bf0bc5426d66744e0bc1e097ed594269bab55 100644 (file)
@@ -111,6 +111,13 @@ CHANGES IN CUPS V1.1.7
          cause cupsd to crash when a printer was removed.
        - The LPDEST and PRINTER environment variables didn't
          support instances.
+       - Dropped the "file" backend from the device list that
+         is reported, since it is only available for *testing*
+         and should never be used in a production environment.
+         The file: device can still be used, but it won't show
+         up in the list of devices from lpinfo or the web
+         interface.
+       - Added support for /dev/lpa# parallel ports under *BSD.
 
 
 CHANGES IN CUPS V1.1.6-3
index f28eed08c0f4d2772c7239caaf40b7b95b5733b3..b8474a4cf44ce5d93f23699509e0d368af130a25 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: parallel.c,v 1.28 2001/02/28 15:19:32 mike Exp $"
+ * "$Id: parallel.c,v 1.29 2001/03/23 13:58:17 mike Exp $"
  *
  *   Parallel port backend for the Common UNIX Printing System (CUPS).
  *
@@ -606,11 +606,18 @@ list_devices(void)
       close(fd);
       printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d\"\n", device, i + 1);
     }
+
+    sprintf(device, "/dev/lpa%d", i);
+    if ((fd = open(device, O_WRONLY)) >= 0)
+    {
+      close(fd);
+      printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d\"\n", device, i + 1);
+    }
   }
 #endif
 }
 
 
 /*
- * End of "$Id: parallel.c,v 1.28 2001/02/28 15:19:32 mike Exp $".
+ * End of "$Id: parallel.c,v 1.29 2001/03/23 13:58:17 mike Exp $".
  */
index c9a2301d075afc436454433299375d7a9916d40e..f6ac4556179e951d24f84ab39d67be8d1d8e5b77 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: devices.c,v 1.13 2001/01/22 15:03:59 mike Exp $"
+ * "$Id: devices.c,v 1.14 2001/03/23 13:58:17 mike Exp $"
  *
  *   Device scanning routines for the Common UNIX Printing System (CUPS).
  *
@@ -89,20 +89,11 @@ LoadDevices(const char *d)  /* I - Directory to scan */
 
 
  /*
-  * We always support the "file" device...
+  * Initialize the device list.
   */
 
   Devices = ippNew();
 
-  ippAddString(Devices, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
-               "device-class", NULL, "file");
-  ippAddString(Devices, IPP_TAG_PRINTER, IPP_TAG_TEXT,
-               "device-info", NULL, "Disk File");
-  ippAddString(Devices, IPP_TAG_PRINTER, IPP_TAG_TEXT,
-               "device-make-and-model", NULL, "Unknown");
-  ippAddString(Devices, IPP_TAG_PRINTER, IPP_TAG_URI,
-               "device-uri", NULL, "file");
-
  /*
   * Try opening the backend directory...
   */
@@ -325,7 +316,9 @@ LoadDevices(const char *d)  /* I - Directory to scan */
     * Add strings to attributes...
     */
 
-    ippAddSeparator(Devices);
+    if (i < num_devs)
+      ippAddSeparator(Devices);
+
     ippAddString(Devices, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
                  "device-class", NULL, dev->device_class);
     ippAddString(Devices, IPP_TAG_PRINTER, IPP_TAG_TEXT,
@@ -482,5 +475,5 @@ sigalrm_handler(int sig)    /* I - Signal number */
 
 
 /*
- * End of "$Id: devices.c,v 1.13 2001/01/22 15:03:59 mike Exp $".
+ * End of "$Id: devices.c,v 1.14 2001/03/23 13:58:17 mike Exp $".
  */