In <firstname.lastname@example.org> Siddharth Kashyap (email@example.com) wrote:
> I am writting a module that sits in the kernel, and probes the CD Rom
> drive after X time intervel. The moment it finds some sort of disk - Data,
> Audio, etc, it tries to load the appropriate module. By writting this
> module, the user does not have to mount the CD rom. It will be done
> _automatically_ once the disk is put in.
> There are two problems:
You forgot problem number 0) :
0) Why such driver EVER needed ? It can be implemeneted (and it WAS
implemeted few times!) in userspace so why to add crap in kernel ? Why not
just add functionality to GNOME or KDE autoplayers insetead of reinventing
the wheel ?
> 1) I am not able to find as to how and in which file are the timer
> interrupts handled.
WHy you need this ? You can use time functions from <linux/timer.h> for
timeouts and such ...
> 2) As it happens in windows, I am trying to catch th interrupt generated
> when the CD rom drive shutter is closed. This way, I don't have to probe any
> more. However, I am not able to find any interrupt being generated by the
> device driver on closing the CD Rom drive.
..and by very good reason: there are NO interrupts being generated by the
device driver on closing the CD Rom drive. Windows polls CD itself (not all
CD drives can say that "tray is closed now") while linux kernel just do not
care (such polling can be implemented in userspace and generally not needed
> Any help in this direction would be much appreciated.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:14 EST