Re: Inappropriate ioctl for device

Francesco <[email protected]> Fri, 18 Feb 2005 19:51:39 +0100
Newsgroups gmane.linux.suse.packet-writing,gmane.linux.debian.user
Message-ID <[email protected]>
Wayne Topa ha scritto:

>Konstantin A. Lepikhov([email protected]) is reported to have said:
>  
>
>>Hi Francesco!
>>
>>Thursday 17, at 09:39:06 PM you wrote:
>>
>><skip>
>>    
>>
>>>[root@artemide ~]# pktsetup /dev/pktcdvd /dev/dvd
>>>ioctl: Inappropriate ioctl for device
>>>
>>>The kernel module is loaded succesfully so don't know why I get this error.
>>>Could be my DVD burner blacklisted or inappropriate for packet writing? 
>>>Or am I missing something?
>>>      
>>>
>>you must use "pktsetup pktcdvd /dev/dvd" command (see pktsetup -h for details).
>>
>>    
>>
>And for even more info,
>
>read the doc in /usr/src/linux/Documentation/cdrom/packet-writing.txt
>for more features, built into the 2.6.10 kernel
>
>wt
>  
>

I followed your advices and these are my results:

created the right block devices into /dev/pktcdvd:

# ls -l /dev/pktcdvd
totale 0
crw-r--r--  1 root root  10, 61 18 feb 19:38 control
brw-r--r--  1 root root 254,  0 18 feb 19:29 pktcdvd0
brw-r--r--  1 root root  97,  0 18 feb 19:29 pktcdvd1

I created pktcdvd0 and pktcdvd1 rispectively with major 254 and 97 just 
to make some tests.

# pktsetup /dev/pktcdvd/pktcdvd0 /dev/hdb
ioctl: No such device

# pktsetup /dev/pktcdvd/pktcdvd1 /dev/hdb
open packet device: No such device or address

If I run pktsetup without the full path to the block device, it creates 
a setgid file in the same directory where it is launched:

# pktsetup pktcdvd /dev/hdb
ioctl: Inappropriate ioctl for device
# ls -l
---x--sr-x  1 root root     0 18 feb 19:27 pktcdvd

I use pktsetup from the latest CVS of udftools so I think to be up to date.

PS: I use an SMP enabled kernel, I hope pktcdvd is smp safe:)

# modinfo pktcdvd
description:    Packet writing layer for CD/DVD drives
author:         Jens Axboe <[email protected]>
license:        GPL
vermagic:       2.6.10-section9 SMP preempt PENTIUMIII 4KSTACKS gcc-3.4
depends:

Any advice?
--
ciao,
Francesco