On Tue, Jun 22, 2010 at 04:02:16PM +0200, Philipp Schafft wrote: > reflum, > > On Mon, 2010-06-21 at 12:44 -0700, Matthew Dempsky wrote: > > It looks like adw(4) has never correctly supported >12 byte SCSI > > requests. It wants to copy from 12 bytes past the start of the CDB, > > but &xs->cmd[12] is actually 192 bytes past (and pointing at who knows > > what). > > > > However, I don't have any adw(4) hardware nor know off hand how to > > force a >12 byte SCSI request to test if this fixes anything. > > > [...] > > diff -u -p dev/ic/adw.c > > [...] > > + bcopy(xs->cmd, &scsiqp->cdb, MIN(xs->cmdlen, 12)); > > [...] > > Is there any reson you use bcopy() not memcpy()? > If not considder using memcpy() please. :)
bcopy() is the bsd (classic) way. memcpy() works backwards. :-). There is no consistent idiom in OpenBSD, though the new whippersnappers do seem to gravitate to memcpy(). .... Ken
