Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs comments on some nfsm_ macros.
details: https://anonhg.NetBSD.org/src/rev/da22404db06e
branches: trunk
changeset: 559516:da22404db06e
user: yamt <yamt%NetBSD.org@localhost>
date: Fri Mar 19 13:52:07 2004 +0000
description:
comments on some nfsm_ macros.
diffstat:
sys/nfs/nfsm_subs.h | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diffs (44 lines):
diff -r 42a72c99880c -r da22404db06e sys/nfs/nfsm_subs.h
--- a/sys/nfs/nfsm_subs.h Fri Mar 19 12:34:39 2004 +0000
+++ b/sys/nfs/nfsm_subs.h Fri Mar 19 13:52:07 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfsm_subs.h,v 1.33 2004/03/15 11:47:52 yamt Exp $ */
+/* $NetBSD: nfsm_subs.h,v 1.34 2004/03/19 13:52:07 yamt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -143,6 +143,19 @@
memcpy((caddr_t)tl, (caddr_t)(f), NFSX_V3FH); \
}
+/*
+ * nfsm_mtofh: dissect a "resulted obj" part of create-like operations
+ * like mkdir.
+ *
+ * for nfsv3, dissect post_op_fh3 and following post_op_attr.
+ * for nfsv2, dissect fhandle and following fattr.
+ *
+ * d: (IN) the vnode of the parent directry.
+ * v: (OUT) the corresponding vnode (we allocate one if needed)
+ * v3: (IN) true for nfsv3.
+ * f: (OUT) true if we got valid filehandle. always true for nfsv2.
+ */
+
#define nfsm_mtofh(d, v, v3, f) \
{ struct nfsnode *ttnp; nfsfh_t *ttfhp; int ttfhsize; \
if (v3) { \
@@ -171,6 +184,14 @@
nfsm_loadattr((v), (struct vattr *)0, 0); \
}
+/*
+ * nfsm_getfh: dissect a filehandle.
+ *
+ * f: (OUT) a filehandle.
+ * s: (OUT) size of the filehandle in bytes.
+ * v3: (IN) true if nfsv3.
+ */
+
#define nfsm_getfh(f, s, v3) \
{ if (v3) { \
nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \
Home |
Main Index |
Thread Index |
Old Index