summaryrefslogtreecommitdiff
path: root/sysutils/mtools
diff options
context:
space:
mode:
authoris <is@pkgsrc.org>2000-12-07 14:11:36 +0000
committeris <is@pkgsrc.org>2000-12-07 14:11:36 +0000
commiteb51065b12fe901788733aa8b717cdc539c9a3cf (patch)
tree4d4aff0e0e65f12abc3d72a3c8d672ca2de0b354 /sysutils/mtools
parent5ec6d64f713e5b7954c63ed1b24411f1f3fe4e68 (diff)
downloadpkgsrc-eb51065b12fe901788733aa8b717cdc539c9a3cf.tar.gz
Fix problem with sector sizes > 1024 bytes, creating version 3.9.5nb1.
Diffstat (limited to 'sysutils/mtools')
-rw-r--r--sysutils/mtools/Makefile3
-rw-r--r--sysutils/mtools/patches/patch-af40
2 files changed, 42 insertions, 1 deletions
diff --git a/sysutils/mtools/Makefile b/sysutils/mtools/Makefile
index cad294db358..f53a9002d9b 100644
--- a/sysutils/mtools/Makefile
+++ b/sysutils/mtools/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.19 2000/09/26 13:46:34 agc Exp $
+# $NetBSD: Makefile,v 1.20 2000/12/07 14:11:36 is Exp $
#
DISTNAME= mtools-3.9.5
+PKGNAME= mtools-3.9.5nb1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.tux.org/pub/tux/knaff/mtools/
diff --git a/sysutils/mtools/patches/patch-af b/sysutils/mtools/patches/patch-af
new file mode 100644
index 00000000000..563ca9ecf05
--- /dev/null
+++ b/sysutils/mtools/patches/patch-af
@@ -0,0 +1,40 @@
+$NetBSD: patch-af,v 1.1 2000/12/07 14:11:37 is Exp $
+
+--- init.c.orig Fri Mar 19 09:57:59 1999
++++ init.c
+@@ -27,15 +27,30 @@
+ */
+ static int read_boot(Stream_t *Stream, struct bootsector * boot, int size)
+ {
++ int rc;
++ char *buf;
++
++ buf = (char *)boot;
++
+ /* read the first sector, or part of it */
+ if(!size)
+ size = BOOTSIZE;
+- if(size > 1024)
+- size = 1024;
+
+- if (force_read(Stream, (char *) boot, 0, size) != size)
+- return -1;
+- return 0;
++ if (size > sizeof(struct bootsector)) {
++ buf = malloc(size);
++ if (!buf)
++ return(-1);
++ }
++
++ rc = 0;
++ if (force_read(Stream, buf, 0, size) != size)
++ rc = -1;
++
++ if (buf != (char *)boot) {
++ memcpy(boot, buf, sizeof(struct bootsector));
++ free(buf);
++ }
++ return rc;
+ }
+
+ static int fs_flush(Stream_t *Stream)