Hi,
There is a potential problem with your idea about doing something in open().
Open() is a C library call, not a kernel API call.
Oh, not for general open(). But for the code of
the hd , sg , and sr drivers which they perform
on open(). The same code that is able to spoil
our burns. To my experience an
open("/dev/sr0", O_RDONLY);
already sends SCSI commands which can do harm.
Some instance in Linux must trigger those specific
commands on the generic gesture open(). For now i
am reluctant to dive into this architecture.
Exactly one year ago i got dragged into the lower
levels of burning and i still understand only half
of what a CD actually is. (E.g. video CD and mixed
mode and the colored books and and and)
I don't want to open a new can of worms before i
am done with the old one. :))