vol: Tidy up header includes
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Apr 2011 14:04:24 +0000 (15:04 +0100)
committerDerrick Brashear <shadow@dementia.org>
Mon, 4 Apr 2011 19:12:14 +0000 (12:12 -0700)
Remove headers which are provided by libroken, and reorder header
includes so that they're a bit a more legible.

Change-Id: Ie83e6ed3e6e5eaca063b9c6af836bcdc7decdf84
Reviewed-on: http://gerrit.openafs.org/4421
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

23 files changed:
src/vol/devname.c
src/vol/ihandle.c
src/vol/listinodes.c
src/vol/namei_map.c
src/vol/namei_ops.c
src/vol/ntops.c
src/vol/nuke.c
src/vol/partition.c
src/vol/physio.c
src/vol/purge.c
src/vol/salvaged.c
src/vol/salvager.c
src/vol/salvsync-client.c
src/vol/salvsync-server.c
src/vol/vg_cache.c
src/vol/vg_scan.c
src/vol/vnode.c
src/vol/vol-bless.c
src/vol/vol-info.c
src/vol/vol-salvage.c
src/vol/volume.c
src/vol/vutil.c
src/vol/xfs_size_check.c

index c30b155..35c2a3e 100644 (file)
 
 #include <roken.h>
 
+#include <ctype.h>
+
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <ctype.h>
 
 #if !defined(AFS_SGI_ENV)
 #ifdef AFS_OSF_ENV
index 8cc0077..892853c 100644 (file)
@@ -18,8 +18,7 @@
 
 #include <limits.h>
 
-#if defined(AFS_SUN5_ENV) || defined(AFS_NBSD_ENV)
-#include <sys/fcntl.h>
+#ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
 
index 013dfaa..87ed2f3 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <roken.h>
 
+#include <ctype.h>
+
 #ifndef AFS_NAMEI_ENV
 #if defined(AFS_LINUX20_ENV) || defined(AFS_SUN4_ENV)
 /* ListViceInodes
@@ -40,9 +42,7 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
     return -1;
 }
 #else
-#include <ctype.h>
-#if defined(AFS_SGI_ENV)
-#else
+#if !defined(AFS_SGI_ENV)
 #ifdef AFS_OSF_ENV
 #include <ufs/fs.h>
 #else /* AFS_OSF_ENV */
