Date: Tue, 02 Nov 2004 22:22:43 +0200 From: Stasys Smailys <ssmailys@komvista.lt> To: Peter Wemm <peter@wemm.org>, "[FreeBSD-AMD64]" <freebsd-amd64@freebsd.org> Subject: Re: ioctl() 64-bit issues Message-ID: <4187EC93.2050709@komvista.lt> In-Reply-To: <200411021206.55318.peter@wemm.org> References: <4187EB23.1060407@komvista.lt> <200411021131.30701.peter@wemm.org> <4187F49A.5050006@komvista.lt> <200411021206.55318.peter@wemm.org>
index | next in thread | previous in thread | raw e-mail
Last time I forgot to cc to the list.
Peter Wemm wrote:
> On Tuesday 02 November 2004 12:56 pm, Stasys Smailys wrote:
>
>>Peter Wemm wrote:
>>
>>>If you have a look at cdrio.h:
>>>#define CDRIOCGETPROGRESS _IOR('c', 111, int)
>>>
>>>And the implementation is:
>>> case CDRIOCGETPROGRESS:
>>> error = acd_get_progress(cdp, (int *)addr);
>>>
>>>Compare to:
>>>#define CDRIOCSENDCUE _IOW('c', 104, struct cdr_cuesheet)
>>>
>>>burncd.c: if (ioctl(fd, CDRIOCSENDCUE, &sheet) < 0)
>>>atapi-cd.c:
>>> case CDRIOCSENDCUE:
>>> error = acd_send_cue(cdp, (struct cdr_cuesheet *)addr);
>>>
>>>Our ioctl wrapper code causes a copyin/copyout according to the
>>>IOR/IOW encoding. It should be an int, and is being accessed as
>>>though it were an int within the kernel.
>>
>>I think you are somewhere right. But anyway I can't
>>CDRIOCGETPROGRESS. Can it be only my CDRW drive's issue?
>>
>>
>>>If I had to guess, I'm wondering if you got this info from gdb.. I
>>>don't trust gdb for this stuff yet. I'd be more concerned if it
>>>was printf("pct %d\n", pct) that told you this. If you want to
>>>try
>>
>>You're right. I was using printf() to get values.
>>
>>
>>>something, set pct to 12345 right before the ioctl call in case
>>>you're looking at random contents or something.
>>
>>Done. Getting "burncd: ioctl(CDRIOCGETPROGRESS): Inappropriate ioctl
>>for device". Seems to be fine, but pct still has 0.
>
>
> Well, this means that nothing is updating the 'pct' value because the
> ioctl isn't executed at all. So you were seeing the previous random
> contents. The big question is though... why doesn't the driver
> recognize the ioctl?
I don't know. I'll check tomorrow. It's late already.
> Here's a silly thought.. you dont have a 32 bit burncd binary lying
> around in your path by any chance, do you?
No. It is impossible.
# file `which burncd`
/usr/sbin/burncd: ELF 64-bit LSB executable, AMD x86-64, version 1
(FreeBSD), dynamically linked (uses shared libs), stripped
--
WBR
Stasys Smailys
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4187EC93.2050709>
