discover: Fix CDROM handling
authorJeremy Kerr <jk@ozlabs.org>
Fri, 29 Nov 2013 02:47:10 +0000 (10:47 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 2 Dec 2013 09:00:16 +0000 (17:00 +0800)
commit9de5d31f93dab36cfb451e9ad724d47311b54424
tree47dbc8efa3f62da140d6edc045fdebf2aa73ac1c
parentf4d1abf7d2d066ee183d9cd588f336dc63f0da00
discover: Fix CDROM handling

Currently, we don't handle CDROM devices well; we'll try to mount on
boot, and not detect any media changes. Also, the default rules shipping
with udev will put the CDROM tray into a locked state, blocking eject
from working.

This change adds a set of cdrom utility functions, which the udev code
can use to properly initialise cdrom devices and handle eject and media
change requests.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/Makefile.am
discover/cdrom.c [new file with mode: 0644]
discover/cdrom.h [new file with mode: 0644]
discover/udev.c