/*
- * "$Id: scsi-linux.c 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: scsi-linux.c 6835 2007-08-22 18:34:34Z mike $"
*
* Linux SCSI printer support for the Common UNIX Printing System (CUPS).
*
if (strncmp(resource, "/dev/sg", 7) != 0)
{
- fprintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"), resource);
+ _cupsLangPrintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"),
+ resource);
return (CUPS_BACKEND_STOP);
}
if (errno != EAGAIN && errno != EBUSY)
{
- fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
- resource, strerror(errno));
+ _cupsLangPrintf(stderr,
+ _("ERROR: Unable to open device file \"%s\": %s\n"),
+ resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
else
{
- fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
+ _cupsLangPuts(stderr,
+ _("INFO: Printer busy; will retry in 30 seconds...\n"));
sleep(30);
}
}
if (ioctl(scsi_fd, SG_IO, &scsi_req) < 0 ||
scsi_req.status != 0)
{
- fprintf(stderr,
- _("WARNING: SCSI command timed out (%d); retrying...\n"),
- scsi_req.status);
+ _cupsLangPrintf(stderr,
+ _("WARNING: SCSI command timed out (%d); "
+ "retrying...\n"), scsi_req.status);
sleep(try + 1);
}
else
if (try >= 10)
{
- fprintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
- scsi_req.status);
+ _cupsLangPrintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
+ scsi_req.status);
close(scsi_fd);
return (CUPS_BACKEND_FAILED);
}
/*
- * End of "$Id: scsi-linux.c 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: scsi-linux.c 6835 2007-08-22 18:34:34Z mike $".
*/