diff options
-rw-r--r-- | sysutils/nautilus-cd-burner/Makefile | 2 | ||||
-rw-r--r-- | sysutils/nautilus-cd-burner/files/patch-cd-drive.c | 33 | ||||
-rw-r--r-- | sysutils/nautilus-cd-burner/files/patch-cd-recorder.c | 18 |
3 files changed, 30 insertions, 23 deletions
diff --git a/sysutils/nautilus-cd-burner/Makefile b/sysutils/nautilus-cd-burner/Makefile index 63054329b..ef794f7bc 100644 --- a/sysutils/nautilus-cd-burner/Makefile +++ b/sysutils/nautilus-cd-burner/Makefile @@ -7,7 +7,7 @@ PORTNAME= nautilus-cd-burner PORTVERSION= 0.4.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= sysutils gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/0.4 diff --git a/sysutils/nautilus-cd-burner/files/patch-cd-drive.c b/sysutils/nautilus-cd-burner/files/patch-cd-drive.c index 5a878e977..9cc69f96a 100644 --- a/sysutils/nautilus-cd-burner/files/patch-cd-drive.c +++ b/sysutils/nautilus-cd-burner/files/patch-cd-drive.c @@ -1,6 +1,6 @@ --- cd-drive.c.orig Mon May 19 06:16:13 2003 -+++ cd-drive.c Wed May 21 18:21:29 2003 -@@ -40,6 +40,12 @@ ++++ cd-drive.c Thu May 22 19:10:36 2003 +@@ -40,6 +40,13 @@ #include <scsi/sg.h> #endif /* __linux__ */ @@ -8,12 +8,13 @@ +#include <sys/cdio.h> +#include <sys/cdrio.h> +#include <camlib.h> ++#include <errno.h> +#endif + #include <glib.h> #include <libgnome/gnome-i18n.h> -@@ -603,6 +609,74 @@ +@@ -603,6 +610,80 @@ } #endif /* __linux__ */ @@ -24,21 +25,25 @@ + GList *cdroms_list = NULL; + const char *dev_type = "cd"; + int fd; -+ int speed = CDR_MAX_SPEED; ++ int speed = 16; /* XXX Set the write speed to 16. */ ++ int max_speed = CDR_MAX_SPEED; + int i = 0; + + while (1) { + CDDriveType type = CDDRIVE_TYPE_CD_RECORDER; + CDDrive *cdrom; -+ gchar *dev; ++ gchar *cam_path = g_strdup_printf ("/dev/%s%dc", dev_type, i); ++ gchar *dev; + struct cam_device *cam_dev; + -+ if (!g_file_test (dev, G_FILE_TEST_EXISTS)) { ++ if (!g_file_test (cam_path, G_FILE_TEST_EXISTS)) { ++ g_free (cam_path); + break; + } + + if ((cam_dev = cam_open_spec_device (dev_type, i, O_RDWR, NULL)) == NULL) { + i++; ++ g_free (cam_path); + continue; + } + @@ -46,9 +51,11 @@ + if ((strncmp (cam_dev->sim_name, "ata", 3)) == 0) { + dev = g_strdup_printf ("/dev/a%s%dc", dev_type, i); + } else { -+ dev = g_strdup_printf ("/dev/%s%dc", dev_type, i); ++ dev = g_strdup (cam_path); + } + ++ g_free (cam_path); ++ + if ((fd = open (dev, O_RDWR, 0)) < 0) { + g_free (dev); + free (cam_dev); @@ -56,7 +63,7 @@ + continue; + } + -+ if (ioctl (fd, CDRIOCWRITESPEED, &speed) < 0) { ++ if (ioctl (fd, CDRIOCWRITESPEED, &max_speed) < 0) { + type = CDDRIVE_TYPE_CD_DRIVE; + } + @@ -64,11 +71,11 @@ + + if (type == CDDRIVE_TYPE_CD_RECORDER || recorder_only == FALSE) { + cdrom = g_new0 (CDDrive, 1); -+ cdrom->display_name = g_strdup_printf ("%s %s %s", cam_dev->inq_data.vendor, cam_dev->inq_data.product, cam_dev->inq_data.revision); ++ cdrom->display_name = g_strdup_printf ("%s %s", cam_dev->inq_data.vendor, cam_dev->inq_data.revision); + cdrom->device = g_strdup (dev); -+ cdrom->max_speed_read = CDR_MAX_SPEED; -+ cdrom->max_speed_write = CDR_MAX_SPEED; -+ cdrom->cdrecord_id = g_strdup_printf ("%d,%d,%d", cam_dev->bus_id, cam_dev->target_id, cam_dev->target_lun); ++ cdrom->max_speed_read = speed; ++ cdrom->max_speed_write = speed; ++ cdrom->cdrecord_id = g_strdup_printf ("%d,%d,%d", cam_dev->path_id, cam_dev->target_id, cam_dev->target_lun); + cdrom->type = type; + + cdroms_list = g_list_append (cdroms_list, cdrom); @@ -88,7 +95,7 @@ GList * scan_for_cdroms (gboolean recorder_only, gboolean add_image) { -@@ -611,6 +685,10 @@ +@@ -611,6 +692,10 @@ #ifdef __linux__ cdroms = linux_scan (recorder_only); diff --git a/sysutils/nautilus-cd-burner/files/patch-cd-recorder.c b/sysutils/nautilus-cd-burner/files/patch-cd-recorder.c index 39b0afb9b..c6d0b9324 100644 --- a/sysutils/nautilus-cd-burner/files/patch-cd-recorder.c +++ b/sysutils/nautilus-cd-burner/files/patch-cd-recorder.c @@ -1,5 +1,5 @@ ---- cd-recorder.c.orig Sun Apr 13 03:27:14 2003 -+++ cd-recorder.c Sun Apr 13 03:30:37 2003 +--- cd-recorder.c.orig Mon May 19 03:17:14 2003 ++++ cd-recorder.c Thu May 22 19:10:49 2003 @@ -9,10 +9,16 @@ #include <fcntl.h> #include <sys/wait.h> @@ -17,7 +17,7 @@ #include <glib.h> #include <signal.h> #include <libgnome/gnome-i18n.h> -@@ -39,9 +45,9 @@ +@@ -41,9 +47,9 @@ GMainLoop *loop; int result; int pid; @@ -29,7 +29,7 @@ gboolean changed_text; gboolean send_return; gboolean expect_cdrecord_to_die; -@@ -109,7 +115,7 @@ +@@ -112,7 +118,7 @@ { if (is_reload) { if (cdrecorder->priv->send_return) { @@ -38,7 +38,7 @@ } else { kill (cdrecorder->priv->pid, SIGUSR1); } -@@ -214,7 +220,7 @@ +@@ -221,7 +227,7 @@ #endif /* TODO: Handle errors */ if (status == G_IO_STATUS_NORMAL && !cdrecorder->priv->expect_cdrecord_to_die) { @@ -47,7 +47,7 @@ if (strstr (line, "No disk / Wrong disk!") != NULL) { g_signal_emit (G_OBJECT (cdrecorder), cd_recorder_table_signals[INSERT_CD_REQUEST], 0, -@@ -277,15 +283,15 @@ +@@ -293,15 +299,15 @@ argv[i++] = filename; argv[i++] = NULL; @@ -67,7 +67,7 @@ } g_signal_emit (G_OBJECT (cdrecorder), -@@ -309,7 +315,7 @@ +@@ -325,7 +331,7 @@ G_SPAWN_SEARCH_PATH, NULL, NULL, &cdrecorder->priv->pid, @@ -76,7 +76,7 @@ &stdout_pipe, &stderr_pipe, &error)) { -@@ -374,7 +380,7 @@ +@@ -390,7 +396,7 @@ { g_return_val_if_fail (cdrecorder->priv->result != RESULT_ERROR, NULL); @@ -85,7 +85,7 @@ } const char * -@@ -392,7 +398,7 @@ +@@ -408,7 +414,7 @@ g_return_if_fail (object != NULL); |