pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/cdrtools isoinfo extracts files at the painfu...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0d631a4a1ad0
branches: trunk
changeset: 517998:0d631a4a1ad0
user: dsainty <dsainty%pkgsrc.org@localhost>
date: Mon Aug 28 13:56:22 2006 +0000
description:
isoinfo extracts files at the painful rate of 1 sector at a time. This patch
speeds up file extraction significantly by using a much larger buffer.
Also avoid crashing under NetBSD by not making the assumption that
fclose(NULL) is legal.
Bump PKGREVISION to 4.
diffstat:
sysutils/cdrtools/Makefile | 4 +-
sysutils/cdrtools/distinfo | 3 +-
sysutils/cdrtools/patches/patch-cj | 49 ++++++++++++++++++++++++++++++++++++++
3 files changed, 53 insertions(+), 3 deletions(-)
diffs (80 lines):
diff -r 94217d58b53f -r 0d631a4a1ad0 sysutils/cdrtools/Makefile
--- a/sysutils/cdrtools/Makefile Mon Aug 28 13:27:41 2006 +0000
+++ b/sysutils/cdrtools/Makefile Mon Aug 28 13:56:22 2006 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2006/05/27 10:55:52 drochner Exp $
+# $NetBSD: Makefile,v 1.8 2006/08/28 13:56:22 dsainty Exp $
DISTNAME= cdrtools-2.01
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.berlios.de/pub/cdrecord/
EXTRACT_SUFX= .tar.bz2
diff -r 94217d58b53f -r 0d631a4a1ad0 sysutils/cdrtools/distinfo
--- a/sysutils/cdrtools/distinfo Mon Aug 28 13:27:41 2006 +0000
+++ b/sysutils/cdrtools/distinfo Mon Aug 28 13:56:22 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2006/05/27 10:55:52 drochner Exp $
+$NetBSD: distinfo,v 1.4 2006/08/28 13:56:22 dsainty Exp $
SHA1 (cdrtools-2.01.tar.bz2) = f94cfe51dd512d4e0b9106b986bde12d4f7967ce
RMD160 (cdrtools-2.01.tar.bz2) = b34a8b81b21cc8ed1927f34e44130513d2ee0407
@@ -24,3 +24,4 @@
SHA1 (patch-cg) = 945db00ff13460dce1f9ce38e8ff29ab7cbd1f85
SHA1 (patch-ch) = 1060be9a0c7371ad52b23b22f3b5dcf09cb99f7f
SHA1 (patch-ci) = 2b6aee7cd9acb06b7190f068e4510ace1d8715a3
+SHA1 (patch-cj) = 209b87149e6660637dc58b561a83f6db56c645d2
diff -r 94217d58b53f -r 0d631a4a1ad0 sysutils/cdrtools/patches/patch-cj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/cdrtools/patches/patch-cj Mon Aug 28 13:56:22 2006 +0000
@@ -0,0 +1,49 @@
+$NetBSD: patch-cj,v 1.1 2006/08/28 13:56:22 dsainty Exp $
+
+isoinfo extracts files at the painful rate of 1 sector at a time. This patch
+speeds up file extraction significantly by using a much larger buffer.
+
+Also avoid crashing under NetBSD by not making the assumption that
+fclose(NULL) is legal.
+
+--- mkisofs/diag/isoinfo.c.orig 2005-05-16 02:21:05.000000000 +1200
++++ mkisofs/diag/isoinfo.c 2006-07-15 18:33:06.000000000 +1200
+@@ -644,7 +644,7 @@
+ struct iso_directory_record *idr;
+ {
+ int extent, len, tlen;
+- unsigned char buff[2048];
++ unsigned char buff[204800];
+
+ #if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__EMX__) || defined(__DJGPP__)
+ setmode(fileno(stdout), O_BINARY);
+@@ -654,16 +654,15 @@
+ len = isonum_733((unsigned char *)idr->size);
+
+ while (len > 0) {
+-#ifdef USE_SCG
+- readsecs(extent - sector_offset, buff, ISO_BLOCKS(sizeof (buff)));
+ tlen = (len > sizeof (buff) ? sizeof (buff) : len);
++#ifdef USE_SCG
++ readsecs(extent - sector_offset, buff, ISO_BLOCKS(tlen));
+ #else
+ lseek(fileno(infile), ((off_t)(extent - sector_offset)) << 11, SEEK_SET);
+- tlen = (len > sizeof (buff) ? sizeof (buff) : len);
+ read(fileno(infile), buff, tlen);
+ #endif
+ len -= tlen;
+- extent++;
++ extent += ISO_BLOCKS(tlen);
+ write(STDOUT_FILENO, buff, tlen);
+ }
+ }
+@@ -1252,7 +1252,8 @@
+ td = td->next;
+ }
+
+- fclose(infile);
++ if (infile != NULL)
++ fclose(infile);
+ return (0);
+ }
+
Home |
Main Index |
Thread Index |
Old Index