[cups.general] How to send jobs to a SCSI printer with cups?
Mike Fedyk
mfedyk at matchmail.com
Fri Sep 10 16:19:50 PDT 2004
Mike Fedyk wrote:
> Is this right?
>
> In scsi-linux.c at line 185:
>
> scsi_cmd[0] = 0x0a; /* Group 0 print command */
> scsi_cmd[1] = 0x00;
> scsi_cmd[2] = bytes / 65536;
> scsi_cmd[3] = bytes / 256;
> scsi_cmd[4] = bytes;
> scsi_cmd[5] = 0x00;
>
> According to [1], the format should be
>
> Operation code (0Ah)
> LUN
> MSB
> Transfer Length
> LSB
> Control
>
> I don't know if the linux scsi stack changes the orders of the fields
> though...
>
> [1]
> http://www.danbbs.dk/~dino/SCSI/SCSI2-11.html
>
Here's a patch:
--- scsi-linux.c.orig 2004-09-10 16:14:08.000000000 -0700
+++ scsi-linux.c 2004-09-10 16:17:20.000000000 -0700
@@ -185,8 +185,8 @@
scsi_cmd[0] = 0x0a; /* Group 0 print command */
scsi_cmd[1] = 0x00;
scsi_cmd[2] = bytes / 65536;
- scsi_cmd[3] = bytes / 256;
- scsi_cmd[4] = bytes;
+ scsi_cmd[3] = bytes;
+ scsi_cmd[4] = bytes / 256;
scsi_cmd[5] = 0x00;
for (try = 0; try < 10; try ++)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: scsi-linux.c.patch
URL: <https://lists.cups.org/pipermail/cups/attachments/20040910/3d7644fd/attachment-0001.ksh>
More information about the cups
mailing list