diff options
Diffstat (limited to 'sys/dev/diskmap.c')
-rw-r--r-- | sys/dev/diskmap.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/diskmap.c b/sys/dev/diskmap.c index d99591e1857..ef3e90c517d 100644 --- a/sys/dev/diskmap.c +++ b/sys/dev/diskmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diskmap.c,v 1.14 2016/03/19 12:04:15 natano Exp $ */ +/* $OpenBSD: diskmap.c,v 1.15 2016/04/29 14:40:36 beck Exp $ */ /* * Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org> @@ -37,6 +37,7 @@ #include <sys/proc.h> #include <sys/vnode.h> #include <sys/pledge.h> +#include <sys/namei.h> int diskmapopen(dev_t dev, int flag, int fmt, struct proc *p) @@ -85,10 +86,7 @@ diskmapioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) fdp = p->p_fd; fdplock(fdp); - ndp.ni_segflg = UIO_SYSSPACE; - ndp.ni_dirfd = AT_FDCWD; - ndp.ni_dirp = devname; - ndp.ni_cnd.cn_proc = p; + NDINIT(&ndp, 0, 0, UIO_SYSSPACE, devname, p); ndp.ni_pledge = PLEDGE_RPATH; if ((error = vn_open(&ndp, fp->f_flag, 0)) != 0) goto bad; |