]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
More FBSD syscall tweaking
authorBen Kaduk <kaduk@mit.edu>
Wed, 29 Sep 2010 00:03:25 +0000 (20:03 -0400)
committerDerrick Brashear <shadow@dementia.org>
Tue, 5 Oct 2010 19:20:31 +0000 (12:20 -0700)
We're now properly registered in syscalls.master for HEAD
(i.e. proto-9.0) and RELENG_8 (proto-8.2), which means that
afs3_syscall is prototyped in sys/sysproto.h .  Accordingly,
don't declare it in afs_prototypes.h for those cases.

Also add FBSD82_ENV checks for the new syscall-registration code,
and cast afs3_syscall to sy_call_t* for the sysent structure.

Reviewed-on: http://gerrit.openafs.org/2864
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 791b7a4c660ef468286eb6f51e66b4faa4bb6c7b)
Change-Id: I6c58f2f08dafa5a0db98febde8f2fcb6781225e1
Reviewed-on: http://gerrit.openafs.org/2932
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/FBSD/osi_vfsops.c
src/afs/afs_prototypes.h

index 23079f04846960d84af122924f940a29002428c3..d3e6c57a44c3d17696fda28fe4459f28f0255591 100644 (file)
@@ -20,14 +20,14 @@ int afs_pbuf_freecnt = -1;
 extern int Afs_xsetgroups();
 extern int afs_xioctl();
 
-#if !defined(AFS_FBSD90_ENV)
+#if !defined(AFS_FBSD90_ENV) && !defined(AFS_FBSD82_ENV)
 static sy_call_t *old_handler;
 #else
 static struct sysent old_sysent;
 
 static struct sysent afs_sysent = {
     5,                 /* int sy_narg */
-    afs3_syscall,      /* sy_call_t *sy_call */
+    (sy_call_t *) afs3_syscall,        /* sy_call_t *sy_call */
 #ifdef AFS_FBSD60_ENV
     AUE_NULL,          /* au_event_t sy_auevent */
 #ifdef AFS_FBSD70_ENV
@@ -48,7 +48,7 @@ afs_init(struct vfsconf *vfc)
 {
     int code;
     int offset = AFS_SYSCALL;
-#if defined(AFS_FBSD90_ENV)
+#if defined(AFS_FBSD90_ENV) || defined(AFS_FBSD82_ENV)
     code = syscall_register(&offset, &afs_sysent, &old_sysent);
     if (code) {
        printf("AFS_SYSCALL in use, error %i. aborting\n", code);
@@ -63,7 +63,7 @@ afs_init(struct vfsconf *vfc)
 #endif
     osi_Init();
     afs_pbuf_freecnt = nswbuf / 2 + 1;
-#if !defined(AFS_FBSD90_ENV)
+#if !defined(AFS_FBSD90_ENV) && !defined(AFS_FBSD82_ENV)
     old_handler = sysent[AFS_SYSCALL].sy_call;
     sysent[AFS_SYSCALL].sy_call = afs3_syscall;
     sysent[AFS_SYSCALL].sy_narg = 5;
@@ -74,13 +74,13 @@ afs_init(struct vfsconf *vfc)
 int
 afs_uninit(struct vfsconf *vfc)
 {
-#if defined(AFS_FBSD90_ENV)
+#if defined(AFS_FBSD90_ENV) || defined(AFS_FBSD82_ENV)
     int offset = AFS_SYSCALL;
 #endif
 
     if (afs_globalVFS)
        return EBUSY;
-#if defined(AFS_FBSD90_ENV)
+#if defined(AFS_FBSD90_ENV) || defined(AFS_FBSD82_ENV)
     syscall_deregister(&offset, &old_sysent);
 #else
     sysent[AFS_SYSCALL].sy_narg = 0;
index 0959fdca2d4eb293915020a1852372f845caae54..84a92b71805d345803e77dd9cb06836d703292a2 100644 (file)
@@ -902,6 +902,8 @@ extern int copyin_afs_ioctl(caddr_t cmarg, struct afs_ioctl *dst);
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 #ifdef AFS_DARWIN100_ENV
 extern int afs3_syscall(afs_proc_t *p, void *args, unsigned int *retval);
+#elif defined(AFS_FBSD90_ENV) || defined(AFS_FBSD82_ENV)
+/* afs3_syscall prototype is in sys/sysproto.h */
 #elif defined(AFS_FBSD_ENV)
 extern int afs3_syscall(struct thread *p, void *args);
 #elif defined(AFS_NBSD40_ENV)