]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Disable USB back-channel on NetBSD (STR #2324)
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 3 Apr 2007 17:38:10 +0000 (17:38 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 3 Apr 2007 17:38:10 +0000 (17:38 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6437 7a7537e8-13f0-0310-91df-b6672ffda945

backend/usb-unix.c

index 062931a91b17c4e87e0625572c31c9fb5907b0ea..464677322c0992aecc42903ffd7f8a94ceb2c833 100644 (file)
@@ -80,6 +80,15 @@ print_device(const char *uri,                /* I - Device URI */
 
   do
   {
+#ifdef __NetBSD__
+   /*
+    * NetBSD's ulpt driver currently does not support the
+    * back-channel...
+    */
+
+    use_bc = 0;
+
+#else
    /*
     * Disable backchannel data when printing to Brother, Canon, or
     * Minolta USB printers - apparently these printers will return
@@ -91,6 +100,7 @@ print_device(const char *uri,                /* I - Device URI */
              strcasecmp(hostname, "Canon") &&
              strcasecmp(hostname, "Konica Minolta") &&
              strcasecmp(hostname, "Minolta");
+#endif /* __NetBSD__ */
 
     if ((device_fd = open_device(uri, &use_bc)) == -1)
     {
@@ -519,7 +529,12 @@ open_device(const char *uri,               /* I - Device URI */
   }
 #else
   {
-    if ((fd = open(uri + 4, O_RDWR | O_EXCL)) < 0)
+    if (use_bc)
+      fd = open(uri + 4, O_RDWR | O_EXCL);
+    else
+      fd = -1;
+
+    if (fd < 0)
     {
       fd      = open(uri + 4, O_WRONLY | O_EXCL);
       *use_bc = 0;