Re: SANE 1.0.1 under DEC UNIX 4.0

Christian Lorenz (Christian.Lorenz@ast.dfs.de)
Thu, 11 Nov 1999 13:42:16 +0100

Petter Reinholdtsen wrote:
>
> [Christian Lorenz]
> > I have downloaded sane-1.0.1 and had to make a few patches to get it
> > running under DEC Unix 4.0D. You find the patch attached.
>
> I only wounder on one of you suggested changes:
>
> diff -ur -C 4 sane-1.0.1/sanei/sanei_scsi.c sane-1.0.1-DU4.0/sanei/sanei_scsi.c
> *** sane-1.0.1/sanei/sanei_scsi.c Sat Apr 17 22:18:18 1999
> --- sane-1.0.1-DU4.0/sanei/sanei_scsi.c Wed Nov 3 09:30:42 1999
> ***************
> *** 1873,1883 ****
> size_t cdb_size;
>
> cdb_size = CDB_SIZE (*(u_char *) src);
>
> - memset (ccb, 0, sizeof (ccb));
> + memset (&ccb, 0, sizeof (ccb));
> ccb.cam_ch.my_addr = (CCB_HEADER *) & ccb;
> - ccb.cam_ch.cam_ccb_len = sizeof (ccb);
> + ccb.cam_ch.cam_ccb_len = sizeof(CCB_SCSIIO);
> ccb.cam_ch.cam_func_code = XPT_SCSI_IO;
> ccb.cam_ch.cam_path_id = fd_info[fd].bus;
> ccb.cam_ch.cam_target_id = fd_info[fd].target;
> ccb.cam_ch.cam_target_lun = fd_info[fd].lun;
>
> Why do you want to change 'sizeof(ccb)' to 'sizeof(CCB_SCSIIO)', when
> ccb already is of type CCB_SCSIIO? It seems like duplicating
> information, and a complete waste?

You are right! When I was investigating the problem I compared this
code against our CDWriter SW and found the missing line

hdr.uagt_ccblen = sizeof(CCB_SCSIIO);

(around line number 1910, last part of the patch) and inserted the
line from out of our code which uses the type CCB_SCSIIO. So forget
about the other two changes I did them without checking the type.

See you,
Christian

-- 
Christian Lorenz                     DFS Deutsche Flugsicherung GmbH
fon: +49 6103 594 1650               Paul-Ehrlich-Str. 33
fax: +49 6103 594 1680               63225 Langen
mailto:Christian.Lorenz@ast.dfs.de   Germany

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com