diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 2000-12-11 01:03:42 +0000 |
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 2000-12-11 01:03:42 +0000 |
| commit | 6034d13a9ed650ee88ae94550adc86ef25441310 (patch) | |
| tree | 6e0c502d67cc546866c1072128e560fd9249bc3f /lib/libio/bwx.c | |
| parent | b67b2ea4cec679f2f5c3a7bd797837b22b8c9387 (diff) | |
Notes
Diffstat (limited to 'lib/libio/bwx.c')
| -rw-r--r-- | lib/libio/bwx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libio/bwx.c b/lib/libio/bwx.c index dede88184801..f923572e1072 100644 --- a/lib/libio/bwx.c +++ b/lib/libio/bwx.c @@ -31,6 +31,7 @@ #include <sys/fcntl.h> #include <sys/sysctl.h> #include <err.h> +#include <paths.h> #include <machine/bwx.h> #include <machine/sysarch.h> #include <stdlib.h> @@ -52,9 +53,9 @@ bwx_init() size_t len = sizeof(u_int64_t); int error; - mem_fd = open("/dev/mem", O_RDWR); + mem_fd = open(_PATH_MEM, O_RDWR); if (mem_fd < 0) - err(1, "/dev/mem"); + err(1, _PATH_MEM); bwx_int1_ports = mmap(0, 1L<<32, PROT_READ, MAP_ANON, -1, 0); bwx_int2_ports = mmap(0, 1L<<32, PROT_READ, MAP_ANON, -1, 0); bwx_int4_ports = mmap(0, 1L<<32, PROT_READ, MAP_ANON, -1, 0); |
