From: Mark Vitale Date: Thu, 15 Nov 2018 20:41:24 +0000 (-0500) Subject: afs: remove dead code afs_osi_SetTime X-Git-Tag: openafs-devel-1_9_0~395 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=16b981ec6697b511c36c09adfeb8b79eaf2345b0 afs: remove dead code afs_osi_SetTime afs_osi_SetTime() has been dead code since -settime support was removed with commit 1d9888be486198868983048eeffabdfef5afa94b 'Remove -settime/RXAFS_GetTime client support'. Remove the dead code. No functional change is incurred by this commit. Change-Id: Ie5559325b4c98d7e0786c75ae6507ab9c2c47376 Reviewed-on: https://gerrit.openafs.org/13393 Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk --- diff --git a/src/afs/FBSD/osi_misc.c b/src/afs/FBSD/osi_misc.c index 9ca97e2..f22e258 100644 --- a/src/afs/FBSD/osi_misc.c +++ b/src/afs/FBSD/osi_misc.c @@ -60,15 +60,6 @@ osi_lookupname(char *aname, enum uio_seg seg, int followlink, } /* - * does not implement security features of kern_time.c:settime() - */ -void -afs_osi_SetTime(osi_timeval_t * atv) -{ - printf("afs attempted to set clock; use \"afsd -nosettime\"\n"); -} - -/* * Replace all of the bogus special-purpose memory allocators... */ void * diff --git a/src/afs/NBSD/osi_misc.c b/src/afs/NBSD/osi_misc.c index d89f111..dd10f06 100644 --- a/src/afs/NBSD/osi_misc.c +++ b/src/afs/NBSD/osi_misc.c @@ -100,21 +100,3 @@ afs_syscall_iincdec(int dev, int inode, int inode_p1, int amount) { return EINVAL; } - -/* - * just calls kern_time.c:settime() - */ -void -afs_osi_SetTime(osi_timeval_t *atv) -{ -#if 0 - printf("afs attempted to set clock; use \"afsd -nosettime\"\n"); -#else - struct timespec ts; - AFS_GUNLOCK(); - ts.tv_sec = atv->tv_sec; - ts.tv_nsec = atv->tv_usec * 1000; - settime(osi_curproc()->l_proc, &ts); /* really takes a process */ - AFS_GLOCK(); -#endif -} diff --git a/src/afs/OBSD/osi_sleep.c b/src/afs/OBSD/osi_sleep.c index 3a4c8e7..e12688d 100644 --- a/src/afs/OBSD/osi_sleep.c +++ b/src/afs/OBSD/osi_sleep.c @@ -61,12 +61,6 @@ osi_Time() return now.tv_sec; } -void -afs_osi_SetTime(osi_timeval_t * atv) -{ - printf("afs attempted to set clock; use \"afsd -nosettime\"\n"); -} - /* cancel osi_Wait */ void afs_osi_CancelWait(struct afs_osi_WaitHandle *achandle) diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index 6ebb580..0e38fb8 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -181,12 +181,6 @@ afs_suser(void *credp) * These are no-ops in user space */ -void -afs_osi_SetTime(osi_timeval_t * atv) -{ - return; -} - /* * xflock should never fall through, the only files we know * about are AFS files diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c index 9398376..2009d19 100644 --- a/src/afs/afs_osi.c +++ b/src/afs/afs_osi.c @@ -207,73 +207,6 @@ afs_osi_Visible(void) #endif } -#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) -/* set the real time */ -void -afs_osi_SetTime(osi_timeval_t * atv) -{ -#if defined(AFS_AIX32_ENV) - struct timestruc_t t; - - t.tv_sec = atv->tv_sec; - t.tv_nsec = atv->tv_usec * 1000; - ksettimer(&t); /* Was -> settimer(TIMEOFDAY, &t); */ -#elif defined(AFS_SUN5_ENV) - stime(atv->tv_sec); -#elif defined(AFS_SGI_ENV) - struct stimea { - sysarg_t time; - } sta; - - AFS_GUNLOCK(); - sta.time = atv->tv_sec; - stime(&sta); - AFS_GLOCK(); -#elif defined(AFS_DARWIN_ENV) -#ifndef AFS_DARWIN80_ENV - AFS_GUNLOCK(); - setthetime(atv); - AFS_GLOCK(); -#endif -#else - /* stolen from kern_time.c */ -#ifndef AFS_AUX_ENV - boottime.tv_sec += atv->tv_sec - time.tv_sec; -#endif -#ifdef AFS_HPUX_ENV - { -#if !defined(AFS_HPUX1122_ENV) - /* drop the setting of the clock for now. spl7 is not - * known on hpux11.22 - */ - ulong_t s; - struct timeval t; - t.tv_sec = atv->tv_sec; - t.tv_usec = atv->tv_usec; - s = spl7(); - time = t; - (void)splx(s); - resettodr(atv); -#endif - } -#else - { - int s; - s = splclock(); - time = *atv; - (void)splx(s); - } - resettodr(); -#endif -#ifdef AFS_AUX_ENV - logtchg(atv->tv_sec); -#endif -#endif /* AFS_DARWIN_ENV */ - AFS_STATCNT(osi_SetTime); -} -#endif /* AFS_LINUX20_ENV */ - - void shutdown_osi(void) { diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index 6e3ac54..f2aa588 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -629,9 +629,6 @@ extern void osi_ReleaseVM(struct vcache *avc, afs_ucred_t *acred); /* ARCH/osi_crypto.c */ extern int osi_readRandom(void *, afs_size_t); -/* ARCH/osi_misc.c */ -extern void afs_osi_SetTime(osi_timeval_t * atv); - /* LINUX/osi_misc.c */ #ifdef AFS_LINUX20_ENV #ifdef AFS_LINUX24_ENV