[oe] need help: cdrkit & bitifields
Frans Meulenbroeks
fransmeulenbroeks at gmail.com
Thu Mar 5 17:21:17 UTC 2009
Hi,
I'm trying to make a package for cdrkit (recipe attached), but I am
kind a stuck.
The ported version does communicate to an USB DVD writer, but does not
recognize the type, whereas the same drive is recognized under
opensuse.
The data I get from the inquiry command ( wodim -inq -v -V ) is
initially the same but the result of inquiry is interpreted
differently.
I've tracked it down to the following:
in ./include/usal/scsireg.h it says:
struct scsi_inquiry {
Ucbit type : 5; /* 0 */
Ucbit qualifier : 3; /* 0 */
Ucbit type_modifier : 7; /* 1 */
Ucbit removable : 1; /* 1 */
Ucbit ansi_version : 3; /* 2 */
Ucbit ecma_version : 3; /* 2 */
...
Ucbit is an unsigned char
In wodim/scsi_cdr.c function getdev a pointer is made to the data that
are read from the drive:
register struct scsi_inquiry *inq = usalp->inq;
The type is in the first byte, which for my drive is 0x05
on opensuse this gives a type of 0x5, and a qualifier of 0 and on my
beagleboard it gives a type of 0 and a qualifier of 5.
Apparently bitfields are orderd differently.
How can this be fixed?
Frans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdrkit_1.1.9.bb
Type: application/octet-stream
Size: 342 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20090305/5a0dbd2b/attachment-0002.obj>
More information about the Openembedded-devel
mailing list