From 9de5d31f93dab36cfb451e9ad724d47311b54424 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Fri, 29 Nov 2013 10:47:10 +0800 Subject: 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 --- discover/cdrom.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 discover/cdrom.h (limited to 'discover/cdrom.h') 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 */ + -- cgit v1.2.1