diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdlib/malloc.c | 3 | ||||
-rw-r--r-- | lib/libio/bwx.c | 5 | ||||
-rw-r--r-- | lib/libio/swiz.c | 5 | ||||
-rw-r--r-- | lib/libkvm/kvm_getswapinfo.c | 3 | ||||
-rw-r--r-- | lib/libss/pager.c | 5 |
5 files changed, 14 insertions, 7 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index bb6bb6f..91236df 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -72,7 +72,7 @@ static int fdzero; # define MMAP_FD fdzero # define INIT_MMAP() \ - { if ((fdzero = _open("/dev/zero", O_RDWR, 0000)) == -1) \ + { if ((fdzero = _open(_PATH_DEVZERO, O_RDWR, 0000)) == -1) \ wrterror("open of /dev/zero"); } # define MADV_FREE MADV_DONTNEED #endif /* __sparc__ */ @@ -91,6 +91,7 @@ #include <sys/mman.h> #include <errno.h> #include <fcntl.h> +#include <paths.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> diff --git a/lib/libio/bwx.c b/lib/libio/bwx.c index dede881..f923572 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); diff --git a/lib/libio/swiz.c b/lib/libio/swiz.c index bee9f6d..b30dfa3f 100644 --- a/lib/libio/swiz.c +++ b/lib/libio/swiz.c @@ -31,6 +31,7 @@ #include <sys/fcntl.h> #include <sys/sysctl.h> #include <err.h> +#include <paths.h> #include <machine/swiz.h> #include <machine/sysarch.h> #include <stdlib.h> @@ -54,9 +55,9 @@ swiz_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); swiz_ports = mmap(0, 1L<<32, PROT_READ, MAP_ANON, -1, 0); if ((error = sysctlbyname("hw.chipset.ports", &swiz_io_base, &len, diff --git a/lib/libkvm/kvm_getswapinfo.c b/lib/libkvm/kvm_getswapinfo.c index 3a4ab77..fe742ad 100644 --- a/lib/libkvm/kvm_getswapinfo.c +++ b/lib/libkvm/kvm_getswapinfo.c @@ -27,6 +27,7 @@ static const char rcsid[] = #include <fcntl.h> #include <kvm.h> #include <nlist.h> +#include <paths.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -187,7 +188,7 @@ kvm_getswapinfo( swap_ary[i].ksw_devname, sizeof(swap_ary[i].ksw_devname), "%s%s", - ((flags & SWIF_DEV_PREFIX) ? "/dev/" : ""), + ((flags & SWIF_DEV_PREFIX) ? _PATH_DEV : ""), devname(swinfo.sw_dev, S_IFCHR) ); } diff --git a/lib/libss/pager.c b/lib/libss/pager.c index 988f8d9..deea0ba 100644 --- a/lib/libss/pager.c +++ b/lib/libss/pager.c @@ -9,11 +9,14 @@ * For copyright information, see copyright.h. */ +/* $FreeBSD$ */ + #include "ss_internal.h" #include "copyright.h" #include <errno.h> #include <stdio.h> #include <sys/file.h> +#include <paths.h> #include <signal.h> #include <unistd.h> @@ -61,7 +64,7 @@ int ss_pager_create() int ss_pager_create() { int fd; - fd = open("/dev/tty", O_WRONLY, 0); + fd = open(_PATH_TTY, O_WRONLY, 0); return fd; } #endif |