]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-linux-ia64-updates-20021209
authorJoseph V Moss <jmoss@ichips.intel.com>
Tue, 10 Dec 2002 04:32:40 +0000 (04:32 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 10 Dec 2002 04:32:40 +0000 (04:32 +0000)
deal with *LK64 not defined
deal with ia64 sys_call_table

(cherry picked from commit f7f1c50256b4073f3f8b762468bda450ad288267)

src/afs/LINUX/osi_module.c
src/afs/LINUX/osi_vnodeops.c

index 2879ad54bfe47bff8dc5d413612d716b170c6704..dbbfa8669bebc02deae33372dd64c06fbfce31f3 100644 (file)
@@ -269,16 +269,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 <datalen;ptr++,offset++) {
+#if defined(AFS_IA64_LINUX20_ENV)
+       unsigned long close_ip=(unsigned long) ((struct fptr *)&sys_close)->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,
index ded23d890889001af6585454394b112f574aca70..994a972bca5a162d4ec84b18361e00df0c95fb56 100644 (file)
@@ -541,14 +541,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);