Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 May 2009 05:49:09 +0000 (UTC)
From:      Jamie Gritton <jamie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191806 - in head/sys: kern sys
Message-ID:  <200905050549.n455n9mU068587@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905050549.n455n9mU068587>