index e93b7f4..175f172 100644 (file)
@@ -1,10 +1,8 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#include <sys/types.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <roken.h>
+
 #include <afs/afsutil.h>
 
 int main(int argc, char **argv) {
index 98652a2..3df0bc3 100644 (file)
 
 #include <roken.h>
 
+
 #ifdef AFS_NAMEI_ENV
-#include <stdio.h>
-#include <stdlib.h>
-#ifndef AFS_NT40_ENV
-#include <unistd.h>
-#else
+
+#ifdef HAVE_SYS_FILE_H
+# include <sys/file.h>
+#endif
+
+#ifdef AFS_NT40_ENV
 #define DELETE_ZLC
-#include <io.h>
 #include <windows.h>
 #include <winnt.h>
 #include <winbase.h>
-#include <winsock2.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#endif
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#ifdef AFS_NT40_ENV
 #include <direct.h>
-#else
-#include <sys/file.h>
-#include <sys/param.h>
 #endif
-#include <dirent.h>
+
 #include <afs/afs_assert.h>
-#include <string.h>
 #include <lock.h>
 #include <afs/afsutil.h>
 #include <lwp.h>
@@ -56,6 +45,7 @@
 #include "volume_inline.h"
 #include "common.h"
 #include <afs/errors.h>
+
 #ifdef AFS_NT40_ENV
 #include <afs/errmap_nt.h>
 #endif
index 645be22..5be28ef 100644 (file)
 #include <roken.h>
 
 #ifdef AFS_NT40_ENV
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <fcntl.h>
 #include <direct.h>
-#include <io.h>
-#include <fcntl.h>
-#include <sys/stat.h>
 #include <windows.h>
 #include <winnt.h>
 #include <winbase.h>
index b684811..9d882e7 100644 (file)
 
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <stdio.h>
 #include <afs/afs_assert.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV)
-#include <string.h>
-#else
-#include <strings.h>
-#endif
-#ifndef AFS_NT40_ENV
-#include <unistd.h>
-#endif
 
 #include <afs/afsutil.h>
 
index 2fec1bb..0cbc462 100644 (file)
 #include <roken.h>
 
 #include <ctype.h>
-#include <string.h>
+
 #ifdef AFS_NT40_ENV
 #include <windows.h>
 #include <winbase.h>
 #include <winioctl.h>
 #else
-#include <sys/param.h>
-#include <sys/types.h>
-#include <unistd.h>
 
 #if AFS_HAVE_STATVFS || AFS_HAVE_STATVFS64
 #include <sys/statvfs.h>
@@ -64,9 +61,6 @@
 #endif
 #endif /* AFS_VFSINCL_ENV */
 #endif /* AFS_OSF_ENV */
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdio.h>
 #include <sys/file.h>
 #ifdef AFS_AIX_ENV
 #include <sys/vfs.h>
@@ -74,8 +68,6 @@
 #else
 #ifdef AFS_HPUX_ENV
 #include <sys/vfs.h>
-#include <unistd.h>
-#include <fcntl.h>
 #include <checklist.h>
 #else
 #if    defined(AFS_SUN_ENV)
 #endif /* AFS_SGI_ENV */
 #endif /* AFS_NT40_ENV */
 #if defined(AFS_SGI_ENV)
-#include <sys/errno.h>
-#include <sys/stat.h>
-#include <stdio.h>
 #include <sys/file.h>
 #include <mntent.h>
 #endif
index c5faa26..d7191b9 100644 (file)
 
 #include <roken.h>
 
-#include <stdio.h>
-#include <sys/types.h>
-#include <errno.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#else
+#include <assert.h>
+
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
-#include <unistd.h>
-#include <string.h>
-#ifdef AFS_SUN5_ENV
-#include <sys/fcntl.h>
-#endif
 #endif
+
 #include <rx/xdr.h>
 #include <afs/afsint.h>
 #include <errno.h>
@@ -40,7 +33,6 @@
 #include "ihandle.h"
 #include "salvage.h"
 #include <afs/dir.h>
-#include <assert.h>
 #include "vol_internal.h"
 
 /* returns 0 on success, errno on failure */
index 037f96f..fb5ac87 100644 (file)
 
 #include <roken.h>
 
-#include <stdio.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#include <io.h>
-#else
-#include <sys/param.h>
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
-#include <sys/time.h>
-#include <unistd.h>
 #endif
-#include <string.h>
-#include <sys/stat.h>
+
 #include <afs/afs_assert.h>
 #include <afs/afsutil.h>
 
index d977df9..d24b9f6 100644 (file)
 
 #include <roken.h>
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <errno.h>
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
 #ifdef AFS_NT40_ENV
-#include <io.h>
 #include <WINNT/afsevent.h>
-#else
-#include <sys/param.h>
-#include <sys/file.h>
-#ifndef ITIMER_REAL
-#include <sys/time.h>
-#endif /* ITIMER_REAL */
 #endif
+
 #ifndef WCOREDUMP
 #define WCOREDUMP(x)   ((x) & 0200)
 #endif
+
 #include <rx/xdr.h>
 #include <afs/afsint.h>
 #include <afs/afs_assert.h>
+
 #if !defined(AFS_SGI_ENV) && !defined(AFS_NT40_ENV)
 #if defined(AFS_VFSINCL_ENV)
 #include <sys/vnode.h>
 #include <sys/lockf.h>
 #else
 #ifdef AFS_HPUX_ENV
-#include <unistd.h>
 #include <checklist.h>
 #else
 #if defined(AFS_SGI_ENV)
-#include <unistd.h>
-#include <fcntl.h>
 #include <mntent.h>
 #else
 #if    defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
 #ifdef   AFS_SUN5_ENV
-#include <unistd.h>
 #include <sys/mnttab.h>
 #include <sys/mntent.h>
 #else
@@ -92,7 +81,6 @@
 #endif /* AFS_HPUX_ENV */
 #endif
 #endif
-#include <fcntl.h>
 #ifndef AFS_NT40_ENV
 #include <afs/osi_inode.h>
 #endif
 #include <afs/fileutil.h>
 #include <afs/procmgmt.h>      /* signal(), kill(), wait(), etc. */
 #include <afs/dir.h>
-#ifndef AFS_NT40_ENV
-#include <syslog.h>
-#endif
 
 #include "nfs.h"
 #include "lwp.h"
index d3deab8..892bd77 100644 (file)
 #include <afs/procmgmt.h>
 #include <roken.h>
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <errno.h>
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
 #ifdef AFS_NT40_ENV
-#include <io.h>
 #include <WINNT/afsevent.h>
-#else
-#include <sys/param.h>
-#include <sys/file.h>
-#ifndef ITIMER_REAL
-#include <sys/time.h>
-#endif /* ITIMER_REAL */
 #endif
+
 #ifndef WCOREDUMP
 #define WCOREDUMP(x)   ((x) & 0200)
 #endif
+
 #include <rx/xdr.h>
 #include <afs/afsint.h>
 #include <afs/afs_assert.h>
 #include <sys/lockf.h>
 #else
 #ifdef AFS_HPUX_ENV
-#include <unistd.h>
 #include <checklist.h>
 #else
 #if defined(AFS_SGI_ENV)
-#include <unistd.h>
-#include <fcntl.h>
 #include <mntent.h>
 #else
 #if    defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
 #ifdef   AFS_SUN5_ENV
-#include <unistd.h>
 #include <sys/mnttab.h>
 #include <sys/mntent.h>
 #else
@@ -95,7 +83,6 @@
 #endif /* AFS_HPUX_ENV */
 #endif
 #endif
-#include <fcntl.h>
 #ifndef AFS_NT40_ENV
 #include <afs/osi_inode.h>
 #endif
 #include <afs/dir.h>
 #include <afs/afsutil.h>
 #include <afs/fileutil.h>
-#ifndef AFS_NT40_ENV
-#include <syslog.h>
-#endif
 
 #include "nfs.h"
 #include "lwp.h"
index 691d82a..2743375 100644 (file)
 
 #include <roken.h>
 
-#include <sys/types.h>
-#include <stdio.h>
 #ifdef AFS_NT40_ENV
 #include <winsock2.h>
-#include <time.h>
-#else
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <sys/time.h>
 #endif
-#include <errno.h>
-#include <signal.h>
-#include <string.h>
 
 #include <rx/xdr.h>
 #include <afs/afsint.h>
index f054dd6..73d25c9 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <afs/procmgmt.h>
+#include <roken.h>
+
+#include <stddef.h>
 
-#include <sys/types.h>
-#include <stdio.h>
 #ifdef AFS_NT40_ENV
 #include <winsock2.h>
-#include <time.h>
-#else
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <sys/time.h>
 #endif
-#include <errno.h>
-#include <afs/afs_assert.h>
-#include <signal.h>
-#include <string.h>
-
 
+#include <afs/afs_assert.h>
 #include <rx/xdr.h>
 #include <afs/afsint.h>
 #include "nfs.h"
 #include "partition.h"
 #include "common.h"
 #include <rx/rx_queue.h>
-#include <afs/procmgmt.h>
-
-#if !defined(offsetof)
-#include <stddef.h>
-#endif
 
 #ifdef USE_UNIX_SOCKETS
 #include <afs/afsutil.h>
index f8c736e..fac9441 100644 (file)
 
 #include <roken.h>
 
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
 #ifdef AFS_DEMAND_ATTACH_FS
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <dirent.h>
 #include <afs/afs_assert.h>
-#include <string.h>
-#ifdef AFS_NT40_ENV
-#include <io.h>
-#else
-#include <sys/file.h>
-#include <sys/param.h>
-#if defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
-#include <unistd.h>
-#endif
-#endif /* AFS_NT40_ENV */
+
 #include <lock.h>
 #include <afs/afsutil.h>
 #include <lwp.h>
index 93a2801..7fc212e 100644 (file)
 
 #include <roken.h>
 
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
 #ifdef AFS_DEMAND_ATTACH_FS
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <dirent.h>
 #include <afs/afs_assert.h>
-#include <string.h>
-#ifdef AFS_NT40_ENV
-#include <io.h>
-#else
-#include <sys/file.h>
-#include <sys/param.h>
-#if defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
-#include <unistd.h>
-#endif
-#endif /* AFS_NT40_ENV */
 #include <lock.h>
 #include <afs/afsutil.h>
 #include <lwp.h>
index 209d952..531c48a 100644 (file)
 
 #include <limits.h>
 
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
 #include <afs/afs_assert.h>
 
 #include <rx/xdr.h>
 #include "partition.h"
 #include "salvsync.h"
 #include "common.h"
-#if defined(AFS_SGI_ENV)
-#include "sys/types.h"
-#include "fcntl.h"
-#undef min
-#undef max
-#include "stdlib.h"
-#endif
 #ifdef AFS_NT40_ENV
-#include <fcntl.h>
 #include "ntops.h"
-#else
-#include <sys/file.h>
-#ifdef AFS_SUN5_ENV
-#include <sys/fcntl.h>
-#endif
-#include <unistd.h>
-#endif /* AFS_NT40_ENV */
-#include <sys/stat.h>
-
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
 #endif
 
 struct VnodeClassInfo VnodeClassInfo[nVNODECLASSES];
index 6f4eb8f..158c37f 100644 (file)
@@ -10,8 +10,7 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-
-#include <stdio.h>
+#include <roken.h>
 
 #include <afs/cmd.h>
 
index 6a95cbd..e821223 100644 (file)
 #include <roken.h>
 
 #include <ctype.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <string.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#include <time.h>
-#include <io.h>
-#else
-#include <sys/param.h>
+
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
-#include <sys/time.h>
 #endif
+
 #include <afs/cmd.h>
 #include <afs/dir.h>
 
 #include <afs/afssyscalls.h>
 #include <afs/afsutil.h>
 
-#ifdef _AIX
-#include <time.h>
-#endif
-
-#include <dirent.h>
-
 int DumpVnodes = 0;            /* Dump everything, i.e. summary of all vnodes */
 int DumpInodeNumber = 0;       /* Dump inode numbers with vnodes */
 int DumpDate = 0;              /* Dump vnode date (server modify date) with vnode */
index b212265..f017392 100644 (file)
@@ -89,22 +89,11 @@ Vnodes with 0 inode pointers in RW volumes are now deleted.
 #include <afs/procmgmt.h>
 #include <roken.h>
 
-#ifndef AFS_NT40_ENV
-#include <sys/param.h>
-#include <sys/file.h>
-#ifndef ITIMER_REAL
-#include <sys/time.h>
-#endif /* ITIMER_REAL */
+#ifdef HAVE_SYS_FILE_H
+# include <sys/file.h>
 #endif
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <errno.h>
+
 #ifdef AFS_NT40_ENV
-#include <io.h>
 #include <WINNT/afsevent.h>
 #endif
 #ifndef WCOREDUMP
@@ -141,17 +130,13 @@ Vnodes with 0 inode pointers in RW volumes are now deleted.
 #include <sys/lockf.h>
 #else
 #ifdef AFS_HPUX_ENV
-#include <unistd.h>
 #include <checklist.h>
 #else
 #if defined(AFS_SGI_ENV)
-#include <unistd.h>
-#include <fcntl.h>
 #include <mntent.h>
 #else
 #if    defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
 #ifdef   AFS_SUN5_ENV
-#include <unistd.h>
 #include <sys/mnttab.h>
 #include <sys/mntent.h>
 #else
@@ -162,7 +147,6 @@ Vnodes with 0 inode pointers in RW volumes are now deleted.
 #endif /* AFS_HPUX_ENV */
 #endif
 #endif
-#include <fcntl.h>
 #ifndef AFS_NT40_ENV
 #include <afs/osi_inode.h>
 #endif
@@ -170,10 +154,6 @@ Vnodes with 0 inode pointers in RW volumes are now deleted.
 #include <afs/dir.h>
 #include <afs/afsutil.h>
 #include <afs/fileutil.h>
-#include <afs/procmgmt.h>      /* signal(), kill(), wait(), etc. */
-#ifndef AFS_NT40_ENV
-#include <syslog.h>
-#endif
 
 #include "nfs.h"
 #include "lwp.h"
index bf8c02b..63fff05 100644 (file)
 
 #include <roken.h>
 
+#include <ctype.h>
+#include <stddef.h>
+
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <ctype.h>
-#include <signal.h>
+
 #ifndef AFS_NT40_ENV
-#include <sys/param.h>
 #if !defined(AFS_SGI_ENV)
 #ifdef AFS_OSF_ENV
 #include <ufs/fs.h>
 #endif /* AFS_VFSINCL_ENV */
 #endif /* AFS_OSF_ENV */
 #endif /* AFS_SGI_ENV */
-#endif /* AFS_NT40_ENV */
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#else
-#include <sys/file.h>
-#endif
-#include <dirent.h>
+#endif /* !AFS_NT40_ENV */
+
 #ifdef AFS_AIX_ENV
 #include <sys/vfs.h>
-#include <fcntl.h>
 #else
 #ifdef AFS_HPUX_ENV
-#include <fcntl.h>
 #include <mntent.h>
 #else
 #if    defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
@@ -80,9 +75,7 @@
 #else
 #ifndef AFS_NT40_ENV
 #if defined(AFS_SGI_ENV)
-#include <fcntl.h>
 #include <mntent.h>
-
 #else
 #ifndef AFS_LINUX20_ENV
 #include <fstab.h>             /* Need to find in libc 5, present in libc 6 */
 #endif
 #endif /* AFS_HPUX_ENV */
 #endif
-#ifndef AFS_NT40_ENV
-#include <netdb.h>
-#include <netinet/in.h>
-#include <sys/wait.h>
-#include <setjmp.h>
-#ifndef ITIMER_REAL
-#include <sys/time.h>
-#endif /* ITIMER_REAL */
-#endif /* AFS_NT40_ENV */
-#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV) || defined(AFS_LINUX20_ENV)
-#include <string.h>
-#else
-#include <strings.h>
-#endif
 
 #include "nfs.h"
 #include <afs/errors.h>
 #include <afs/afssyscalls.h>
 #include "ihandle.h"
 #include <afs/afsutil.h>
-#ifdef AFS_NT40_ENV
-#include <io.h>
-#endif
 #include "daemon_com.h"
 #include "fssync.h"
 #include "salvsync.h"
 #include "afs/afs_assert.h"
 #include "vutils.h"
 #include <afs/dir.h>
-#ifndef AFS_NT40_ENV
-#include <unistd.h>
-#endif
-
-#if !defined(offsetof)
-#include <stddef.h>
-#endif
 
 #ifdef AFS_PTHREAD_ENV
 pthread_mutex_t vol_glock_mutex;
index b918389..396832d 100644 (file)
 
 #include <roken.h>
 
-#include <stdio.h>
-#include <sys/types.h>
-#include <errno.h>
-#ifdef AFS_NT40_ENV
-#include <time.h>
-#include <fcntl.h>
-#else
-#include <sys/time.h>
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
-#include <unistd.h>
 #endif
-#include <dirent.h>
-#include <sys/stat.h>
+
+#ifdef HAVE_SYS_LOCKF_H
+#include <sys/lockf.h>
+#endif
+
 #include <afs/afs_assert.h>
 
 #include <rx/xdr.h>
@@ -45,7 +40,6 @@
 #include <afs/afsutil.h>
 #ifdef AFS_NT40_ENV
 #include "ntops.h"
-#include <io.h>
 #endif
 #include "vnode.h"
 #include "volume.h"
 #include "vol_prototypes.h"
 #include "common.h"
 
-#ifdef AFS_AIX_ENV
-#include <sys/lockf.h>
-#endif
-#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV) || defined(AFS_LINUX20_ENV)
-#include <string.h>
-#else
-#include <strings.h>
-#endif
-
 #ifndef AFS_NT40_ENV
 # ifdef O_LARGEFILE
 #  define AFS_SETLKW   F_SETLKW64
index 24df654..103c342 100644 (file)
@@ -9,18 +9,15 @@
 
 /* Verify that the size of the XFS inode is large enough to hold the XFS
  * attribute for AFS inode parameters. Check all the mounted /vicep partitions.
+ */
 #include <afsconfig.h>
+#include <afs/param.h>
 
+#include <roken.h>
 
- */
-#include <afs/param.h>
 #ifdef AFS_SGI_XFS_IOPS_ENV
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <dirent.h>
-#include <fcntl.h>
 #include <mntent.h>
+#include <afs/afsint.h>
 #include "ihandle.h"
 #include "partition.h"
 #include <afs/xfsattrs.h>