From c153ec0c9e1794b8ee545e99d8c00ab1eab04efa Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Thu, 24 Mar 2011 19:23:34 +0000 Subject: [PATCH] vol: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: Ifd88310dc26ebfd995b4a25b2984ddb01606264f Reviewed-on: http://gerrit.openafs.org/4319 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/vol/clone.c | 17 +++-------------- src/vol/common.c | 4 +--- src/vol/daemon_com.c | 21 ++------------------- src/vol/devname.c | 21 +++++---------------- src/vol/fssync-client.c | 21 +++------------------ src/vol/fssync-debug.c | 17 +---------------- src/vol/fssync-server.c | 21 --------------------- src/vol/gi.c | 5 +---- src/vol/ihandle.c | 16 +++------------- src/vol/listinodes.c | 11 ++--------- 10 files changed, 21 insertions(+), 133 deletions(-) diff --git a/src/vol/clone.c b/src/vol/clone.c index 58912ff7eb..0b04756981 100644 --- a/src/vol/clone.c +++ b/src/vol/clone.c @@ -20,30 +20,19 @@ #include -#include -#include -#include #ifdef AFS_NT40_ENV -#include #include #include -#include -#include -#else -#include -#include -#include #endif -#include -#include -#include +#include #include #include +#include + #include "nfs.h" #include "lwp.h" #include "lock.h" -#include #include "ihandle.h" #include "vnode.h" #include "volume.h" diff --git a/src/vol/common.c b/src/vol/common.c index 0e483772db..7af9a6f900 100644 --- a/src/vol/common.c +++ b/src/vol/common.c @@ -14,12 +14,10 @@ */ -#include -#include -#include #include #include +#include #include diff --git a/src/vol/daemon_com.c b/src/vol/daemon_com.c index afcc057490..4e64abce32 100644 --- a/src/vol/daemon_com.c +++ b/src/vol/daemon_com.c @@ -23,29 +23,12 @@ #include -#include -#include -#ifdef AFS_NT40_ENV -#include -#include -#else -#include -#include -#include -#include -#include -#include -#endif -#include #include -#include -#include - - #include #include -#include "nfs.h" #include + +#include "nfs.h" #include "daemon_com.h" #include "lwp.h" #include "lock.h" diff --git a/src/vol/devname.c b/src/vol/devname.c index e7f0147618..c30b155137 100644 --- a/src/vol/devname.c +++ b/src/vol/devname.c @@ -7,15 +7,15 @@ * directory or online at http://www.openafs.org/dl/license10.html */ -#include #include - - #include + +#include + #include #include -#include #include + #if !defined(AFS_SGI_ENV) #ifdef AFS_OSF_ENV #include @@ -39,17 +39,11 @@ #endif /* AFS_VFSINCL_ENV */ #endif /* AFS_OSF_ENV */ #endif /* AFS_SGI_ENV */ -#include -#include -#include -#include #include #ifdef AFS_AIX_ENV #include -#include #else #ifdef AFS_HPUX_ENV -#include #include #else #if defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV) @@ -61,7 +55,6 @@ #endif #else #if defined(AFS_SGI_ENV) -#include #include #else #ifdef AFS_LINUX22_ENV @@ -73,13 +66,9 @@ #endif /* AFS_SGI_ENV */ #endif /* AFS_HPUX_ENV */ #endif -#include -#include #include #include -#ifndef ITIMER_REAL -#include -#endif /* ITIMER_REAL */ + #include "ihandle.h" #include "partition.h" diff --git a/src/vol/fssync-client.c b/src/vol/fssync-client.c index 0aff910b7e..0d884bc59a 100644 --- a/src/vol/fssync-client.c +++ b/src/vol/fssync-client.c @@ -37,32 +37,17 @@ #include -#include -#include -#ifdef AFS_NT40_ENV -#include -#include -#else -#include -#include -#include -#include -#include -#endif -#include #include -#include -#include - #include #include -#include "nfs.h" #include +#include + +#include "nfs.h" #include "daemon_com.h" #include "fssync.h" #include "lwp.h" #include "lock.h" -#include #include "ihandle.h" #include "vnode.h" #include "volume.h" diff --git a/src/vol/fssync-debug.c b/src/vol/fssync-debug.c index e0fb64695f..0c2780d34f 100644 --- a/src/vol/fssync-debug.c +++ b/src/vol/fssync-debug.c @@ -20,29 +20,14 @@ #include -#include -#include -#include -#include -#include -#include -#include #ifdef AFS_NT40_ENV -#include #include -#else -#include -#include -#ifndef ITIMER_REAL -#include -#endif /* ITIMER_REAL */ #endif + #include #include #include -#include - #ifndef AFS_NT40_ENV #include #endif diff --git a/src/vol/fssync-server.c b/src/vol/fssync-server.c index fa28fda517..0d2aa7e06f 100644 --- a/src/vol/fssync-server.c +++ b/src/vol/fssync-server.c @@ -45,27 +45,6 @@ #include -#include -#include -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef AFS_NT40_ENV -#include -#include -#else -#include -#include -#include -#include -#include -#include -#endif -#include -#include -#include -#include - #include #include #include "nfs.h" diff --git a/src/vol/gi.c b/src/vol/gi.c index b825a2a17b..e4e7f7c34b 100644 --- a/src/vol/gi.c +++ b/src/vol/gi.c @@ -10,11 +10,8 @@ #include #include +#include -#include -#include -#include -#include int statflag; diff --git a/src/vol/ihandle.c b/src/vol/ihandle.c index d109ee3334..9bfdd9e859 100644 --- a/src/vol/ihandle.c +++ b/src/vol/ihandle.c @@ -16,31 +16,21 @@ #include -#include -#include -#include -#include -#ifdef AFS_NT40_ENV -#include -#else -#include -#include -#include +#include + #if defined(AFS_SUN5_ENV) || defined(AFS_NBSD_ENV) #include #include #endif -#endif #include #include -#include #include + #include "nfs.h" #include "ihandle.h" #include "viceinode.h" #include "afs/afs_assert.h" -#include #ifdef AFS_PTHREAD_ENV pthread_once_t ih_glock_once = PTHREAD_ONCE_INIT; diff --git a/src/vol/listinodes.c b/src/vol/listinodes.c index 32f57a6630..013dfaa769 100644 --- a/src/vol/listinodes.c +++ b/src/vol/listinodes.c @@ -20,8 +20,7 @@ #include #include -#include - +#include #ifndef AFS_NAMEI_ENV #if defined(AFS_LINUX20_ENV) || defined(AFS_SUN4_ENV) @@ -42,7 +41,6 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile, } #else #include -#include #if defined(AFS_SGI_ENV) #else #ifdef AFS_OSF_ENV @@ -69,7 +67,6 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile, #endif #endif /* AFS_VFSINCL_ENV */ #endif /* AFS_OSF_ENV */ -#include #ifdef AFS_VFSINCL_ENV #include #ifdef AFS_SUN5_ENV @@ -89,20 +86,16 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile, #endif /* AFS_SGI_ENV */ #include #include -#include #include #include #include "nfs.h" #include #include "viceinode.h" -#include #if defined (AFS_AIX_ENV) || defined (AFS_HPUX_ENV) #include #endif #include -#if defined(AFS_HPUX101_ENV) -#include -#endif + #include "lock.h" #include "ihandle.h" #include "vnode.h"