Module Name:    src
Committed By:   yamt
Date:           Wed Mar  6 11:40:22 UTC 2013

Modified Files:
        src/sys/fs/puffs: puffs_node.c

Log Message:
comments
use sizeof(var) instead of sizeof(type) where possibly confusing


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/fs/puffs/puffs_node.c

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

Modified files:

Index: src/sys/fs/puffs/puffs_node.c
diff -u src/sys/fs/puffs/puffs_node.c:1.28 src/sys/fs/puffs/puffs_node.c:1.29
--- src/sys/fs/puffs/puffs_node.c:1.28	Mon Nov  5 17:27:38 2012
+++ src/sys/fs/puffs/puffs_node.c	Wed Mar  6 11:40:22 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_node.c,v 1.28 2012/11/05 17:27:38 dholland Exp $	*/
+/*	$NetBSD: puffs_node.c,v 1.29 2013/03/06 11:40:22 yamt Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_node.c,v 1.28 2012/11/05 17:27:38 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_node.c,v 1.29 2013/03/06 11:40:22 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/hash.h>
@@ -279,7 +279,7 @@ puffs_cookie2hashlist(struct puffs_mount
 {
 	uint32_t hash;
 
-	hash = hash32_buf(&ck, sizeof(void *), HASH32_BUF_INIT);
+	hash = hash32_buf(&ck, sizeof(ck), HASH32_BUF_INIT);
 	return &pmp->pmp_pnodehash[hash % pmp->pmp_npnodehash];
 }
 
@@ -366,11 +366,18 @@ puffs_makeroot(struct puffs_mount *pmp)
 
 /*
  * Locate the in-kernel vnode based on the cookie received given
- * from userspace.  Returns a vnode, if found, NULL otherwise.
+ * from userspace.
  * The parameter "lock" control whether to lock the possible or
  * not.  Locking always might cause us to lock against ourselves
  * in situations where we want the vnode but don't care for the
  * vnode lock, e.g. file server issued putpages.
+ *
+ * returns 0 on success.  otherwise returns an errno or PUFFS_NOSUCHCOOKIE.
+ *
+ * returns PUFFS_NOSUCHCOOKIE if no vnode for the cookie is found.
+ * in that case, if willcreate=true, the pmp_newcookie list is populated with
+ * the given cookie.  it's the caller's responsibility to consume the entry
+ * with calling puffs_getvnode.
  */
 int
 puffs_cookie2vnode(struct puffs_mount *pmp, puffs_cookie_t ck, int lock,

Reply via email to