summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/man/man4/man4.i386/nvram.413
-rw-r--r--sys/arch/i386/i386/nvram.c12
2 files changed, 2 insertions, 23 deletions
diff --git a/share/man/man4/man4.i386/nvram.4 b/share/man/man4/man4.i386/nvram.4
index c131dc1cfda..e1af6bea010 100644
--- a/share/man/man4/man4.i386/nvram.4
+++ b/share/man/man4/man4.i386/nvram.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: nvram.4,v 1.1 2004/10/03 21:28:34 jcs Exp $
+.\" $OpenBSD: nvram.4,v 1.2 2004/11/11 08:28:28 jcs Exp $
.\"
.\" Copyright 2004 Joshua Stein <jcs@openbsd.org>
.\" All rights reserved.
@@ -42,17 +42,6 @@ This data is provided as a seekable character device,
Checksums of the NVRAM contents are calculated over bytes 2 to 31 and stored
in byte 32.
A valid checksum is required for the driver to initialize.
-.Pp
-Only one process may have this device open at any given time;
-.Xr open 2
-and
-.Xr close 2
-are used to lock and relinquish it.
-An attempt to
-.Fn open
-when another process has the device locked will return \-1 with an
-.Er EBUSY
-error indication.
.Sh FILES
.Bl -tag -width /dev/nvram
.It Pa /dev/nvram
diff --git a/sys/arch/i386/i386/nvram.c b/sys/arch/i386/i386/nvram.c
index 051d19f59c8..d943a2c7d16 100644
--- a/sys/arch/i386/i386/nvram.c
+++ b/sys/arch/i386/i386/nvram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvram.c,v 1.2 2004/10/12 16:17:14 naddy Exp $ */
+/* $OpenBSD: nvram.c,v 1.3 2004/11/11 08:28:28 jcs Exp $ */
/*
* Copyright (c) 2004 Joshua Stein <jcs@openbsd.org>
@@ -52,7 +52,6 @@ int nvramread(dev_t dev, struct uio *uio, int flags);
int nvram_csum_valid(void);
int nvram_get_byte(int byteno);
-static int nvram_opened;
static int nvram_initialized;
void
@@ -65,9 +64,7 @@ nvramattach(int num)
#ifdef NVRAM_DEBUG
printf("nvram: initialized\n");
#endif
-
nvram_initialized = 1;
- nvram_opened = 0;
} else
printf("nvram: invalid checksum\n");
}
@@ -80,22 +77,15 @@ nvramopen(dev_t dev, int flag, int mode, struct proc *p)
if ((minor(dev) != 0) || (!nvram_initialized))
return (ENXIO);
- if (nvram_opened)
- return (EBUSY);
-
if ((flag & FWRITE))
return (EPERM);
- nvram_opened = 1;
-
return (0);
}
int
nvramclose(dev_t dev, int flag, int mode, struct proc *p)
{
- nvram_opened = 0;
-
return (0);
}