diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-03-12 14:03:38 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-03-12 14:03:38 +0800 |
commit | 0afc8907bb0d7742940551ae7228711a48c0cccf (patch) | |
tree | ff51d5a9e47532a588ad59f44cfee5990916b58a | |
parent | edc794b85d054027d9e759d4631c1b7243007850 (diff) | |
download | marcuscom-ports-0afc8907bb0d7742940551ae7228711a48c0cccf.tar marcuscom-ports-0afc8907bb0d7742940551ae7228711a48c0cccf.tar.gz marcuscom-ports-0afc8907bb0d7742940551ae7228711a48c0cccf.tar.bz2 marcuscom-ports-0afc8907bb0d7742940551ae7228711a48c0cccf.tar.lz marcuscom-ports-0afc8907bb0d7742940551ae7228711a48c0cccf.tar.xz marcuscom-ports-0afc8907bb0d7742940551ae7228711a48c0cccf.tar.zst marcuscom-ports-0afc8907bb0d7742940551ae7228711a48c0cccf.zip |
Don't pass O_NONBLOCK to open() when opening the CD-ROM device. And if
that open fails, print a warning with the failure.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@3924 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | audio/gnome-media/files/patch-gnome-cd_cdrom.c | 17 | ||||
-rw-r--r-- | audio/gnomemedia2/files/patch-gnome-cd_cdrom.c | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/audio/gnome-media/files/patch-gnome-cd_cdrom.c b/audio/gnome-media/files/patch-gnome-cd_cdrom.c new file mode 100644 index 000000000..65322e75f --- /dev/null +++ b/audio/gnome-media/files/patch-gnome-cd_cdrom.c @@ -0,0 +1,17 @@ +--- gnome-cd/cdrom.c.orig Sat Mar 12 01:00:51 2005 ++++ gnome-cd/cdrom.c Sat Mar 12 01:02:57 2005 +@@ -358,9 +358,14 @@ cdrom_open_dev (GnomeCDRom *cdrom, + { + if (cdrom->priv->open_count++ == 0) { + cdrom->fd = open ( ++#if defined(__FreeBSD__) ++ cdrom->priv->device, O_RDONLY); ++#else + cdrom->priv->device, O_RDONLY | O_NONBLOCK); ++#endif + + if (cdrom->fd < 0) { ++ g_warning ("XXX: Failed to open %s: %s", cdrom->priv->device, strerror(errno)); + if (errno == EACCES && error != NULL) { + *error = g_error_new ( + GNOME_CDROM_ERROR, diff --git a/audio/gnomemedia2/files/patch-gnome-cd_cdrom.c b/audio/gnomemedia2/files/patch-gnome-cd_cdrom.c new file mode 100644 index 000000000..65322e75f --- /dev/null +++ b/audio/gnomemedia2/files/patch-gnome-cd_cdrom.c @@ -0,0 +1,17 @@ +--- gnome-cd/cdrom.c.orig Sat Mar 12 01:00:51 2005 ++++ gnome-cd/cdrom.c Sat Mar 12 01:02:57 2005 +@@ -358,9 +358,14 @@ cdrom_open_dev (GnomeCDRom *cdrom, + { + if (cdrom->priv->open_count++ == 0) { + cdrom->fd = open ( ++#if defined(__FreeBSD__) ++ cdrom->priv->device, O_RDONLY); ++#else + cdrom->priv->device, O_RDONLY | O_NONBLOCK); ++#endif + + if (cdrom->fd < 0) { ++ g_warning ("XXX: Failed to open %s: %s", cdrom->priv->device, strerror(errno)); + if (errno == EACCES && error != NULL) { + *error = g_error_new ( + GNOME_CDROM_ERROR, |