PERFORCE change 92919 for review

Todd Miller millert at FreeBSD.org
Tue Mar 7 08:44:05 PST 2006


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

Change 92919 by millert at millert_ibook on 2006/03/07 16:43:19

	Add label type defines for lh_type and set them in labelh_new()
	and labelh_new_user().

Affected files ...

.. //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/ipc/ipc_labelh.c#7 edit
.. //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/ipc/ipc_labelh.h#8 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/ipc/ipc_labelh.c#7 (text+ko) ====

@@ -74,7 +74,7 @@
 	io_lock_init(lh);
 	lh->lh_port = port;
 	lh->lh_label = *inl;
-	lh->lh_type = 0;
+	lh->lh_type = LABELH_TYPE_USER;
 	lh->lh_references = 1;
 
 	/* Must call ipc_kobject_set() with port unlocked. */
@@ -118,7 +118,7 @@
 	lh = (ipc_labelh_t)zalloc(ipc_labelh_zone);
 	io_lock_init(lh);
 	lh->lh_port = ipc_port_alloc_kernel();
-	lh->lh_type = 0;
+	lh->lh_type = LABELH_TYPE_KERN;
 	lh->lh_references = 1;
 	ip_unlock(lh->lh_port);
 

==== //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/ipc/ipc_labelh.h#8 (text+ko) ====

@@ -44,6 +44,9 @@
 #endif
 } *ipc_labelh_t;
 
+#define	LABELH_TYPE_KERN	0
+#define	LABELH_TYPE_USER	1
+
 ipc_labelh_t labelh_duplicate(ipc_labelh_t old);
 ipc_labelh_t labelh_modify(ipc_labelh_t old);
 ipc_labelh_t labelh_new(void);


More information about the trustedbsd-cvs mailing list