PERFORCE change 174087 for review

Robert Watson rwatson at FreeBSD.org
Mon Feb 1 14:09:49 UTC 2010


http://p4web.freebsd.org/chv.cgi?CH=174087

Change 174087 by rwatson at rwatson_vimage_client on 2010/02/01 14:08:49

	Layout fixes, comment that we'll make the _size a private function.

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#9 edit

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#9 (text+ko) ====

@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#8 $
+ * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum.h#9 $
  */
 
 #ifndef _LIBCAPABILITY_H_
@@ -53,16 +53,20 @@
 	int		 lcl_fd;
 };
 
-
-/* A list of file descriptors, which can be passed around in shared memory. */
+/*
+ * A list of file descriptors, which can be passed around in shared memory.
+ */
 struct lc_fdlist;
+struct lc_fdlist	*lc_fdlist_new(void);
+struct lc_fdlist	*lc_fdlist_global(void);
+struct lc_fdlist	*lc_fdlist_dup(struct lc_fdlist *lfp_orig);
+void			 lc_fdlist_free(struct lc_fdlist *lfp);
 
-struct lc_fdlist*	lc_fdlist_new(void);
-struct lc_fdlist*	lc_fdlist_global(void);
-struct lc_fdlist*	lc_fdlist_dup(struct lc_fdlist *lfp_orig);
-void			lc_fdlist_free(struct lc_fdlist *lfp);
-
-/* Size of an FD list in bytes, including all associated string data. */
+/*
+ * Size of an FD list in bytes, including all associated string data.
+ *
+ * XXX: This will probably become library-private soon.
+ */
 u_int	lc_fdlist_size(struct lc_fdlist *lfp);
 
 /*
@@ -84,29 +88,29 @@
 
 
 /*
- * Like lc_fdlist_add(), but allows capability rights to be specified. The file
- * descriptor will be wrapped in a capability with the given rights (so if the
- * descriptor *is* a capability, its rights will be constrained according to this
- * rights mask)
+ * Like lc_fdlist_add(), but allows capability rights to be specified.  The
+ * file descriptor will be wrapped in a capability with the given rights (so
+ * if the descriptor *is* a capability, its rights will be constrained
+ * according to this rights mask.)
  */
-int	lc_fdlist_addcap(struct lc_fdlist *l,
-	                 const char *subsystem, const char *classname,
-	                 const char *name, int fd, cap_rights_t rights);
+int	lc_fdlist_addcap(struct lc_fdlist *l, const char *subsystem,
+	    const char *classname, const char *name, int fd,
+	    cap_rights_t rights);
 
 /*
  * Look up a file descriptor.
  *
  * Multiple entries with the same classname are allowed, so iterating through
- * all instances of a class is done by supplying an integer 'pos' which is used
- * internally to skip entries which have already been seen. If 'pos' is 0 or NULL,
- * the first matching entry will be returned.
+ * all instances of a class is done by supplying an integer 'pos' which is
+ * used internally to skip entries which have already been seen.  If 'pos' is
+ * 0 or NULL, the first matching entry will be returned.
  */
 int	lc_fdlist_lookup(struct lc_fdlist *lfp, const char *subsystem,
 	    const char *classname, char **name, int *fdp, int *pos);
 
 /*
- * Look up a file descriptor without a name. Repeated calls to this function will
- * iterate through all descriptors in the list.
+ * Look up a file descriptor without a name.  Repeated calls to this function
+ * will iterate through all descriptors in the list.
  */
 int	lc_fdlist_getentry(struct lc_fdlist *lfp, char **subsystem,
 	    char **classname, char **name, int *fdp, int *pos);
@@ -114,9 +118,9 @@
 /*
  * Reorder FD list (WARNING: this could be dangerous!).
  *
- * This call takes all of the file descriptors in the FD list, and moves them into
- * a continuous array, starting at the FD given by 'start'. Any file descriptors
- * above 'start' which are not in the FD list are closed.
+ * This call takes all of the file descriptors in the FD list, and moves them
+ * into a continuous array, starting at the FD given by 'start'.  Any file
+ * descriptors above 'start' which are not in the FD list are closed.
  */
 int	lc_fdlist_reorder(struct lc_fdlist *lfp);
 


More information about the p4-projects mailing list