diff options
author | wiz <wiz@pkgsrc.org> | 2000-06-22 00:41:17 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2000-06-22 00:41:17 +0000 |
commit | da23cba2f64b66790e2156b1e4003d6bc45ad979 (patch) | |
tree | acdafc51122245a248ba19a5fdfc974b07f3e3c1 /audio/cdparanoia/patches | |
parent | 062e544125046c2e41f94d8983a1e7762adf5e82 (diff) | |
download | pkgsrc-da23cba2f64b66790e2156b1e4003d6bc45ad979.tar.gz |
Don't dump core if device isn't recognized as valid CD-ROM drive.
Diffstat (limited to 'audio/cdparanoia/patches')
-rw-r--r-- | audio/cdparanoia/patches/patch-cf | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/audio/cdparanoia/patches/patch-cf b/audio/cdparanoia/patches/patch-cf index 1737f9111aa..9c809695bd7 100644 --- a/audio/cdparanoia/patches/patch-cf +++ b/audio/cdparanoia/patches/patch-cf @@ -1,7 +1,7 @@ -$NetBSD: patch-cf,v 1.1.1.1 2000/01/19 08:03:00 itohy Exp $ +$NetBSD: patch-cf,v 1.2 2000/06/22 00:41:18 wiz Exp $ ---- interface/scan_devices.c.orig Tue Dec 14 16:30:23 1999 -+++ interface/scan_devices.c Sat Jan 15 20:09:29 2000 +--- interface/scan_devices.c.orig Tue Dec 14 08:30:23 1999 ++++ interface/scan_devices.c Thu Jun 22 02:36:44 2000 @@ -17,6 +17,8 @@ #include "common_interface.h" #include "utils.h" @@ -172,10 +172,11 @@ $NetBSD: patch-cf,v 1.1.1.1 2000/01/19 08:03:00 itohy Exp $ d=calloc(1,sizeof(cdrom_drive)); -@@ -564,6 +610,15 @@ +@@ -564,7 +610,16 @@ /* It would seem some TOSHIBA CDROM gets things wrong */ +- if (!strncmp (p + 8, "TOSHIBA", 7) && +#ifndef TYPE_DISK +#define TYPE_DISK 0 /* direct */ +#endif @@ -185,6 +186,7 @@ $NetBSD: patch-cf,v 1.1.1.1 2000/01/19 08:03:00 itohy Exp $ +#ifndef TYPE_ROM +#define TYPE_ROM 5 /* CD-ROM */ +#endif - if (!strncmp (p + 8, "TOSHIBA", 7) && ++ if (p && !strncmp (p + 8, "TOSHIBA", 7) && !strncmp (p + 16, "CD-ROM", 6) && p[0] == TYPE_DISK) { + p[0] = TYPE_ROM; |