]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/scsi-linux.c
Load cups into easysw/current.
[thirdparty/cups.git] / backend / scsi-linux.c
index 763977d3e5357bac00e1af9e8e894dd737fa0f1e..dbd1c7085d662681cfe6cf551ac098306bfda0ea 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * "$Id$"
+ * "$Id: scsi-linux.c 6649 2007-07-11 21:46:42Z mike $"
  *
  *   Linux SCSI printer support for the Common UNIX Printing System (CUPS).
  *
+ *   Copyright 2007 by Apple Inc.
  *   Copyright 2003-2005 by Easy Software Products, all rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or
@@ -55,6 +56,7 @@
  */
 
 #include <scsi/sg.h>
+#include <cups/i18n.h>
 
 
 /*
@@ -108,7 +110,7 @@ print_device(const char *resource,  /* I - SCSI device */
 
   if (strncmp(resource, "/dev/sg", 7) != 0)
   {
-    fprintf(stderr, "ERROR: Bad SCSI device file \"%s\"!\n", resource);
+    fprintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"), resource);
     return (CUPS_BACKEND_STOP);
   }
 
@@ -131,8 +133,9 @@ print_device(const char *resource,  /* I - SCSI device */
        * available printer in the class.
        */
 
-        fputs("INFO: Unable to open SCSI device, queuing on next printer in class...\n",
-             stderr);
+        _cupsLangPuts(stderr,
+                     _("INFO: Unable to contact printer, queuing on next "
+                       "printer in class...\n"));
 
        /*
         * Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -145,14 +148,13 @@ print_device(const char *resource,        /* I - SCSI device */
 
       if (errno != EAGAIN && errno != EBUSY)
       {
-       fprintf(stderr, "ERROR: Unable to open SCSI device \"%s\" - %s\n",
-               resource, strerror(errno));
+       fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
+               resource, strerror(errno));
        return (CUPS_BACKEND_FAILED);
       }
       else
       {
-        fprintf(stderr, "INFO: SCSI device \"%s\" busy; retrying...\n",
-               resource);
+        fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
         sleep(30);
       }
     }
@@ -218,7 +220,8 @@ print_device(const char *resource,  /* I - SCSI device */
        if (ioctl(scsi_fd, SG_IO, &scsi_req) < 0 ||
             scsi_req.status != 0)
         {
-         fprintf(stderr, "WARNING: SCSI command timed out (%d); retrying...\n",
+         fprintf(stderr,
+                 _("WARNING: SCSI command timed out (%d); retrying...\n"),
                  scsi_req.status);
           sleep(try + 1);
        }
@@ -227,7 +230,7 @@ print_device(const char *resource,  /* I - SCSI device */
 
       if (try >= 10)
       {
-       fprintf(stderr, "ERROR: Unable to send print data (%d)\n",
+       fprintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
                scsi_req.status);
         close(scsi_fd);
        return (CUPS_BACKEND_FAILED);
@@ -249,5 +252,5 @@ print_device(const char *resource,  /* I - SCSI device */
 
 
 /*
- * End of "$Id$".
+ * End of "$Id: scsi-linux.c 6649 2007-07-11 21:46:42Z mike $".
  */