]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afs: remove dead code afs_osi_SetTime
authorMark Vitale <mvitale@sinenomine.net>
Thu, 15 Nov 2018 20:41:24 +0000 (15:41 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 21 Dec 2018 11:11:33 +0000 (06:11 -0500)
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.

Reviewed-on: https://gerrit.openafs.org/13393
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 16b981ec6697b511c36c09adfeb8b79eaf2345b0)

Change-Id: I3fa92cbe1598703b4eddd78e4c7afdc04c525750
Reviewed-on: https://gerrit.openafs.org/13407
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/FBSD/osi_misc.c
src/afs/NBSD/osi_misc.c
src/afs/OBSD/osi_sleep.c
src/afs/UKERNEL/afs_usrops.c
src/afs/afs_osi.c
src/afs/afs_prototypes.h

index 9ca97e249d56acee20c12da3e3840bb01dd978ce..f22e258d3820d7bcf1a70f130c145c9884932fea 100644 (file)
@@ -59,15 +59,6 @@ osi_lookupname(char *aname, enum uio_seg seg, int followlink,
     return 0;
 }
 
-/*
- * 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...
  */
index d89f1116fe5ad5058312ab03f834d421701db1d1..dd10f06e69237a082b702db4fefac77c735b7fa1 100644 (file)
@@ -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
-}
index 3a4c8e72ba79045e88d5f1687050ba6155da5b94..e12688de9e84bdf607565a6c86544f390f88e98e 100644 (file)
@@ -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)
index 6ebb580c1137054d92017c502a7a020c9e178f3c..0e38fb84be0c01035af755d8094126305a96dcab 100644 (file)
@@ -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
index 93983766f21f8a052e669049a00299cc9a60494e..2009d194d4da86aeae9e980ce31d19535e455519 100644 (file)
@@ -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)
 {
index c38b0b9c068fad3c78bbf9b4050cc625955af281..c911e84b367ad99aeac3375b024933158c0df59f 100644 (file)
@@ -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