aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2000-07-04 03:34:11 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2000-07-04 03:34:11 +0000
commite6796b67d904cd5e64c1befaa6eb3200bb695a20 (patch)
tree4cb398edaf71d7e06911c3ad81417c0a80701b84 /sys/dev
parent376421966340ae99bc19236777d3df7f0915fee6 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ccd/ccd.c5
-rw-r--r--sys/dev/vn/vn.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index 3f62c1ad5138..5a478f71abec 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -1538,10 +1538,11 @@ ccdlookup(path, p, vpp)
{
struct nameidata nd;
struct vnode *vp;
- int error;
+ int error, flags;
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, path, p);
- if ((error = vn_open(&nd, FREAD|FWRITE, 0)) != 0) {
+ flags = FREAD | FWRITE;
+ if ((error = vn_open(&nd, &flags, 0)) != 0) {
#ifdef DEBUG
if (ccddebug & CCDB_FOLLOW|CCDB_INIT)
printf("ccdlookup: vn_open error = %d\n", error);
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c
index 29f4e7a54453..88e3801fdd95 100644
--- a/sys/dev/vn/vn.c
+++ b/sys/dev/vn/vn.c
@@ -539,13 +539,13 @@ vniocattach_file(vn, vio, dev, flag, p)
flags = FREAD|FWRITE;
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, vio->vn_file, p);
- error = vn_open(&nd, flags, 0);
+ error = vn_open(&nd, &flags, 0);
if (error) {
if (error != EACCES && error != EPERM && error != EROFS)
return (error);
flags &= ~FWRITE;
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, vio->vn_file, p);
- error = vn_open(&nd, flags, 0);
+ error = vn_open(&nd, &flags, 0);
if (error)
return (error);
}