Module Name:    src
Committed By:   dennis
Date:           Fri Jan 16 21:38:26 UTC 2015

Modified Files:
        src/sys/sys: namei.src

Log Message:
Don't nest structure definitions.

This modification was made directly to sys/sys/namei.h (1.90) but
was inadvertently lost as a result of the previous revision here.
Restore the lost change here instead.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/sys/namei.src

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/namei.src
diff -u src/sys/sys/namei.src:1.34 src/sys/sys/namei.src:1.35
--- src/sys/sys/namei.src:1.34	Wed Dec 24 19:50:04 2014
+++ src/sys/sys/namei.src	Fri Jan 16 21:38:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: namei.src,v 1.34 2014/12/24 19:50:04 dennis Exp $	*/
+/*	$NetBSD: namei.src,v 1.35 2015/01/16 21:38:26 dennis Exp $	*/
 
 /*
  * Copyright (c) 1985, 1989, 1991, 1993
@@ -77,6 +77,26 @@ void pathbuf_stringcopy_put(struct pathb
 int pathbuf_maybe_copyin(const char *userpath, enum uio_seg seg, struct pathbuf **ret);
 
 /*
+ * Lookup parameters: this structure describes the subset of
+ * information from the nameidata structure that is passed
+ * through the VOP interface.
+ */
+struct componentname {
+	/*
+	 * Arguments to lookup.
+	 */
+	uint32_t	cn_nameiop;	/* namei operation */
+	uint32_t	cn_flags;	/* flags to namei */
+	kauth_cred_t 	cn_cred;	/* credentials */
+	/*
+	 * Shared between lookup and commit routines.
+	 */
+	const char 	*cn_nameptr;	/* pointer to looked up name */
+	size_t		cn_namelen;	/* length of looked up comp */
+	size_t		cn_consume;	/* chars to consume in lookup */
+};
+
+/*
  * Encapsulation of namei parameters.
  */
 struct nameidata {
@@ -107,20 +127,7 @@ struct nameidata {
 	 * information from the nameidata structure that is passed
 	 * through the VOP interface.
 	 */
-	struct componentname {
-		/*
-		 * Arguments to lookup.
-		 */
-		uint32_t	cn_nameiop;	/* namei operation */
-		uint32_t	cn_flags;	/* flags to namei */
-		kauth_cred_t 	cn_cred;	/* credentials */
-		/*
-		 * Shared between lookup and commit routines.
-		 */
-		const char 	*cn_nameptr;	/* pointer to looked up name */
-		size_t		cn_namelen;	/* length of looked up comp */
-		size_t		cn_consume;	/* chars to consume in lookup */
-	} ni_cnd;
+	struct componentname ni_cnd;
 };
 
 /*
@@ -221,8 +228,8 @@ struct cpu_info;
 
 extern pool_cache_t pnbuf_cache;	/* pathname buffer cache */
 
-#define	PNBUF_GET()	pool_cache_get(pnbuf_cache, PR_WAITOK)
-#define	PNBUF_PUT(pnb)	pool_cache_put(pnbuf_cache, (pnb))
+#define	PNBUF_GET()	((char *)pool_cache_get(pnbuf_cache, PR_WAITOK))
+#define	PNBUF_PUT(pnb)	pool_cache_put(pnbuf_cache, (void *)(pnb))
 
 /*
  * Typesafe flags for namei_simple/nameiat_simple.

Reply via email to