PERFORCE change 79328 for review

Peter Wemm peter at FreeBSD.org
Thu Jun 30 20:09:22 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=79328

Change 79328 by peter at peter_daintree on 2005/06/30 20:08:44

	Replicate syscalls added by kernel modules from main to ia32. This
	is for a local problem.

Affected files ...

.. //depot/projects/hammer/sys/kern/kern_syscalls.c#4 edit

Differences ...

==== //depot/projects/hammer/sys/kern/kern_syscalls.c#4 (text+ko) ====

@@ -27,6 +27,8 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/sys/kern/kern_syscalls.c,v 1.11 2004/07/15 08:26:05 phk Exp $");
 
+#include "opt_compat.h"
+
 #include <sys/param.h>
 #include <sys/sysproto.h>
 #include <sys/sysent.h>
@@ -36,6 +38,10 @@
 #include <sys/sx.h>
 #include <sys/module.h>
 
+#ifdef COMPAT_IA32
+extern struct sysent freebsd32_sysent[];
+#endif
+
 /*
  * Acts like "nosys" but can be identified in sysent for dynamic call 
  * number assignment for a limited number of calls. 
@@ -75,14 +81,21 @@
 
        *old_sysent = sysent[*offset];
        sysent[*offset] = *new_sysent;
+#ifdef COMPAT_IA32
+	freebsd32_sysent[*offset] = *new_sysent;
+#endif
        return 0;
 }
 
 int
 syscall_deregister(int *offset, struct sysent *old_sysent)
 {
-       if (*offset)
+       if (*offset) {
                sysent[*offset] = *old_sysent;
+#ifdef COMPAT_IA32
+		freebsd32_sysent[*offset] = freebsd32_sysent[0];
+#endif
+	}
        return 0;
 }
 


More information about the p4-projects mailing list