Re: Issues with cdrsin and USB devices on RHEL5
Hi,
> > some larger changes in the Linux adapter
> > of libburn.
> What du you understand by "the linux adaptor"?
> Your software is not portable, so why do you have an "adaptor"?
Oh. Then i misunderstood my own design.
Up to now i believed that libburn's system flavor
dependencies were concentrated in
libburn/os-*.h
libburn/sg-*.c
Pun aside. I got neither an own non-Linux system
nor an interested user with non-Linux system.
So only
libburn/os-linux.h
libburn/sg-linux.c
are operational adapters currently.
Inside the Linux adapter i am allowed to rely on
Linux peculiarities. Regrettably Linux is not very
stable with its peculiarities. So it stays a game
of guessing and pondering.
I think Bill's proposal to make use of
/proc/sys/dev/cdrom/info will become very valuable
with the automated pondering.
> Are you are talking about the way you probably deal with /dev/ entries
> in order to access SCSI?
It is about getting a complete list of CD drives
without inadvertedly spoiling an ongoing CD-R burn.
It is about the fact that in the past /dev/sr* was
a reliable list of CD drives under Linux SCSI control.
My own system has no /dev/scd* but Giulio's has no
/dev/sr*. SuSE versus RedHat.
Another undesirable effect with Giulio's is that
for some reason /dev/hda is locked by O_EXCL and
thus caused failure messages as if it was a busy
CD drive.
All in all the current way of libburn to test-open
/dev/hd[a-z] and /dev/sr[0..31] is not apt any more.
I also have to put in doubt libburn's principle to
allow only listed drives for SCSI/MMC operations.
But this has to wait until after next release.
> Then it is nice to see that all people who told me
> that cdrecord is doing things wrong _and_ created patches for cdrecord
> ended up in cdrecord variants that do no longer work while the original
> cdrecord still works ;-)
For your amusement:
The behavior of vanilla installed SuSE 10.2 with
various device scans:
$ cdrecord -scanbus
Cdrecord-ProDVD-ProBD-Clone 2.01.01a39 ...
... finds nothing since i have no permission for /dev/sg* ...
So as superuser:
# cdrecord -scanbus
... finds all 4 CD drives and the SATA disk on 5 busses ...
$ cdrskin --devices
... finds all 4 CD drives, no hard disk ...
$ wodim --devices
... finds only the 2 IDE drives because there is no /dev/scd* ...
$ ln -s sr0 /dev/scd0 ; ln -s sr1 /dev/scd1
$ wodim --devices
... finds all 4 CD drives, no hard disk ...
The desktop user has rw-access to all CD drives by
ACLs (set by udev ?). I hate that and after each boot
i run a script which allows rw to group "floppy".
> It seems that libscg still contains the best abstraction from the transient
> Linux kernel interfaces...
The choice to access drives via /dev/sg is not
optimal in my eyes:
- it is deprecated by the kernel people
- /dev/sg* cannot be used as normal file for reading
- it is a nexus where disks, tapes, CD drives and
whatever meet. I only want CD drives.
So i decided to switch to the block devices on
kernel 2.6. This switch was not done sufficiently
complete, as i had to learn meanwhile.
Have a nice day :)
Thomas
Reply to: