From: Benjamin Kaduk Date: Sun, 20 Dec 2015 19:33:36 +0000 (-0600) Subject: Partially unifdef afs_pag_call.c X-Git-Tag: upstream/1.8.0_pre1^2~99 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2a68f7a1c374789961fdfc6de1c228f4f33a8132;p=packages%2Fo%2Fopenafs.git Partially unifdef afs_pag_call.c This file is only built on linux, for afspag.ko. There is no need to retain the artifiacts of its historical origin that include conditionals for SUN5 or HPUX or the like. Change-Id: Icbb2390d261f2f51766b392968fe332c4fb8aa6c Reviewed-on: https://gerrit.openafs.org/12134 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- diff --git a/src/afs/afs_pag_call.c b/src/afs/afs_pag_call.c index af35a23d3..a20e3e627 100644 --- a/src/afs/afs_pag_call.c +++ b/src/afs/afs_pag_call.c @@ -18,12 +18,7 @@ #include "rx/rxstat.h" #if !defined(UKERNEL) && !defined(AFS_LINUX20_ENV) #include "net/if.h" -#ifdef AFS_SGI62_ENV -#include "h/hashing.h" -#endif -#if !defined(AFS_HPUX110_ENV) && !defined(AFS_DARWIN_ENV) #include "netinet/in_var.h" -#endif #endif /* !defined(UKERNEL) */ #include "rmtsys.h" #include "pagcb.h" @@ -73,7 +68,7 @@ afs_Daemon(void) afs_osi_Wait(now, &AFS_WaitHandler, 0); if (afs_termState == AFSOP_STOP_AFS) { -#if defined(AFS_SUN5_ENV) || defined(RXK_LISTENER_ENV) +#if defined(RXK_LISTENER_ENV) afs_termState = AFSOP_STOP_RXEVENT; #else afs_termState = AFSOP_STOP_COMPLETE; @@ -173,19 +168,17 @@ afspag_Shutdown(void) } /* afs_Daemon sets AFS_STOP_RXEVENT */ -#if defined(AFS_SUN5_ENV) || defined(RXK_LISTENER_ENV) +#if defined(RXK_LISTENER_ENV) while (afs_termState == AFSOP_STOP_RXEVENT) afs_osi_Sleep(&afs_termState); /* afs_rxevent_daemon sets AFSOP_STOP_RXK_LISTENER */ -#if defined(RXK_LISTENER_ENV) afs_osi_UnmaskRxkSignals(); osi_StopListener(); while (afs_termState == AFSOP_STOP_RXK_LISTENER) afs_osi_Sleep(&afs_termState); /* rxk_Listener sets AFSOP_STOP_COMPLETE */ #endif -#endif } static void @@ -362,29 +355,9 @@ outparam_conversion(int cmd, char *buffer, int buf_size, int in) /* called with the GLOCK held */ int -#ifdef AFS_SUN5_ENV -afs_syscall_pioctl(path, com, cmarg, follow, rvp, credp) - rval_t *rvp; - afs_ucred_t *credp; -#else -#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) -afs_syscall_pioctl(path, com, cmarg, follow, credp) - afs_ucred_t *credp; -#else -afs_syscall_pioctl(path, com, cmarg, follow) -#endif -#endif - char *path; - unsigned int com; - caddr_t cmarg; - int follow; +afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow) { -#ifdef AFS_AIX41_ENV - struct ucred *credp = crref(); /* don't free until done! */ -#endif -#ifdef AFS_LINUX22_ENV cred_t *credp = crref(); /* don't free until done! */ -#endif struct afs_ioctl data; struct clientcred ccred; struct rmtbulk idata, odata; @@ -524,9 +497,7 @@ out_path: osi_FreeLargeSpace(pathbuf); out: -#if defined(AFS_LINUX22_ENV) || defined(AFS_AIX41_ENV) crfree(credp); -#endif #if defined(KERNEL_HAVE_UERROR) if (!getuerror()) setuerror(code); @@ -542,11 +513,7 @@ afs_syscall_call(parm, parm2, parm3, parm4, parm5, parm6) long parm, parm2, parm3, parm4, parm5, parm6; { /* Superusers may shut us down, such as with afsd -shutdown. */ -#ifdef AFS_SUN5_ENV - if (parm == AFSOP_SHUTDOWN && afs_suser(CRED())) -#else if (parm == AFSOP_SHUTDOWN && afs_suser(NULL)) -#endif { AFS_GLOCK(); afspag_Shutdown();