All of lore.kernel.org
 help / color / mirror / Atom feed
* need help: cdrkit & bitifields
@ 2009-03-05 17:21 Frans Meulenbroeks
  2009-03-05 18:26 ` Koen Kooi
  0 siblings, 1 reply; 7+ messages in thread
From: Frans Meulenbroeks @ 2009-03-05 17:21 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]

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

[-- Attachment #2: cdrkit_1.1.9.bb --]
[-- Type: application/octet-stream, Size: 343 bytes --]

# cdrkit build file

LICENSE="GPLv2"
DESCRIPTION="A set of tools for CD recording"
HOMEPAGE="http://www.cdrkit.org"

PARALLEL_MAKE = ""
DEPENDS = "libcap"
SRC_URI="http://cdrkit.org/releases/cdrkit-${PV}.tar.gz"

S="${WORKDIR}/cdrkit-${PV}"
PR = "r1"

do_install() {
	oe_runmake install DESTDIR="${D}"
	mv ${D}/usr/local/* ${D}${prefix}/ -f
}

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-03-07  9:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-05 17:21 need help: cdrkit & bitifields Frans Meulenbroeks
2009-03-05 18:26 ` Koen Kooi
2009-03-05 21:10   ` Frans Meulenbroeks
2009-03-06  9:03     ` Phil Blundell
2009-03-06  9:42       ` Frans Meulenbroeks
2009-03-06 15:08         ` Phil Blundell
2009-03-07  9:37     ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.