svn commit: r191806 - in head/sys: kern sys

Jamie Gritton jamie at FreeBSD.org
Tue May 5 05:49:09 UTC 2009


Author: jamie
Date: Tue May  5 05:49:08 2009
New Revision: 191806
URL: http://svn.freebsd.org/changeset/base/191806

Log:
  Add a constant PR_MAXMETHOD to better define the jail/OSD interface.
  
  Reviewed by:	dchagin, kib
  Approved by:	bz (mentor)

Modified:
  head/sys/kern/kern_osd.c
  head/sys/sys/jail.h

Modified: head/sys/kern/kern_osd.c
==============================================================================
--- head/sys/kern/kern_osd.c	Tue May  5 03:51:41 2009	(r191805)
+++ head/sys/kern/kern_osd.c	Tue May  5 05:49:08 2009	(r191806)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/systm.h>
 #include <sys/sysctl.h>
 #include <sys/errno.h>
+#include <sys/jail.h>
 #include <sys/malloc.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
@@ -73,7 +74,7 @@ static osd_method_t *osd_methods[OSD_LAS
 static u_int osd_nslots[OSD_LAST + 1];			/* (m) */
 static osd_destructor_t *osd_destructors[OSD_LAST + 1];	/* (o) */
 static const u_int osd_nmethods[OSD_LAST + 1] = {
-	[OSD_JAIL] = 5,
+	[OSD_JAIL] = PR_MAXMETHOD,
 };
 
 static struct sx osd_module_lock[OSD_LAST + 1];

Modified: head/sys/sys/jail.h
==============================================================================
--- head/sys/sys/jail.h	Tue May  5 03:51:41 2009	(r191805)
+++ head/sys/sys/jail.h	Tue May  5 05:49:08 2009	(r191806)
@@ -189,6 +189,7 @@ struct prison {
 #define	PR_METHOD_SET		2
 #define	PR_METHOD_CHECK		3
 #define	PR_METHOD_ATTACH	4
+#define	PR_MAXMETHOD		5
 
 /*
  * Sysctl-set variables that determine global jail policy


More information about the svn-src-all mailing list