Index: src/nautilus-burn-drive.c
===================================================================
--- src/nautilus-burn-drive.c	(revision 2116)
+++ src/nautilus-burn-drive.c	(working copy)
@@ -1443,3 +1443,56 @@
                                                                FALSE,
                                                                G_PARAM_READWRITE));
 }
+
+static gboolean
+can_drive_eject (int fd)
+{
+	if (fd < 0) {
+		return FALSE;
+	}
+
+#ifdef __linux__
+	{
+		int status;
+
+		status = ioctl(fd, CDROM_GET_CAPABILITY, 0);
+		if (status < 0) {
+			return FALSE;
+		}
+
+		return status & CDC_OPEN_TRAY;
+	}
+#else
+	return FALSE;
+#endif
+}
+
+/**
+ * nautilus_burn_drive_can_eject:
+ * @drive: #NautilusBurnDrive
+ *
+ * Report the whether the drive support ejections or not.
+ *
+ * Returns: %TRUE if the drive support ejections, otherwise return %FALSE.
+ **/
+gboolean
+nautilus_burn_drive_can_eject (NautilusBurnDrive *drive)
+{
+	gpointer ioctl_handle;
+	int      fd;
+	gboolean ret;
+
+	g_return_val_if_fail (drive != NULL, FALSE);
+
+	ioctl_handle = open_ioctl_handle (drive->priv->device);
+	if (ioctl_handle == INVALID_HANDLE)
+		return FALSE;
+
+	fd = get_ioctl_handle_fd (ioctl_handle);
+
+	ret = can_drive_eject (fd);
+
+	close_ioctl_handle (ioctl_handle);
+
+	return ret;
+}
Index: src/nautilus-burn-drive.h
===================================================================
--- src/nautilus-burn-drive.h	(revision 2116)
+++ src/nautilus-burn-drive.h	(working copy)
@@ -136,6 +136,8 @@
 int                   nautilus_burn_drive_get_max_speed_read       (NautilusBurnDrive       *drive);
 const int *           nautilus_burn_drive_get_write_speeds         (NautilusBurnDrive       *drive);
 
+gboolean              nautilus_burn_drive_can_eject                (NautilusBurnDrive       *drive);
+
 /* Media handling */
 
 NautilusBurnMediaType nautilus_burn_drive_get_media_type           (NautilusBurnDrive       *drive);
