Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Rename the new ni_startdir (the slot used to hold the st...
details: https://anonhg.NetBSD.org/src/rev/5c482852af98
branches: trunk
changeset: 782546:5c482852af98
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Nov 05 19:06:26 2012 +0000
description:
Rename the new ni_startdir (the slot used to hold the starting point
for openat() and friends) to ni_atdir to avoid confusion with a
previously existing (and, alas, still documented) ni_startdir field
that meant something else entirely.
diffstat:
sys/kern/vfs_lookup.c | 24 ++++++++++++------------
sys/nfs/nfs_srvsubs.c | 6 +++---
sys/sys/namei.src | 8 ++++----
3 files changed, 19 insertions(+), 19 deletions(-)
diffs (141 lines):
diff -r 83c58627f806 -r 5c482852af98 sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c Mon Nov 05 17:31:53 2012 +0000
+++ b/sys/kern/vfs_lookup.c Mon Nov 05 19:06:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_lookup.c,v 1.197 2012/11/05 17:24:11 dholland Exp $ */
+/* $NetBSD: vfs_lookup.c,v 1.198 2012/11/05 19:06:26 dholland Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.197 2012/11/05 17:24:11 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.198 2012/11/05 19:06:26 dholland Exp $");
#include "opt_magiclinks.h"
@@ -564,8 +564,8 @@
curdir = cwdi->cwdi_cdir;
if (ndp->ni_pnbuf[0] != '/') {
- if (ndp->ni_startdir != NULL) {
- startdir = ndp->ni_startdir;
+ if (ndp->ni_atdir != NULL) {
+ startdir = ndp->ni_atdir;
} else {
startdir = curdir;
}
@@ -601,14 +601,14 @@
static struct vnode *
namei_getstartdir_for_nfsd(struct namei_state *state)
{
- KASSERT(state->ndp->ni_startdir != NULL);
+ KASSERT(state->ndp->ni_atdir != NULL);
/* always use the real root, and never set an emulation root */
state->ndp->ni_rootdir = rootvnode;
state->ndp->ni_erootdir = NULL;
- vref(state->ndp->ni_startdir);
- return state->ndp->ni_startdir;
+ vref(state->ndp->ni_atdir);
+ return state->ndp->ni_atdir;
}
@@ -1518,8 +1518,8 @@
struct namei_state state;
int error;
- KASSERT(ndp->ni_startdir == NULL);
- ndp->ni_startdir = forcecwd;
+ KASSERT(ndp->ni_atdir == NULL);
+ ndp->ni_atdir = forcecwd;
namei_init(&state, ndp);
error = namei_tryemulroot(&state,
@@ -1564,7 +1564,7 @@
KASSERT(cnp == &ndp->ni_cnd);
- startdir = state->ndp->ni_startdir;
+ startdir = state->ndp->ni_atdir;
cnp->cn_nameptr = ndp->ni_pnbuf;
state->docache = 1;
@@ -1631,8 +1631,8 @@
struct namei_state state;
int error;
- KASSERT(ndp->ni_startdir == NULL);
- ndp->ni_startdir = startdir;
+ KASSERT(ndp->ni_atdir == NULL);
+ ndp->ni_atdir = startdir;
/*
* Note: the name sent in here (is not|should not be) allowed
diff -r 83c58627f806 -r 5c482852af98 sys/nfs/nfs_srvsubs.c
--- a/sys/nfs/nfs_srvsubs.c Mon Nov 05 17:31:53 2012 +0000
+++ b/sys/nfs/nfs_srvsubs.c Mon Nov 05 19:06:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_srvsubs.c,v 1.13 2012/10/13 17:46:50 dholland Exp $ */
+/* $NetBSD: nfs_srvsubs.c,v 1.14 2012/11/05 19:06:27 dholland Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_srvsubs.c,v 1.13 2012/10/13 17:46:50 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_srvsubs.c,v 1.14 2012/11/05 19:06:27 dholland Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -241,7 +241,7 @@
path = cp;
}
- ndp->ni_startdir = NULL;
+ ndp->ni_atdir = NULL;
ndp->ni_pathbuf = pathbuf_assimilate(path);
if (ndp->ni_pathbuf == NULL) {
error = ENOMEM;
diff -r 83c58627f806 -r 5c482852af98 sys/sys/namei.src
--- a/sys/sys/namei.src Mon Nov 05 17:31:53 2012 +0000
+++ b/sys/sys/namei.src Mon Nov 05 19:06:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: namei.src,v 1.29 2012/11/05 17:27:37 dholland Exp $ */
+/* $NetBSD: namei.src,v 1.30 2012/11/05 19:06:26 dholland Exp $ */
/*
* Copyright (c) 1985, 1989, 1991, 1993
@@ -83,7 +83,7 @@
/*
* Arguments to namei/lookup.
*/
- struct vnode *ni_startdir; /* starting dir, cwd if null */
+ struct vnode *ni_atdir; /* startup dir, cwd if null */
struct pathbuf *ni_pathbuf; /* pathname container */
char *ni_pnbuf; /* extra pathname buffer ref (XXX) */
/*
@@ -168,7 +168,7 @@
#define NDINIT(ndp, op, flags, pathbuf) { \
(ndp)->ni_cnd.cn_nameiop = op; \
(ndp)->ni_cnd.cn_flags = flags; \
- (ndp)->ni_startdir = NULL; \
+ (ndp)->ni_atdir = NULL; \
(ndp)->ni_pathbuf = pathbuf; \
(ndp)->ni_cnd.cn_cred = kauth_cred_get(); \
}
@@ -177,7 +177,7 @@
* Use this to set the start directory for openat()-type operations.
*/
#define NDAT(ndp, dir) { \
- (ndp)->ni_startdir = (dir); \
+ (ndp)->ni_atdir = (dir); \
}
#endif
Home |
Main Index |
Thread Index |
Old Index