summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-09-20 13:51:20 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-09-20 13:51:20 +0000
commitaff164e3dc2d93984a5509aeefb0efe5542f6343 (patch)
tree1d0039490fd7f266c9a0ec3db21ea11f1e8905da /usr.sbin
parentf36fa7376b2cb66322f3072979cb62f703828e1f (diff)
Make vnd(4) work on read-only file systems, from Paul Stoeber, okay tedu@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/vnconfig/vnconfig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/vnconfig/vnconfig.c b/usr.sbin/vnconfig/vnconfig.c
index e2dfe2769c9..589a364ac0a 100644
--- a/usr.sbin/vnconfig/vnconfig.c
+++ b/usr.sbin/vnconfig/vnconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnconfig.c,v 1.18 2006/07/01 07:36:27 jmc Exp $ */
+/* $OpenBSD: vnconfig.c,v 1.19 2006/09/20 13:51:19 pedro Exp $ */
/*
* Copyright (c) 1993 University of Utah.
* Copyright (c) 1990, 1993
@@ -226,9 +226,9 @@ config(char *dev, char *file, int action, char *key, size_t keylen)
char *rdev;
int rv;
- if (opendev(dev, O_RDWR, OPENDEV_PART, &rdev) < 0)
+ if (opendev(dev, O_RDONLY, OPENDEV_PART, &rdev) < 0)
err(4, "%s", rdev);
- f = fopen(rdev, "rw");
+ f = fopen(rdev, "r");
if (f == NULL) {
warn("%s", rdev);
rv = -1;