diff options
| author | 2011-07-07 23:45:00 +0000 | |
|---|---|---|
| committer | 2011-07-07 23:45:00 +0000 | |
| commit | 8ef87afd5654a8ea3f411d8d94175094ee500bd3 (patch) | |
| tree | 66e3e7a8586f6dad4e4a4d39f1b17c995f6a9d18 /sys/dev/diskmap.c | |
| parent | deraadt says disable bluetooth everywhere else too (diff) | |
| download | wireguard-openbsd-8ef87afd5654a8ea3f411d8d94175094ee500bd3.tar.xz wireguard-openbsd-8ef87afd5654a8ea3f411d8d94175094ee500bd3.zip | |
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/diskmap.c')
| -rw-r--r-- | sys/dev/diskmap.c | 3 |
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) |
