diff options
author | Luis Medinas <metalgod@gentoo.org> | 2005-08-17 21:40:03 +0000 |
---|---|---|
committer | Luis Medinas <metalgod@gentoo.org> | 2005-08-17 21:40:03 +0000 |
commit | 833cae4d6335ec5ccd94cd4e45eff3eac3041a75 (patch) | |
tree | 095caef6174cf833b09cf0afcb437bf0edb44aec /app-cdr | |
parent | New release (diff) | |
download | historical-833cae4d6335ec5ccd94cd4e45eff3eac3041a75.tar.gz historical-833cae4d6335ec5ccd94cd4e45eff3eac3041a75.tar.bz2 historical-833cae4d6335ec5ccd94cd4e45eff3eac3041a75.zip |
New cdrtools development version. Added a patch for scsi scanning.
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'app-cdr')
-rw-r--r-- | app-cdr/cdrtools/ChangeLog | 8 | ||||
-rw-r--r-- | app-cdr/cdrtools/Manifest | 11 | ||||
-rw-r--r-- | app-cdr/cdrtools/cdrtools-2.01.01_alpha03.ebuild | 124 | ||||
-rw-r--r-- | app-cdr/cdrtools/files/cdrtools-2.01a32-scan.patch | 429 | ||||
-rw-r--r-- | app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03 | 2 |
5 files changed, 569 insertions, 5 deletions
diff --git a/app-cdr/cdrtools/ChangeLog b/app-cdr/cdrtools/ChangeLog index 7a3d1e02f8e4..9d8cb584faa0 100644 --- a/app-cdr/cdrtools/ChangeLog +++ b/app-cdr/cdrtools/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-cdr/cdrtools # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/ChangeLog,v 1.123 2005/08/07 00:24:25 pylon Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/ChangeLog,v 1.124 2005/08/17 21:40:03 metalgod Exp $ + +*cdrtools-2.01.01_alpha03 (17 Aug 2005) + + 17 Aug 2005; Luis Medinas <metalgod@gentoo.org> + +files/cdrtools-2.01a32-scan.patch, +cdrtools-2.01.01_alpha03.ebuild: + New cdrtools development version. Added a patch for scsi scanning. 07 Aug 2005; Lars Weiler <pylon@gentoo.org> cdrtools-2.01.01_alpha01-r2.ebuild: diff --git a/app-cdr/cdrtools/Manifest b/app-cdr/cdrtools/Manifest index 48070f3a055b..5d2704181561 100644 --- a/app-cdr/cdrtools/Manifest +++ b/app-cdr/cdrtools/Manifest @@ -1,10 +1,13 @@ -MD5 fb7c98c4ada508b4870303b6cf6f327c metadata.xml 450 -MD5 d9972aea9d6a6cb79f2c3a260e48efe3 ChangeLog 18236 +MD5 79f63cceb8d18ec387a194c2be1448f1 ChangeLog 18472 MD5 5a2a9ad0ab6a40d5ee27662bf265bc41 cdrtools-2.01-r1.ebuild 2830 -MD5 b99aca1cac4436f277c4583809661008 cdrtools-2.01.01_alpha01-r2.ebuild 3614 MD5 7851326782af5e5357d8e24d8decee25 cdrtools-2.01-r3.ebuild 3608 +MD5 b99aca1cac4436f277c4583809661008 cdrtools-2.01.01_alpha01-r2.ebuild 3614 +MD5 fb7c98c4ada508b4870303b6cf6f327c metadata.xml 450 +MD5 235a86cba389608b079722c37c73a8e5 cdrtools-2.01.01_alpha03.ebuild 3660 MD5 3b1ffea11e1653b7b16c2c89597d1c5a files/cdrtools-2.01-scsi-remote.patch 938 -MD5 1a596f5cae257e97c559716336b30e5b files/mkisofs-iconv-10.patch 16986 MD5 c848b3b9b6921469483a22caa0fd40c3 files/digest-cdrtools-2.01-r1 67 MD5 8165b59a7b14939c58a88ca1f272cad4 files/digest-cdrtools-2.01-r3 147 MD5 0e8283f78b14f3ead0e78d197e1d5ed1 files/digest-cdrtools-2.01.01_alpha01-r2 153 +MD5 1a596f5cae257e97c559716336b30e5b files/mkisofs-iconv-10.patch 16986 +MD5 5a55a164c3584a99297b99bf7975c1d6 files/cdrtools-2.01a32-scan.patch 12397 +MD5 a5a56cb102587325619a4d3a610d0085 files/digest-cdrtools-2.01.01_alpha03 153 diff --git a/app-cdr/cdrtools/cdrtools-2.01.01_alpha03.ebuild b/app-cdr/cdrtools/cdrtools-2.01.01_alpha03.ebuild new file mode 100644 index 000000000000..f26b14fc80e1 --- /dev/null +++ b/app-cdr/cdrtools/cdrtools-2.01.01_alpha03.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/cdrtools-2.01.01_alpha03.ebuild,v 1.1 2005/08/17 21:40:03 metalgod Exp $ + +inherit eutils gnuconfig toolchain-funcs flag-o-matic + +MY_CRYPT_VERS="2.01-encrypt-1.0rc1" + +DESCRIPTION="A set of tools for CD recording, including cdrecord" +HOMEPAGE="http://cdrecord.berlios.de/old/private/cdrecord.html" +SRC_URI="ftp://ftp.berlios.de/pub/cdrecord/alpha/${P/_alpha/a}.tar.bz2 + on-the-fly-crypt? ( http://burbon04.gmxhome.de/linux/files/${PN}-${MY_CRYPT_VERS}.diff.gz )" + +LICENSE="GPL-2 freedist" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~s390 ~sparc ~x86" +IUSE="on-the-fly-crypt unicode" + +DEPEND="virtual/libc + !app-cdr/dvdrtools" +RDEPEND="on-the-fly-crypt? ( sys-fs/cryptsetup )" +PROVIDE="virtual/cdrtools" + +S=${WORKDIR}/${PN}-2.01.01 + +src_unpack() { + unpack ${A} + cd ${S} + + # CAN-2004-0806 - Bug 63187 + epatch ${FILESDIR}/${PN}-2.01-scsi-remote.patch + + epatch ${FILESDIR}/${PN}-2.01a32-scan.patch + + # UTF-8 support, see Bug #28369 + if use unicode; then + epatch ${FILESDIR}/mkisofs-iconv-10.patch || die "Can't apply utf-8 patch" + fi + + # Add support for On-The-Fly AES encryption + # http://burbon04.gmxhome.de/linux/CDREncryption.html + if use on-the-fly-crypt; then + epatch ${DISTDIR}/${PN}-${MY_CRYPT_VERS}.diff.gz || die "Can't apply encryption patch" + fi + + cd ${S}/DEFAULTS + use ppc-macos && MYARCH="mac-os10" || MYARCH="linux" + sed -i "s:/opt/schily:/usr:g" Defaults.${MYARCH} + sed -i "s:/usr/src/linux/include::g" Defaults.${MYARCH} + + cd ${S}/librscg + sed -i "s:/opt/schily:/usr:g" scsi-remote.c + + cd ${S}/RULES + ln -sf i386-linux-cc.rul x86_64-linux-cc.rul + ln -sf i386-linux-gcc.rul x86_64-linux-gcc.rul + ln -sf ppc-linux-cc.rul ppc64-linux-cc.rul + ln -sf mips-linux-cc.rul mips64-linux-cc.rul +} + +src_compile() { + gnuconfig_update + + use unicode && append-flags "-finput-charset=ISO-8859-1 -fexec-charset=UTF-8" + + emake CC="$(tc-getCC) -D__attribute_const__=const" COPTX="${CFLAGS}" CPPOPTX="${CPPFLAGS}" LDOPTX="${LDFLAGS}" || die +} + +src_install() { + cd ${S} + + dobin cdda2wav/OBJ/*-*-cc/cdda2wav || die "cdda2wav" + dobin cdrecord/OBJ/*-*-cc/cdrecord || die "cdrecord" + dobin mkisofs/OBJ/*-*-cc/mkisofs || die "mkisofs" + dobin readcd/OBJ/*-*-cc/readcd || die "readcd" + dosbin rscsi/OBJ/*-*-cc/rscsi || die "rscsi" + + insinto /usr/include + doins incs/*-*-cc/align.h incs/*-*-cc/avoffset.h incs/*-*-cc/xconfig.h || die "include" + + cd mkisofs/diag/OBJ/*-*-cc + dobin devdump isodump isoinfo isovfy || die "dobin" + + cd ${S} + insinto /etc/default + doins rscsi/rscsi.dfl + doins cdrecord/cdrecord.dfl + + cd ${S}/libs/*-*-cc + dolib.a *.a || die "dolib failed" + + cd ${S} + insinto /usr/include/scsilib + doins include/*.h + insinto /usr/include/scsilib/scg + doins include/scg/*.h + + cd ${S} + dodoc ABOUT Changelog README README.{ATAPI,audio,cdplus,cdrw,cdtext,clone,copy,DiskT@2,linux,linux-shm,multi,parallel,raw,rscsi,sony,verify} START + doman */*.1 + doman */*.8 + + cd ${S}/doc + docinto print + dodoc *.ps +} + +pkg_postinst() { + einfo "Note the special license on cdrecord/cdrecord.c starting from line 4648." + if use ppc-macos ; then + einfo + einfo "Darwin/OS X use the following device names:" + einfo + einfo "CD burners: (probably) ./cdrecord dev=IOCompactDiscServices" + einfo + einfo "DVD burners: (probably) ./cdrecord dev=IODVDServices" + einfo + else + echo + einfo "The command line option 'dev=/dev/hdX' (X is the name of your drive)" + einfo "should be used for IDE CD writers. And make sure that the permissions" + einfo "on this device are set properly and your user is in the correct groups." + fi +} diff --git a/app-cdr/cdrtools/files/cdrtools-2.01a32-scan.patch b/app-cdr/cdrtools/files/cdrtools-2.01a32-scan.patch new file mode 100644 index 000000000000..59ad401abc9f --- /dev/null +++ b/app-cdr/cdrtools/files/cdrtools-2.01a32-scan.patch @@ -0,0 +1,429 @@ +--- cdrtools-2.01/libscg/scsi-linux-sg.c.scan 2004-09-22 12:57:24.313986568 +0200 ++++ cdrtools-2.01/libscg/scsi-linux-sg.c 2004-09-22 12:57:24.327984440 +0200 +@@ -287,6 +287,8 @@ + return (0); + } + ++#include <glob.h> ++ + LOCAL int + scgo_open(scgp, device) + SCSI *scgp; +@@ -301,8 +303,9 @@ + register int t; + register int l; + register int nopen = 0; +- char devname[64]; +- BOOL use_ata = FALSE; ++ char *devname; ++ BOOL use_ata = FALSE; ++ glob_t globbuf; + + if (busno >= MAX_SCG || tgt >= MAX_TGT || tlun >= MAX_LUN) { + errno = EINVAL; +@@ -383,103 +386,91 @@ + * look silly but there may be users that did boot from a SCSI hdd + * and connected 4 CD/DVD writers to both IDE cables in the PC. + */ +- if (use_ata) for (i = 0; i <= 25; i++) { +- js_snprintf(devname, sizeof (devname), "/dev/hd%c", i+'a'); +- /* O_NONBLOCK is dangerous */ +- f = open(devname, O_RDWR | O_NONBLOCK); +- if (f < 0) { +- /* +- * Set up error string but let us clear it later +- * if at least one open succeeded. +- */ +- if (scgp->errstr) +- js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, +- "Cannot open '/dev/hd*'"); +- if (errno != ENOENT && errno != ENXIO && errno != ENODEV) { ++ if (use_ata) { ++ glob("/dev/hd[a-z]", GLOB_NOSORT, NULL, &globbuf); ++ ++ for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) { ++ devname = globbuf.gl_pathv[i]; ++ f = open(devname, O_RDWR | O_NONBLOCK); ++ if (f < 0) { ++ /* ++ * Set up error string but let us clear it later ++ * if at least one open succeeded. ++ */ + if (scgp->errstr) + js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, +- "Cannot open '%s'", devname); +- return (0); +- } +- } else { +- int iparm; +- +- if (ioctl(f, SG_GET_TIMEOUT, &iparm) < 0) { +- if (scgp->errstr) +- js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, +- "SCSI unsupported with '/dev/hd*'"); +- close(f); +- continue; ++ "Cannot open '/dev/hd*'"); ++ if (errno != ENOENT && errno != ENXIO && errno != ENODEV && errno != EACCES) { ++ if (scgp->errstr) ++ js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, ++ "Cannot open '%s'", devname); ++ globfree(&globbuf); ++ return (0); ++ } ++ } else { ++ int iparm; ++ ++ if (ioctl(f, SG_GET_TIMEOUT, &iparm) < 0) { ++ if (scgp->errstr) ++ js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, ++ "SCSI unsupported with '/dev/hd*'"); ++ close(f); ++ continue; ++ } ++ sg_clearnblock(f); /* Be very proper about this */ ++ if (sg_setup(scgp, f, busno, tgt, tlun, devname[7]-'a')) { ++ globfree(&globbuf); ++ return (++nopen); ++ } ++ if (busno < 0 && tgt < 0 && tlun < 0) ++ nopen++; + } +- sg_clearnblock(f); /* Be very proper about this */ +- if (sg_setup(scgp, f, busno, tgt, tlun, i)) +- return (++nopen); +- if (busno < 0 && tgt < 0 && tlun < 0) +- nopen++; + } ++ globfree(&globbuf); + } + if (use_ata && nopen == 0) + return (0); + if (nopen > 0 && scgp->errstr) + scgp->errstr[0] = '\0'; + +- if (nopen == 0) for (i = 0; i < 32; i++) { +- js_snprintf(devname, sizeof (devname), "/dev/sg%d", i); +- /* O_NONBLOCK is dangerous */ +- f = open(devname, O_RDWR | O_NONBLOCK); +- if (f < 0) { +- /* +- * Set up error string but let us clear it later +- * if at least one open succeeded. +- */ +- if (scgp->errstr) +- js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, +- "Cannot open '/dev/sg*'"); +- if (errno != ENOENT && errno != ENXIO && errno != ENODEV) { ++ if (nopen == 0) { ++ glob("/dev/scd[0-9]", GLOB_NOSORT, NULL, &globbuf); ++ glob("/dev/scd[0-9][0-9]", GLOB_NOSORT|GLOB_APPEND, NULL, &globbuf); ++ /*glob("/dev/sg[a-z]", GLOB_NOSORT|GLOB_APPEND, NULL, &globbuf);*/ ++ ++ for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) { ++ devname = globbuf.gl_pathv[i]; ++ ++ f = open(devname, O_RDWR | O_NONBLOCK); ++ if (f < 0) { ++ /* ++ * Set up error string but let us clear it later ++ * if at least one open succeeded. ++ */ + if (scgp->errstr) + js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, +- "Cannot open '%s'", devname); +- return (0); ++ "Cannot open '/dev/scd*'"); ++ if (errno != ENOENT && errno != ENXIO && errno != ENODEV) { ++ if (scgp->errstr) ++ js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, ++ "Cannot open '%s'", devname); ++ globfree(&globbuf); ++ return (0); ++ } ++ } else { ++ sg_clearnblock(f); /* Be very proper about this */ ++ if (sg_setup(scgp, f, busno, tgt, tlun, -1)) { ++ globfree(&globbuf); ++ return (++nopen); ++ } ++ if (busno < 0 && tgt < 0 && tlun < 0) ++ nopen++; + } +- } else { +- sg_clearnblock(f); /* Be very proper about this */ +- if (sg_setup(scgp, f, busno, tgt, tlun, -1)) +- return (++nopen); +- if (busno < 0 && tgt < 0 && tlun < 0) +- nopen++; + } + } + if (nopen > 0 && scgp->errstr) + scgp->errstr[0] = '\0'; + +- if (nopen == 0) for (i = 0; i <= 25; i++) { +- js_snprintf(devname, sizeof (devname), "/dev/sg%c", i+'a'); +- /* O_NONBLOCK is dangerous */ +- f = open(devname, O_RDWR | O_NONBLOCK); +- if (f < 0) { +- /* +- * Set up error string but let us clear it later +- * if at least one open succeeded. +- */ +- if (scgp->errstr) +- js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, +- "Cannot open '/dev/sg*'"); +- if (errno != ENOENT && errno != ENXIO && errno != ENODEV) { +- if (scgp->errstr) +- js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, +- "Cannot open '%s'", devname); +- return (0); +- } +- } else { +- sg_clearnblock(f); /* Be very proper about this */ +- if (sg_setup(scgp, f, busno, tgt, tlun, -1)) +- return (++nopen); +- if (busno < 0 && tgt < 0 && tlun < 0) +- nopen++; +- } +- } +- if (nopen > 0 && scgp->errstr) +- scgp->errstr[0] = '\0'; + + openbydev: + if (device != NULL && *device != '\0') { +--- cdrtools-2.01/libscg/scsi-linux-ata.c.scan 2004-06-12 12:48:12.000000000 +0200 ++++ cdrtools-2.01/libscg/scsi-linux-ata.c 2004-09-22 12:57:24.330983984 +0200 +@@ -267,7 +267,7 @@ + starget, + slun; + +- f = open(device, O_RDONLY | O_NONBLOCK); ++ f = open(device, O_RDWR | O_NONBLOCK); + + if (f < 0) { + if (scgp->errstr) +@@ -283,6 +283,9 @@ + return (nopen); + } + ++#include <glob.h> ++ ++ + LOCAL int + scan_internal(scgp, nopen) + SCSI *scgp; +@@ -293,118 +296,62 @@ + int schilly_bus, + target, + lun; +- char device[128]; ++ char *device; ++ glob_t globbuf; ++ + /* + * try always with devfs + * unfortunatelly the solution with test of existing + * of '/dev/.devfsd' don't work, because it root.root 700 + * and i don't like run suid root + */ +- BOOL DEVFS = TRUE; ++ BOOL DEVFS = FALSE; + +- if (DEVFS) { +- for (i = 0; ; i++) { +- sprintf(device, "/dev/cdroms/cdrom%i", i); +- if ((f = open(device, O_RDONLY | O_NONBLOCK)) < 0) { +- if (errno != ENOENT && errno != ENXIO && errno != ENODEV && errno != EACCES) { +- if (scgp->debug > 4) { +- js_fprintf((FILE *) scgp->errfile, +- "try open(%s) return %i, errno %i, cancel\n", device, f, errno); +- } +- return (-2); +- } else if (errno == ENOENT || errno == ENODEV) { +- if (scgp->debug > 4) { +- js_fprintf((FILE *) scgp->errfile, +- "try open(%s) return %i, errno %i\n", device, f, errno); +- } +- if (0 == i) { +- DEVFS = FALSE; +- if (scgp->debug > 4) { +- js_fprintf((FILE *) scgp->errfile, +- "DEVFS not detected, continuing with old dev\n"); +- } +- } +- break; +- } ++ glob("/dev/cdroms/cdrom*", ++ GLOB_NOSORT, ++ NULL, &globbuf); ++ glob("/dev/hd[a-z]", ++ GLOB_NOSORT|GLOB_APPEND, ++ NULL, &globbuf); ++ /*glob("/dev/scd*", ++ GLOB_NOSORT|GLOB_APPEND, ++ NULL, &globbuf);*/ ++ ++ for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) { ++ device = globbuf.gl_pathv[i]; ++ if ((f = open(device, O_RDWR | O_NONBLOCK)) < 0) { ++ if (errno != ENOENT && errno != ENXIO && errno != ENODEV && errno != EACCES) { + if (scgp->debug > 4) { +- if (errno == EACCES) { +- js_fprintf((FILE *) scgp->errfile, +- "errno (EACCESS), you don't have the needed rights for %s\n", +- device); +- } + js_fprintf((FILE *) scgp->errfile, +- "try open(%s) return %i, errno %i, trying next cdrom\n", +- device, f, errno); ++ "try open(%s) return %i, errno %i, cancel\n", device, f, errno); + } +- } else { +- if (scgp->debug > 4) { ++ globfree(&globbuf); ++ return (-2); ++ } ++ if (scgp->debug > 4) { ++ if (errno == EACCES) { + js_fprintf((FILE *) scgp->errfile, +- "try open(%s) return %i errno %i calling sg_mapdev(...)\n", +- device, f, errno); +- } +- if (sg_amapdev(scgp, f, device, &schilly_bus, &target, &lun)) { +- (++(*nopen)); +- } else { +- close(f); ++ "errno (EACCESS), you don't have the needed rights for %s\n", ++ device); + } ++ js_fprintf((FILE *) scgp->errfile, ++ "try open(%s) return %i, errno %i, trying next cdrom\n", ++ device, f, errno); + } +- } +- } +- if (!DEVFS) { +- /* for /dev/sr0 - /dev/sr? */ +- for (i = 0; ; i++) { +- sprintf(device, "/dev/sr%i", i); +- if ((f = open(device, O_RDONLY | O_NONBLOCK)) < 0) { +- if (errno != ENOENT && errno != ENXIO && errno != ENODEV && errno != EACCES) { +- if (scgp->debug > 4) { +- js_fprintf((FILE *) scgp->errfile, +- "try open(%s) return %i, errno %i, cancel\n", +- device, f, errno); +- } +- return (-2); +- } else if (errno == ENOENT || errno == ENODEV) { +- break; +- } +- } else { +- if (sg_amapdev(scgp, f, device, &schilly_bus, &target, &lun)) { +- (++(*nopen)); +- } else { +- close(f); +- } ++ } else { ++ if (scgp->debug > 4) { ++ js_fprintf((FILE *) scgp->errfile, ++ "try open(%s) return %i errno %i calling sg_mapdev(...)\n", ++ device, f, errno); + } +- } +- +- /* for /dev/hda - /dev/hdz */ +- for (i = 'a'; i <= 'z'; i++) { +- sprintf(device, "/dev/hd%c", i); +- if ((f = open(device, O_RDONLY | O_NONBLOCK)) < 0) { +- if (errno != ENOENT && errno != ENXIO && errno != EACCES) { +- if (scgp->debug > 4) { +- js_fprintf((FILE *) scgp->errfile, +- "try open(%s) return %i, errno %i, cancel\n", +- device, f, errno); +- } +- return (-2); +- } else if (errno == ENOENT || errno == ENODEV) { +- break; +- } ++ if (sg_amapdev(scgp, f, device, &schilly_bus, &target, &lun)) { ++ (++(*nopen)); + } else { +- /* ugly hack, make better, when you can. Alex */ +- if (0 > ioctl(f, CDROM_DRIVE_STATUS, CDSL_CURRENT)) { +- if (scgp->debug > 4) { +- js_fprintf((FILE *) scgp->errfile, +- "%s is not a cdrom, skipping\n", +- device); +- } +- close(f); +- } else if (sg_amapdev(scgp, f, device, &schilly_bus, &target, &lun)) { +- (++(*nopen)); +- } else { +- close(f); +- } ++ close(f); + } + } + } ++ globfree(&globbuf); + return (0); + } + +--- cdrtools-2.01/libscg/scsi-linux-pg.c.scan 2004-01-15 01:54:36.000000000 +0100 ++++ cdrtools-2.01/libscg/scsi-linux-pg.c 2004-09-22 12:59:04.107815600 +0200 +@@ -130,6 +130,8 @@ + return (0); + } + ++#include <glob.h> ++ + LOCAL int + scgo_open(scgp, device) + SCSI *scgp; +@@ -146,6 +148,8 @@ + #endif + register int nopen = 0; + char devname[32]; ++ glob_t globbuf; ++ int i; + + if (busno >= MAX_SCG || tgt >= MAX_TGT || tlun >= MAX_LUN) { + errno = EINVAL; +@@ -217,10 +221,14 @@ + scglocal(scgp)->scgfiles[busno][tgt][tlun] = f; + return (1); + } else { ++ const char *dev; + tlun = 0; +- for (tgt = 0; tgt < MAX_TGT; tgt++) { +- js_snprintf(devname, sizeof (devname), "/dev/pg%d", tgt); +- f = open(devname, O_RDWR | O_NONBLOCK); ++ glob("/dev/pg[0-9]", GLOB_NOSORT, NULL, &globbuf); ++ glob("/dev/pg[0-9][0-9]", GLOB_NOSORT|GLOB_APPEND, NULL, &globbuf); ++ for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) { ++ dev = globbuf.gl_pathv[i]; ++ tgt = atoi(&dev[7]); ++ f = open(dev, O_RDWR | O_NONBLOCK); + if (f < 0) { + /* + * Set up error string but let us clear it later +@@ -232,7 +240,8 @@ + if (errno != ENOENT && errno != ENXIO && errno != ENODEV) { + if (scgp->errstr) + js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, +- "Cannot open '%s'", devname); ++ "Cannot open '%s'", dev); ++ globfree(&globbuf); + return (0); + } + } else { +@@ -240,6 +249,8 @@ + nopen++; + } + } ++ globfree(&globbuf); ++ + } + if (nopen > 0 && scgp->errstr) + scgp->errstr[0] = '\0'; diff --git a/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03 b/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03 new file mode 100644 index 000000000000..5e5a8969111b --- /dev/null +++ b/app-cdr/cdrtools/files/digest-cdrtools-2.01.01_alpha03 @@ -0,0 +1,2 @@ +MD5 6c5683a6f85c89cc163307a5e434086c cdrtools-2.01.01a03.tar.bz2 1423541 +MD5 785184b45952798c72b26e3da9db0e0f cdrtools-2.01-encrypt-1.0rc1.diff.gz 25384 |