From: Chas Williams Date: Sat, 8 May 2004 04:58:27 +0000 (+0000) Subject: linux26-update-20040507 X-Git-Tag: openafs-devel-1_3_64~24 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=fae4792e91bfd16b1d15f912dab88a90851ec8e9;hp=48e39b49431d902b6c51723df70b62a45b4e1f8d linux26-update-20040507 FIXES 4027 updates for modversions and for symbols which we don't need to grovel out of the kernel --- diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c index 280f5ee..f0aca2f 100644 --- a/src/afs/LINUX/osi_misc.c +++ b/src/afs/LINUX/osi_misc.c @@ -310,15 +310,25 @@ uiomove(char *dp, int length, uio_flag_t rw, uio_t * uiop) void afs_osi_SetTime(osi_timeval_t * tvp) { - extern int (*sys_settimeofdayp) (struct timeval * tv, - struct timezone * tz); -#ifdef AFS_LINUX_64BIT_KERNEL +#if defined(AFS_LINUX24_ENV) + +#if defined(AFS_LINUX26_ENV) + struct timespec tv; + tv.tv_sec = tvp->tv_sec; + tv.tv_nsec = tvp->tv_usec * NSEC_PER_USEC; +#else struct timeval tv; - AFS_STATCNT(osi_SetTime); tv.tv_sec = tvp->tv_sec; tv.tv_usec = tvp->tv_usec; - (void)(*sys_settimeofdayp) (&tv, NULL); +#endif + + AFS_STATCNT(osi_SetTime); + + do_settimeofday(&tv); #else + extern int (*sys_settimeofdayp) (struct timeval * tv, + struct timezone * tz); + KERNEL_SPACE_DECL; AFS_STATCNT(osi_SetTime); diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c index adc0599..c174a2a 100644 --- a/src/afs/LINUX/osi_module.c +++ b/src/afs/LINUX/osi_module.c @@ -48,8 +48,10 @@ MODULE_INFO(vermagic, VERMAGIC_STRING); #define __NR_setgroups32 82 /* This number is not exported for some bizarre reason. */ #endif +#if !defined(AFS_LINUX24_ENV) asmlinkage int (*sys_settimeofdayp) (struct timeval * tv, struct timezone * tz); +#endif asmlinkage long (*sys_setgroupsp) (int gidsetsize, gid_t * grouplist); #ifdef EXPORTED_SYS_CALL_TABLE @@ -188,7 +190,7 @@ init_module(void) { #if defined(AFS_IA64_LINUX20_ENV) unsigned long kernel_gp = 0; - static struct fptr sys_settimeofday, sys_setgroups; + static struct fptr sys_setgroups; #endif extern int afs_syscall(); extern long afs_xsetgroups(); @@ -400,16 +402,7 @@ init_module(void) #endif /* Initialize pointers to kernel syscalls. */ -#if defined(AFS_IA64_LINUX20_ENV) - kernel_gp = ((struct fptr *)printk)->gp; - - sys_settimeofdayp = (void *)&sys_settimeofday; - - ((struct fptr *)sys_settimeofdayp)->ip = - SYSCALL2POINTER sys_call_table[__NR_settimeofday - 1024]; - ((struct fptr *)sys_settimeofdayp)->gp = kernel_gp; - -#else /* !AFS_IA64_LINUX20_ENV */ +#if !defined(AFS_LINUX24_ENV) sys_settimeofdayp = SYSCALL2POINTER sys_call_table[__NR_settimeofday]; #endif /* AFS_IA64_LINUX20_ENV */ diff --git a/src/cf/linux-test3.m4 b/src/cf/linux-test3.m4 index 929b17d..53abcfa 100644 --- a/src/cf/linux-test3.m4 +++ b/src/cf/linux-test3.m4 @@ -42,9 +42,10 @@ else AC_MSG_CHECKING(if kernel uses MODVERSIONS) AC_CACHE_VAL(ac_cv_linux_config_modversions,[ AC_TRY_COMPILE( -[#include +[#include +#include ], -[#ifndef CONFIG_MODVERSIONS +[#if !defined(CONFIG_MODVERSIONS) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) lose; #endif ],