tech-kern archive

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

Re: detect CD/DVD insert/eject?



Jeremy C. Reed wrote:
My system tells me when my laptop lid opens and closes, when various USB devices are plugged in (or powered on) and removed, and various other events. I see these via log(9) and syslog.

I'd like to also see when a CD is physically inserted or DVD drive tray is ejected. Any ideas?

I don't see any harm in having the kernel logging that already. Any ideas on where to look?

Or any suggestions on how that can be done with kevent/kqueue?

I think Reinoud has this working now with pkgsrc/sysutils/hal, and your applicatoin can listen for those events using dbus.

Cheers,
Jared


Home | Main Index | Thread Index | Old Index