File grip-ejectfix.patch of Package grip
--- grip-3.2.0/src/cddev.c
+++ grip-3.2.0/src/cddev.c
@@ -618,25 +618,29 @@
return FALSE;
}
-#ifdef CDIOCEJECT
/* always unlock door before an eject in case something else locked it */
#if defined(CDROM_LOCKDOOR)
if(ioctl(disc->cd_desc,CDROM_LOCKDOOR,0)<0)
g_print(_("Unlock failed: %d"), errno);
#endif
+
#ifdef CDIOCALLOW
if(ioctl(disc->cd_desc,CDIOCALLOW)<0)
g_print(_("Unlock failed: %d"),errno);
#endif
+#ifdef CDIOCEJECT
if(ioctl(disc->cd_desc,CDIOCEJECT)<0) {
g_print(_("CDIOCEJECT"));
return FALSE;
}
#endif
+
#ifdef CDROMEJECT
- if(ioctl(disc->cd_desc,CDROMEJECT)<0)
+ if(ioctl(disc->cd_desc,CDROMEJECT)<0) {
+ g_print(_("Eject failed: %d"),errno);
return FALSE;
+ }
#endif
return TRUE;