diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-11-29 10:47:10 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-12-02 17:00:16 +0800 |
commit | 9de5d31f93dab36cfb451e9ad724d47311b54424 (patch) | |
tree | 47dbc8efa3f62da140d6edc045fdebf2aa73ac1c /discover/cdrom.h | |
parent | f4d1abf7d2d066ee183d9cd588f336dc63f0da00 (diff) | |
download | talos-petitboot-9de5d31f93dab36cfb451e9ad724d47311b54424.tar.gz talos-petitboot-9de5d31f93dab36cfb451e9ad724d47311b54424.zip |
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>
Diffstat (limited to 'discover/cdrom.h')
-rw-r--r-- | discover/cdrom.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/discover/cdrom.h b/discover/cdrom.h new file mode 100644 index 0000000..2e9de06 --- /dev/null +++ b/discover/cdrom.h @@ -0,0 +1,9 @@ +#ifndef CDROM_H +#define CDROM_H + +void cdrom_init(const char *devpath); +void cdrom_eject(const char *devpath); +bool cdrom_media_present(const char *devpath); + +#endif /* CDROM_H */ + |