diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-08-10 11:00:16 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-08-10 11:00:16 +0800 |
commit | 55075c2c0930b35f480e1e24683cf2f37140615d (patch) | |
tree | a0b00c603688cca549bf873b0758ebbc72be0baa | |
parent | 0160d6cc5ad9c7882867610b9fea59aa8f1d4951 (diff) | |
download | marcuscom-ports-55075c2c0930b35f480e1e24683cf2f37140615d.tar marcuscom-ports-55075c2c0930b35f480e1e24683cf2f37140615d.tar.gz marcuscom-ports-55075c2c0930b35f480e1e24683cf2f37140615d.tar.bz2 marcuscom-ports-55075c2c0930b35f480e1e24683cf2f37140615d.tar.lz marcuscom-ports-55075c2c0930b35f480e1e24683cf2f37140615d.tar.xz marcuscom-ports-55075c2c0930b35f480e1e24683cf2f37140615d.tar.zst marcuscom-ports-55075c2c0930b35f480e1e24683cf2f37140615d.zip |
* Plug a file descriptor leak in n-c-b
* Fix some return types
* Fix an ioctl return check that was preventing just about anything from
working correctly
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@4460 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | sysutils/nautilus-cd-burner/Makefile | 4 | ||||
-rw-r--r-- | sysutils/nautilus-cd-burner/files/patch-nautilus-burn-drive.c | 42 |
2 files changed, 40 insertions, 6 deletions
diff --git a/sysutils/nautilus-cd-burner/Makefile b/sysutils/nautilus-cd-burner/Makefile index f36f1046a..aaaf94775 100644 --- a/sysutils/nautilus-cd-burner/Makefile +++ b/sysutils/nautilus-cd-burner/Makefile @@ -3,12 +3,12 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/sysutils/nautilus-cd-burner/Makefile,v 1.70 2005/08/06 01:59:15 marcus Exp $ +# $MCom: ports/sysutils/nautilus-cd-burner/Makefile,v 1.71 2005/08/09 23:46:44 marcus Exp $ # PORTNAME= nautilus-cd-burner PORTVERSION= 2.11.6 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/2.11 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 07b20dcce..4568f6bb9 100644 --- a/sysutils/nautilus-cd-burner/files/patch-nautilus-burn-drive.c +++ b/sysutils/nautilus-cd-burner/files/patch-nautilus-burn-drive.c @@ -1,20 +1,37 @@ --- nautilus-burn-drive.c.orig Thu Aug 4 16:23:24 2005 -+++ nautilus-burn-drive.c Tue Aug 9 19:42:32 2005 -@@ -48,6 +48,13 @@ ++++ nautilus-burn-drive.c Tue Aug 9 22:56:36 2005 +@@ -48,6 +48,14 @@ #include <sys/cdio.h> #include <sys/cdrio.h> #include <camlib.h> ++#define CDS_DISC_OK 0 +#define CDS_AUDIO 100 +#define CDS_DATA_1 101 +#define CDS_DATA_2 102 +#define CDS_MIXED 105 -+#define CDS_NO_INFO 0 ++#define CDS_NO_INFO -1 +#define CDS_XA_2_1 103 +#define CDS_XA_2_2 104 #endif /* __FreeBSD__ */ #ifdef HAVE_SYS_CDIO_H -@@ -484,7 +491,7 @@ get_disc_type (const char *dev_path) +@@ -470,11 +478,12 @@ get_disc_type (const char *dev_path) + + fd = open (dev_path, O_RDONLY|O_NONBLOCK); + if (fd < 0) { +- return -1; ++ return CDS_NO_INFO; + } + +- if (ioctl (fd, CDIOREADTOCHEADER, &header) == 0) { +- return -1; ++ if (ioctl (fd, CDIOREADTOCHEADER, &header) != CDS_DISC_OK) { ++ close (fd); ++ return CDS_NO_INFO; + } + + type = CDS_DATA_1; +@@ -484,7 +493,7 @@ get_disc_type (const char *dev_path) entry.track++) { entry.address_format = CD_LBA_FORMAT; if (ioctl (fd, CDIOREADTOCENTRY, &entry) == 0) { @@ -23,3 +40,20 @@ type = CDS_AUDIO; break; } +@@ -506,6 +515,7 @@ get_disc_type (const char *dev_path) + } + + #endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)*/ ++ close (fd); + return type; + #elif defined(__linux__) + fd = open (dev_path, O_RDONLY|O_NONBLOCK); +@@ -627,8 +637,6 @@ nautilus_burn_drive_get_media_type_from_ + + return NAUTILUS_BURN_MEDIA_TYPE_UNKNOWN; + } +- } else { +- g_warning ("Could not read MMC profile of %s", device); + } + + close_ioctl_handle (ioctl_handle); |