From owner-p4-projects@FreeBSD.ORG Thu Jun 18 11:04:25 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1CC9F106566C; Thu, 18 Jun 2009 11:04:25 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D15E8106564A for ; Thu, 18 Jun 2009 11:04:24 +0000 (UTC) (envelope-from jona@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BF94E8FC14 for ; Thu, 18 Jun 2009 11:04:24 +0000 (UTC) (envelope-from jona@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n5IB4OVq000190 for ; Thu, 18 Jun 2009 11:04:24 GMT (envelope-from jona@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n5IB4OpW000188 for perforce@freebsd.org; Thu, 18 Jun 2009 11:04:24 GMT (envelope-from jona@FreeBSD.org) Date: Thu, 18 Jun 2009 11:04:24 GMT Message-Id: <200906181104.n5IB4OpW000188@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jona@FreeBSD.org using -f From: Jonathan Anderson To: Perforce Change Reviews Cc: Subject: PERFORCE change 164657 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: Thu, 18 Jun 2009 11:04:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=164657 Change 164657 by jona@jona-trustedbsd-kentvm on 2009/06/18 11:03:53 Allow passing of error types Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/cap/user_angel/protocol.h#8 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/user_angel/protocol.h#8 (text+ko) ==== @@ -59,6 +59,7 @@ #define FLOAT 0x00000002 #define STRING 0x00000004 #define CAPBOX_OPTIONS 0x00000008 + #define ERROR 0x00000080 #define TYPE_MODIFIER_MASK 0x0000ff00 #define LONG 0x00000100 @@ -75,12 +76,14 @@ /* Unmarshalling functions; calling programs should free the result */ struct cap_wire_datum* cap_marshall_int(int32_t value); struct cap_wire_datum* cap_marshall_string(const char *value, int len); +struct cap_wire_datum* cap_marshall_error(int errno, const char *msg, int msglen); struct cap_wire_datum* cap_marshall_capbox(const struct capbox_options *options); /* Unmarshalling functions; return the number of bytes unmarshalled (or -1) */ int cap_unmarshall_int(const struct cap_wire_datum *d, int32_t *value); int cap_unmarshall_string(const struct cap_wire_datum *d, char* value, int *len); +int cap_unmarshall_error(const struct cap_wire_datum *d, int errno, const char *msg, int msglen); int cap_unmarshall_capbox(const struct cap_wire_datum *d, struct capbox_options *options);