[sane-devel] Re: Sane on Ultra Sparc
T. Ribbrock
emgaron at gmx.net
Fri Jan 10 21:00:01 GMT 2003
On Fri, Jan 10, 2003 at 05:38:12PM +0100, abel deuring wrote:
> "T. Ribbrock" wrote:
[...]
> Hmmm. Are you sure that cdrecord works as a 32 bit application on a 64
> bit Linux kernel using the SG interface?
Aparently yes... I don't have a burner in an Ultra myself, but on
aurora-devel, there's at least one person happily buring away on his
U10. And the app itself is indeed compiled as 32bit, as is libc on
which it depends.
[...]
>
> But the point, where the SG driver complains, is different: Sane uses
> the SG3 interface. This means to define a variable of type strct
> sg_io_hdr, defined in sg.h, to fill in the proper value and to issue a
> write() call for an SG device with this variable.
>
> struct sg_io_hdr is defined as:
[...]
> One of the first things done by the SG driver is to check, if the 3rd
> parameter of the write call, i.e., the write size, equals
> sizeof(sg_io_hdr). If this is not the case, errno is set to EINVAL (22
> for SPARC Linux). And exactly this happens, because sizeof(sg_io_hdr) is
> different for 32 bit and 64 bit programs.
Ah. Thanks for the clarification! Very enlightening, indeed!
> So, what you can do:
[...]
> I'd prefer (1) or (2), because the SG3 interface is much cleaner than
> the old interface, but it might be a bit easier, because the the old
> interface did paass any pointers to the driver.
More information about the sane-devel
mailing list