summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-07 23:45:01 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-07 23:45:01 +0000
commita6f6d4ae7f4c39fb7c43f0efb6e2ba80805bc886 (patch)
treef1ceb953aa46a8915d2ddf6404f7846f3a9dfbce /sys/dev
parentf13884981a67ed7d87352c2dd4950c71bb16a7f4 (diff)
Add new syscall entries to support the openat(2) family of functions
added in POSIX Issue 7: openat(), mknodat(), mkfifoat(), linkat(), symlinkat(), unlinkat(), faccessat(), fstatat(), readlinkat(), fchmodat(), fchownat(), utimensat(), renameat(), and mkdirat(). This diff mostly just refactors the existing sys_foo() logic into a common dofooat() function that can then be called by both sys_foo() and sys_fooat(). Some of the new system calls support new flags to control their behavior, and proper support for these will be added in subsequent diffs. Incorporating suggestions from thib@, guenther@, and tedu@. ok tedu@, thib@, deraadt@, guenther@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/diskmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/diskmap.c b/sys/dev/diskmap.c
index 62da4c2de3d..c2197d8abd7 100644
--- a/sys/dev/diskmap.c
+++ b/sys/dev/diskmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskmap.c,v 1.5 2011/07/02 16:53:17 jsing Exp $ */
+/* $OpenBSD: diskmap.c,v 1.6 2011/07/07 23:45:00 matthew Exp $ */
/*
* Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org>
@@ -85,6 +85,7 @@ diskmapioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
goto bad;
ndp.ni_segflg = UIO_SYSSPACE;
+ ndp.ni_dirfd = AT_FDCWD;
ndp.ni_dirp = devname;
ndp.ni_cnd.cn_proc = p;
if ((error = vn_open(&ndp, fp->f_flag, 0)) != 0)