diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-03-01 13:48:26 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-03-01 13:48:26 +0800 |
commit | 98cc08f744da6a642a9e24ce5b6f8994d58773b1 (patch) | |
tree | f1bf880c109bffbc9b1d1d5264fc0365ce10d411 /sysutils/nautilus-cd-burner/files | |
parent | 1b2c6f7dbc8beb0e3cb0c8e06474900b2ac9bc1b (diff) | |
download | marcuscom-ports-98cc08f744da6a642a9e24ce5b6f8994d58773b1.tar marcuscom-ports-98cc08f744da6a642a9e24ce5b6f8994d58773b1.tar.gz marcuscom-ports-98cc08f744da6a642a9e24ce5b6f8994d58773b1.tar.bz2 marcuscom-ports-98cc08f744da6a642a9e24ce5b6f8994d58773b1.tar.lz marcuscom-ports-98cc08f744da6a642a9e24ce5b6f8994d58773b1.tar.xz marcuscom-ports-98cc08f744da6a642a9e24ce5b6f8994d58773b1.tar.zst marcuscom-ports-98cc08f744da6a642a9e24ce5b6f8994d58773b1.zip |
Fix an infinite loop after IOS creation, and make sure we return the
correct value for blank media type even if we don;t have DVD media
in the drive.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@3752 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/nautilus-cd-burner/files')
3 files changed, 83 insertions, 16 deletions
diff --git a/sysutils/nautilus-cd-burner/files/patch-dvd_plus_rw_utils.cpp b/sysutils/nautilus-cd-burner/files/patch-dvd_plus_rw_utils.cpp new file mode 100644 index 000000000..dd202c6fc --- /dev/null +++ b/sysutils/nautilus-cd-burner/files/patch-dvd_plus_rw_utils.cpp @@ -0,0 +1,13 @@ +--- dvd_plus_rw_utils.cpp.orig Tue Mar 1 00:44:47 2005 ++++ dvd_plus_rw_utils.cpp Tue Mar 1 00:45:05 2005 +@@ -223,8 +223,8 @@ + wait_for_unit (cmd); + } while (once--); + +- if (profile==0 || (profile&0x30)==0) // no or non-DVD media... +- return profile; ++ //if (profile==0 || (profile&0x30)==0) // no or non-DVD media... ++ //return profile; + + cmd[0] = 0x51; // READ DISC INFORMATION + cmd[8] = sizeof(disc_info); diff --git a/sysutils/nautilus-cd-burner/files/patch-make-iso.c b/sysutils/nautilus-cd-burner/files/patch-make-iso.c index 7596a0ec6..00bf95ec0 100644 --- a/sysutils/nautilus-cd-burner/files/patch-make-iso.c +++ b/sysutils/nautilus-cd-burner/files/patch-make-iso.c @@ -1,6 +1,30 @@ ---- make-iso.c.orig Mon Feb 28 19:34:57 2005 -+++ make-iso.c Mon Feb 28 19:36:39 2005 -@@ -719,6 +719,7 @@ +--- make-iso.c.orig Wed Feb 16 19:34:31 2005 ++++ make-iso.c Tue Mar 1 00:41:35 2005 +@@ -501,6 +501,10 @@ + + if (status == G_IO_STATUS_NORMAL) { + g_free (line); ++ } else if (status == G_IO_STATUS_EOF) { ++ if (mkisofs_output->debug) ++ g_print ("make_iso stdout: EOF\n"); ++ return FALSE; + } + } else if (condition & G_IO_HUP) { + if (mkisofs_output->debug) +@@ -583,6 +587,12 @@ + } + + g_free (line); ++ } else if (G_IO_STATUS_EOF) { ++ if (mkisofs_output->debug) ++ g_print ("make_iso stderr: EOF\n"); ++ nautilus_burn_progress_set_fraction (1.0); ++ g_main_loop_quit (mkisofs_output->loop); ++ return FALSE; + } + } else if (condition & G_IO_HUP) { + /* only handle the HUP when we have read all available lines of output */ +@@ -719,6 +729,7 @@ argv [i++] = "-r"; if (use_joliet) { argv [i++] = "-J"; @@ -8,7 +32,7 @@ } if (has_utf8_support) { argv [i++] = "-input-charset"; -@@ -806,6 +807,7 @@ +@@ -806,6 +817,7 @@ argv [i++] = "-r"; if (use_joliet) { argv [i++] = "-J"; diff --git a/sysutils/nautilus-cd-burner/files/patch-nautilus-burn-drive.c b/sysutils/nautilus-cd-burner/files/patch-nautilus-burn-drive.c index 3910c90f4..c2299e572 100644 --- a/sysutils/nautilus-cd-burner/files/patch-nautilus-burn-drive.c +++ b/sysutils/nautilus-cd-burner/files/patch-nautilus-burn-drive.c @@ -1,5 +1,5 @@ ---- nautilus-burn-drive.c.orig Mon Feb 28 19:51:06 2005 -+++ nautilus-burn-drive.c Mon Feb 28 20:01:09 2005 +--- nautilus-burn-drive.c.orig Tue Feb 22 19:34:17 2005 ++++ nautilus-burn-drive.c Tue Mar 1 00:46:50 2005 @@ -62,6 +62,13 @@ #define CD_ROM_SPEED 176 @@ -57,7 +57,37 @@ mmc_profile = get_mmc_profile (fd); -@@ -330,7 +350,11 @@ +@@ -303,12 +323,20 @@ + opened = nautilus_burn_drive_door_open (mmc_profile, fd); + + if (opened != FALSE) { ++#ifdef __FreeBSD__ ++ cam_close_device (cam); ++#else + close (fd); ++#endif + return NAUTILUS_BURN_MEDIA_TYPE_ERROR; + } else { + int blank, rewrite, empty; + if (get_disc_status (fd, &empty, &rewrite, &blank) == 0) { ++#ifdef __FreeBSD__ ++ cam_close_device (cam); ++#else + close (fd); ++#endif + + if (is_rewritable) + *is_rewritable = rewrite; +@@ -325,12 +353,20 @@ + else + return NAUTILUS_BURN_MEDIA_TYPE_UNKNOWN; + } ++#ifdef __FreeBSD__ ++ cam_close_device (cam); ++#else + close (fd); ++#endif + return NAUTILUS_BURN_MEDIA_TYPE_UNKNOWN; } } @@ -69,7 +99,7 @@ if (is_blank) *is_blank = mmc_profile & 0x10000; -@@ -569,11 +593,21 @@ +@@ -569,11 +605,21 @@ int secs; int mmc_profile; gint64 size; @@ -91,7 +121,7 @@ if ((fd = open (device, O_RDWR | O_EXCL | O_NONBLOCK)) < 0 && (fd = open (device, O_RDONLY | O_EXCL | O_NONBLOCK)) < 0) { if (errno == EBUSY) { -@@ -581,6 +615,7 @@ +@@ -581,6 +627,7 @@ } return NAUTILUS_BURN_MEDIA_SIZE_UNKNOWN; } @@ -99,7 +129,7 @@ mmc_profile = get_mmc_profile (fd); -@@ -603,7 +638,11 @@ +@@ -603,7 +650,11 @@ size = NAUTILUS_BURN_MEDIA_SIZE_NA; } @@ -111,7 +141,7 @@ return size; } -@@ -896,9 +935,81 @@ +@@ -896,9 +947,81 @@ #endif /* USE_HAL */ #if defined(__linux__) || defined(__FreeBSD__) @@ -134,7 +164,7 @@ + + fd = cam->fd; +#else - ++ + fd = open (device, O_RDWR|O_EXCL|O_NONBLOCK); + if (fd < 0) { + return -1; @@ -148,10 +178,10 @@ + close (fd); +#endif + max_speed = (int)floor (write_speed) / CD_ROM_SPEED; - ++ + return max_speed; +} -+ + +#if !defined(__linux) +static int +get_device_max_read_speed (char *device) @@ -162,7 +192,7 @@ +#ifdef __FreeBSD__ + struct cam_device *cam; +#endif -+ + + max_speed = -1; +#ifdef __FreeBSD__ + cam = cam_open_device (device, O_RDWR); @@ -193,7 +223,7 @@ #endif /* __linux__ || __FreeBSD__ */ #if defined (__linux__) -@@ -1111,50 +1222,6 @@ +@@ -1111,50 +1234,6 @@ } } return NULL; |