blob: 3a3e079c679850dee35d08eab6093c3019a529a4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- mtfread.c.orig 2000-09-13 15:14:33 UTC
+++ mtfread.c
@@ -42,7 +42,11 @@ See mtf.c for version history, contribut
#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 @@ INT32 readTapeBlock(void)
{
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 readFileBlock(void)
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;
|