From f7f1c50256b4073f3f8b762468bda450ad288267 Mon Sep 17 00:00:00 2001 From: Joseph V Moss Date: Tue, 10 Dec 2002 04:22:14 +0000 Subject: [PATCH] linux-ia64-updates-20021209 deal with *LK64 not defined deal with ia64 sys_call_table --- src/afs/LINUX/osi_module.c | 19 ++++++++++++++++++- src/afs/LINUX/osi_vnodeops.c | 4 ++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c index b7a527164..a2302225d 100644 --- a/src/afs/LINUX/osi_module.c +++ b/src/afs/LINUX/osi_module.c @@ -266,16 +266,33 @@ int init_module(void) &sym_name, &sym_start, &sym_end); ptr=(unsigned long *)sec_start; datalen=(sec_end-sec_start)/sizeof(unsigned long); +#else +#if defined(AFS_IA64_LINUX20_ENV) + ptr = (unsigned long *) (&sys_close - 0x180000); + datalen=0x180000/sizeof(ptr); #else ptr=(unsigned long *)&init_mm; datalen=16384; +#endif #endif for (offset=0;offset ip; + unsigned long chdir_ip=(unsigned long) ((struct fptr *)&sys_chdir)->ip; + unsigned long write_ip=(unsigned long) ((struct fptr *)&sys_write)->ip; + if (ptr[0] == close_ip && + ptr[__NR_chdir - __NR_close] == chdir_ip && + ptr[__NR_write - __NR_close] == write_ip) { + sys_call_table=(void *) &(ptr[ -1 * (__NR_close-1024)]); + break; + } +#else if (ptr[0] == (unsigned long)&sys_exit && ptr[__NR_open - __NR_exit] == (unsigned long)&sys_open) { sys_call_table=ptr - __NR_exit; break; } +#endif } #ifdef EXPORTED_KALLSYMS_ADDRESS ret=kallsyms_address_to_symbol((unsigned long)sys_call_table, &mod_name, @@ -292,7 +309,7 @@ int init_module(void) # ifdef AFS_SPARC64_LINUX20_ENV error cant support this yet. #endif -#endif /* SYS_CALL_TABLE */ +#endif /* EXPORTED_SYS_CALL_TABLE */ /* Initialize pointers to kernel syscalls. */ #if defined(AFS_IA64_LINUX20_ENV) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index dd1103215..48b7165b8 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -642,14 +642,14 @@ static int afs_linux_lock(struct file *fp, int cmd, struct file_lock *flp) flock.l_len = flp->fl_end - flp->fl_start; /* Safe because there are no large files, yet */ -#if F_GETLK != F_GETLK64 +#if defined(F_GETLK64) && (F_GETLK != F_GETLK64) if (cmd = F_GETLK64) cmd = F_GETLK; else if (cmd = F_SETLK64) cmd = F_SETLK; else if (cmd = F_SETLKW64) cmd = F_SETLKW; -#endif /* F_GETLK != F_GETLK64 */ +#endif /* F_GETLK64 && F_GETLK != F_GETLK64 */ AFS_GLOCK(); code = afs_lockctl(vcp, &flock, cmd, credp); -- 2.39.5