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

Re: trixie: cdrecord can no longer write to CD



Hi,

Max Nikulin wrote:
> I assume that nowadays it is more reasonable to expect kernel >= 2.6.

Historically /dev/sg* is the safest blind bet. It is usable for
ioctl(SG_IO) since at least kernel 2.4 and not foreseeable to vanish.
The only disadvantage is with coordination of drive access, because all
reader use cases use the /dev/sr* device files.

Before 2.4 i used cdrecord by its peculiar numerical Bus,Target,Lun
addresses (e.g. 2,0,0) without knowing what it does internally.
I'm not sure what kernel i had when i began to use growisofs which
always operated on /dev/sr* or their links /dev/cdrom, /dev/dvd, ...
But i remember that growisofs switched from using
ioctl(CDROM_SEND_PACKET) to ioctl(SG_IO) when i already was working on
libburn at kernel >= 2.4 time.


> <https://docs.kernel.org/admin-guide/devices.html>
> The prefix /dev/sr (instead of /dev/scd) has been deprecated.

Yes. That was the plan 20 years ago. For a while i had both names on
SuSE. I don't know why /dev/scd* failed to persist.
(The kernel code part was alreay named "sr" when the attempt was made.)


> Should it be considered as a documentation bug?

In comparison to contemporary distro reality it is obviously bit rot.


> I am lost which way /dev/scd<n> were created in the past.

Digging in my dim memories ...
It happened after Linux gave up the large unconditional collection of
device files in favor of files which show up only if they have a drive
attached.
I first experienced that novel behavior with a USB attached CD drive.
It may be that HAL, kindof a predecessor of udev, was already at work.
(It was an infamous groper of CD drives in the middle of burn runs
which resulted in wasted CD-R media.)


Have a nice day :)

Thomas


Reply to: