Re: CD writing in future Linux (stirring up a hornets' nest)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 26, 2006 at 08:28:32PM +0100, Diego Calleja wrote:
> El Thu, 26 Jan 2006 19:28:18 +0100,
> Olivier Galibert <[email protected]> escribió:
> 
> > - find the devices, what should I scan/filter on.  udev seems likes it
> >   needs to run a program (/sbin/cdrom_id) or scan
> >   /proc/sys/dev/cdrom/info just to know if a device is a cdrom...
> 
> Not at all - /sys/devices/pci0000:00/0000:00:0f.1/ide1/1.0/media 
> tells that in my box. cdrom_id is, AFAICS, a way to find the
> capabilities of the drive (ie, look if it's a cdrom or a dvd, etc)

Hmmm, since when?  The most recent kernel with a cdrom attached I have
handy is a 2.6.14-rc2, and it does not give a "media" entry.

/proc/ide has it though.  Of course, I'd hoped the point of sysfs and
SG_IO was not to have to care whether it's scsi, ide, usb or something
else underlying...


> > - find the /dev name associated to a sysfs-found device.
> 
> HAL tells you that the sysfs path associated to a device.
> 
> root@estel # hal-get-property --udi '/org/freedesktop/Hal/devices/block_HL-DT-ST DVDRAM GSA-4163B-K01544H0250' --key 'block.device'
> /dev/cd-rw
> root@estel #
> 
> (yes, that "udi" path sucks)

Indeed, since the model is not given in sysfs, at least with
2.6.14-rc2 or previous.  There too, /proc/ide has it.  I also have no
idea what that "GSA" thing is either.


> Although that sucks, IMO the whole point of udev/hal & friends is to
> be able to make programs work regardless of what the name of the device
> is (or at least, if I had to use a program, I would like that the program
> design is good enought that it just ask the system what cd recorders are
> connected to the system).

Me too.  But at this point it looks like we have to go back to the
good old "scan /dev/hd?, /dev/scd*, /dev/sr*, /dev/sg* and pray".
Pity.

  OG.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux