3 --- file.c.orig 2007-01-15 15:25:52.000000000 -0500
4 +++ file.c 2007-12-05 11:22:56.000000000 -0500
8 * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
9 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
10 * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
13 #define kernel_dirent dirent
16 +#include <sys/statvfs.h>
17 +#define statfs statvfs
18 +#define __val __fsid_val
19 +#define f_fsid f_fsidx
26 #define XATTR_REPLACE 2
31 #include <sys/param.h>
32 #include <sys/mount.h>
35 #endif /* LINUXSPARC */
37 static const struct xlat fileflags[] = {
40 { UF_NODUMP, "UF_NODUMP" },
41 { UF_IMMUTABLE, "UF_IMMUTABLE" },
42 { UF_APPEND, "UF_APPEND" },
43 { UF_OPAQUE, "UF_OPAQUE" },
45 { UF_NOUNLINK, "UF_NOUNLINK" },
47 { SF_ARCHIVED, "SF_ARCHIVED" },
48 { SF_IMMUTABLE, "SF_IMMUTABLE" },
49 { SF_APPEND, "SF_APPEND" },
51 { SF_NOUNLINK, "SF_NOUNLINK" },
55 { _S_ISMLD, "_S_ISMLD" },
66 #endif /* !HAVE_STRUCT_STAT_ST_RDEV */
69 - tprintf("st_size=%llu, ", statbuf.st_size);
70 + tprintf("st_size=%llu, ", (unsigned long long)statbuf.st_size);
83 sprintf(buf, "%#x", magic);
89 printstatfs(tcp, addr)
90 @@ -1591,7 +1603,11 @@
93 tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%lu, f_bfree=%lu, ",
95 sprintfstype(statbuf.f_type),
97 + statbuf.f_fstypename,
99 (unsigned long)statbuf.f_bsize,
100 (unsigned long)statbuf.f_blocks,
101 (unsigned long)statbuf.f_bfree);
102 @@ -1846,7 +1862,7 @@
106 -#if defined(SUNOS4) || defined(SVR4)
107 +#if defined(SUNOS4) || defined(SVR4) || defined(NETBSD)
111 @@ -1856,7 +1872,7 @@
115 -#endif /* SUNOS4 || SVR4 */
116 +#endif /* SUNOS4 || SVR4 || NETBSD */
120 @@ -2188,7 +2204,7 @@
129 @@ -2199,7 +2215,7 @@
133 -#endif /* FREEBSD */
138 @@ -2254,7 +2270,7 @@
142 -#if defined FREEBSD || defined LINUX
143 +#if defined ALLBSD || defined LINUX
144 static const struct xlat direnttypes[] = {
145 { DT_UNKNOWN, "DT_UNKNOWN" },
146 { DT_FIFO, "DT_FIFO" },
147 @@ -2327,15 +2343,16 @@
148 d->d_namlen, d->d_namlen, d->d_name);
154 - tprintf("%s{d_fileno=%u, d_reclen=%u, d_type=",
155 - i ? " " : "", d->d_fileno, d->d_reclen);
156 + tprintf("%s{d_fileno=%llu, d_reclen=%u, d_type=",
157 + i ? " " : "", (unsigned long long)d->d_fileno,
159 printxval(direnttypes, d->d_type, "DT_???");
160 tprintf(", d_namlen=%u, d_name=\"%.*s\"}",
161 d->d_namlen, d->d_namlen, d->d_name);
163 -#endif /* FREEBSD */
166 tprintf("/* d_reclen == 0, problem here */");
168 @@ -2421,7 +2438,7 @@
175 sys_getdirentries(tcp)
177 @@ -2454,8 +2471,9 @@
178 for (i = 0; i < len;) {
179 struct kernel_dirent *d = (struct kernel_dirent *) &buf[i];
181 - tprintf("%s{d_fileno=%u, d_reclen=%u, d_type=",
182 - i ? " " : "", d->d_fileno, d->d_reclen);
183 + tprintf("%s{d_fileno=%llu, d_reclen=%u, d_type=",
184 + i ? " " : "", (unsigned long long)d->d_fileno,
186 printxval(direnttypes, d->d_type, "DT_???");
187 tprintf(", d_namlen=%u, d_name=\"%.*s\"}",
188 d->d_namlen, d->d_namlen, d->d_name);
189 @@ -2493,7 +2511,7 @@