summaryrefslogtreecommitdiff
path: root/archivers/mtf/files/patch-mtfread.c
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2002-06-26 06:33:35 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2002-06-26 06:33:35 +0000
commit3abb566b23658043de38308b8f57a752e4fad40c (patch)
tree2cb4d987e3b13c948408b353c4945f2277fd285b /archivers/mtf/files/patch-mtfread.c
parentadd p5-XMl-Schematron 0.95 (diff)
add mtf 0.21
A Unix reader for the Microsoft Tape Format used by NT Backup PR: 34452 Submitted by: Philippe CASIDY <pcasidy@casidy.com>
Diffstat (limited to 'archivers/mtf/files/patch-mtfread.c')
-rw-r--r--archivers/mtf/files/patch-mtfread.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/archivers/mtf/files/patch-mtfread.c b/archivers/mtf/files/patch-mtfread.c
new file mode 100644
index 000000000000..b31776f69f46
--- /dev/null
+++ b/archivers/mtf/files/patch-mtfread.c
@@ -0,0 +1,33 @@
+--- mtfread.c.orig Wed Sep 13 23:14:33 2000
++++ mtfread.c Wed Jun 26 14:28:48 2002
+@@ -42,7 +42,11 @@
+ #include <limits.h>
+ #include <sys/stat.h>
+ #include <sys/fcntl.h>
++#if defined(BSD)
++#include <sys/mount.h>
++#else
+ #include <sys/vfs.h>
++#endif
+ #include <utime.h>
+ #include <unistd.h>
+ #include <time.h>
+@@ -363,7 +367,7 @@
+ {
+ stream = (MTF_STREAM_HDR*) ((char*) tape + dbHdr->off);
+ result = skipToNextBlock();
+- if (result != 1)
++ if (result != 0) /* skipToNextBlock returns 0 upon success -1 otherwise */
+ {
+ fprintf(stderr, "Error traversing to end of descriptor block!\n");
+ return(-1);
+@@ -671,7 +675,8 @@
+ INT32 result;
+ char *ptr, *ptr2, filePath[MAXPATHLEN + 1], fullPath[MAXPATHLEN + 1];
+ char tmpPath[MAXPATHLEN + 1];
+- int i, output;
++ int i;
++ int output=-1; /* Initialized to avoid gcc warning */
+ struct tm tbuf;
+ struct utimbuf utbuf;
+ UINT32 threshold;