7 #include "afs/sysincludes.h"
8 #include "afsincludes.h"
9 #ifdef AFS_DARWIN60_ENV /* not in Kernel.framework anymore !?! */
10 #include <sys/syscall.h>
12 #include "sys/syscall.h"
14 #include <mach/kmod.h>
16 struct vfsconf afs_vfsconf;
17 extern struct vfsops afs_vfsops;
18 extern struct mount *afs_globalVFS;
19 extern int Afs_xsetgroups();
20 extern int afs_xioctl();
21 extern int afs3_syscall();
24 extern int setgroups();
25 extern int maxvfsconf;
27 afs_modload(struct kmod_info *ki, void *data)
29 if (sysent[AFS_SYSCALL].sy_call != nosys) {
30 printf("AFS_SYSCALL in use. aborting\n");
33 memset(&afs_vfsconf, 0, sizeof(struct vfsconf));
34 strcpy(afs_vfsconf.vfc_name, "afs");
35 afs_vfsconf.vfc_vfsops = &afs_vfsops;
36 afs_vfsconf.vfc_typenum = maxvfsconf++; /* oddly not VT_AFS */
37 afs_vfsconf.vfc_flags = MNT_NODEV;
38 if (vfsconf_add(&afs_vfsconf)) {
39 printf("AFS: vfsconf_add failed. aborting\n");
42 sysent[SYS_setgroups].sy_call = Afs_xsetgroups;
44 sysent[SYS_ioctl].sy_call = afs_xioctl;
46 sysent[AFS_SYSCALL].sy_call = afs3_syscall;
47 sysent[AFS_SYSCALL].sy_narg = 5;
48 sysent[AFS_SYSCALL].sy_parallel = 0;
50 sysent[AFS_SYSCALL].sy_funnel = KERNEL_FUNNEL;
56 afs_modunload(struct kmod_info * ki, void *data)
60 if (vfsconf_del("afs"))
62 /* give up syscall entries for ioctl & setgroups, which we've stolen */
64 sysent[SYS_ioctl].sy_call = ioctl;
66 sysent[SYS_setgroups].sy_call = setgroups;
67 /* give up the stolen syscall entry */
68 sysent[AFS_SYSCALL].sy_narg = 0;
69 sysent[AFS_SYSCALL].sy_call = nosys;
73 KMOD_EXPLICIT_DECL(org.openafs.filesystems.afs, VERSION, afs_modload,