FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 03-25-2010, 07:53 PM
Peter Jones
 
Default Unlock the CD tray door in isys.ejectcdrom() (#569377)

Since we're leaving the cd drive door locked in loader, we need to make
isys's eject routines unlock the door first, or eject will fail.
---
isys/isys.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/isys/isys.c b/isys/isys.c
index 75ee2b3..229daab 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -56,6 +56,7 @@
#include <linux/fb.h>
#include <libintl.h>
#include <libgen.h>
+#include <linux/cdrom.h>
#include <linux/major.h>
#include <linux/raid/md_u.h>
#include <linux/raid/md_p.h>
@@ -503,6 +504,11 @@ static PyObject * doEjectCdrom(PyObject * s, PyObject * args) {

if (!PyArg_ParseTuple(args, "i", &fd)) return NULL;

+ /* Ask it to unlock the door and then eject the disc. There's really
+ * nothing to do if unlocking doesn't work, so just eject without
+ * worrying about it. -- pjones
+ */
+ ioctl(fd, CDROM_LOCKDOOR, 0);
if (ioctl(fd, CDROMEJECT, 1)) {
PyErr_SetFromErrno(PyExc_SystemError);
return NULL;
--
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 11:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org