diff options
Diffstat (limited to 'sysutils/mtools/patches/patch-af')
-rw-r--r-- | sysutils/mtools/patches/patch-af | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/sysutils/mtools/patches/patch-af b/sysutils/mtools/patches/patch-af deleted file mode 100644 index 91eb84781a3..00000000000 --- a/sysutils/mtools/patches/patch-af +++ /dev/null @@ -1,50 +0,0 @@ -$NetBSD: patch-af,v 1.2 2006/03/25 19:50:20 joerg Exp $ - ---- init.c.orig 2002-05-01 09:57:02.000000000 +0000 -+++ init.c -@@ -14,9 +14,6 @@ - #include "xdf_io.h" - #include "buffer.h" - --extern int errno; -- -- - #define FULL_CYL - - unsigned int num_clus; /* total number of cluster */ -@@ -27,15 +24,30 @@ unsigned int num_clus; /* total number - */ - 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) |