Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/sys Implement the needed part of Solaris...
details: https://anonhg.NetBSD.org/src/rev/d497f1894aa7
branches: trunk
changeset: 999155:d497f1894aa7
user: hannken <hannken%NetBSD.org@localhost>
date: Wed May 22 08:42:57 2019 +0000
description:
Implement the needed part of Solaris lookupname().
Remove unneeded protoype lookupnameat().
diffstat:
external/cddl/osnet/sys/kern/vfs.c | 33 +++++++++++----------------------
external/cddl/osnet/sys/sys/pathname.h | 4 +---
2 files changed, 12 insertions(+), 25 deletions(-)
diffs (73 lines):
diff -r c75d29d499ed -r d497f1894aa7 external/cddl/osnet/sys/kern/vfs.c
--- a/external/cddl/osnet/sys/kern/vfs.c Wed May 22 08:31:25 2019 +0000
+++ b/external/cddl/osnet/sys/kern/vfs.c Wed May 22 08:42:57 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs.c,v 1.7 2018/05/28 21:05:09 chs Exp $ */
+/* $NetBSD: vfs.c,v 1.8 2019/05/22 08:42:57 hannken Exp $ */
/*-
* Copyright (c) 2006-2007 Pawel Jakub Dawidek <pjd%FreeBSD.org@localhost>
@@ -40,35 +40,24 @@
#include <lib/libkern/libkern.h>
int
-lookupname(char *dirname, enum uio_seg seg, enum symfollow follow, vnode_t **dirvpp, vnode_t **compvpp)
+lookupname(char *dirname, enum uio_seg seg, enum symfollow follow,
+ vnode_t **dirvpp, vnode_t **compvpp)
{
- return (lookupnameat(dirname, seg, follow, dirvpp, compvpp, NULL));
-}
-
-int
-lookupnameat(char *dirname, enum uio_seg seg, enum symfollow follow,
- vnode_t **dirvpp, vnode_t **compvpp, vnode_t *startvp)
-{
-
- struct nameidata nd;
int error;
- error = EOPNOTSUPP;
-
-/* XXX Disable until I upgrade testing kernel.
- KASSERT(dirvpp == NULL);
-
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, dirname);
+ KASSERT(seg == UIO_SYSSPACE);
+ KASSERT(dirvpp == NULL);
- if ((error = nameiat(&nd, startvp)) != 0)
- return error;
+ *compvpp = NULL;
+ error = namei_simple_kernel(dirname,
+ follow == FOLLOW ? NSM_FOLLOW_NOEMULROOT : NSM_NOFOLLOW_NOEMULROOT,
+ compvpp);
- *compvpp = nd.ni_vp;*/
+ KASSERT(error == 0 || *compvpp == NULL);
- return (error);
+ return error;
}
-
void
vfs_setmntopt(vfs_t *vfsp, const char *name, const char *arg,
int flags)
diff -r c75d29d499ed -r d497f1894aa7 external/cddl/osnet/sys/sys/pathname.h
--- a/external/cddl/osnet/sys/sys/pathname.h Wed May 22 08:31:25 2019 +0000
+++ b/external/cddl/osnet/sys/sys/pathname.h Wed May 22 08:42:57 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pathname.h,v 1.4 2018/05/28 21:05:10 chs Exp $ */
+/* $NetBSD: pathname.h,v 1.5 2019/05/22 08:42:57 hannken Exp $ */
/*-
* Copyright (c) 2007 Pawel Jakub Dawidek <pjd%FreeBSD.org@localhost>
@@ -46,8 +46,6 @@
#define NO_FOLLOW NOFOLLOW
int lookupname(char *, enum uio_seg, enum symfollow, vnode_t **, vnode_t **);
-int lookupnameat(char *, enum uio_seg, enum symfollow, vnode_t **, vnode_t **,
- vnode_t *);
#endif /* _KERNEL */
Home |
Main Index |
Thread Index |
Old Index