From owner-p4-projects@FreeBSD.ORG Tue Mar 7 16:44:04 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 98CCD16A423; Tue, 7 Mar 2006 16:44:03 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70A5616A422 for ; Tue, 7 Mar 2006 16:44:03 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C83143D45 for ; Tue, 7 Mar 2006 16:44:03 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k27Gi3mA006132 for ; Tue, 7 Mar 2006 16:44:03 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k27Gi2sA006129 for perforce@freebsd.org; Tue, 7 Mar 2006 16:44:02 GMT (envelope-from millert@freebsd.org) Date: Tue, 7 Mar 2006 16:44:02 GMT Message-Id: <200603071644.k27Gi2sA006129@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 92919 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 16:44:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=92919 Change 92919 by millert@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);