diff options
author | obrien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
commit | c2ee1dcc02035d781d6c70f06df7106979a9f870 (patch) | |
tree | 757810dc1fdd19be4c8125ccb9e8beb1aff3d929 /usr.sbin/memcontrol | |
parent | c174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff) | |
download | FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz |
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'usr.sbin/memcontrol')
-rw-r--r-- | usr.sbin/memcontrol/memcontrol.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/memcontrol/memcontrol.c b/usr.sbin/memcontrol/memcontrol.c index e66f2a4..456ac07 100644 --- a/usr.sbin/memcontrol/memcontrol.c +++ b/usr.sbin/memcontrol/memcontrol.c @@ -32,6 +32,7 @@ #include <err.h> #include <fcntl.h> +#include <paths.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -107,8 +108,8 @@ main(int argc, char *argv[]) if (argc < 2) { help(NULL); } else { - if ((memfd = open("/dev/mem", O_RDONLY)) == -1) - err(1, "can't open /dev/mem"); + if ((memfd = open(_PATH_MEM, O_RDONLY)) == -1) + err(1, "can't open %s", _PATH_MEM); for (i = 0; functions[i].cmd != NULL; i++) if (!strcmp(argv[1], functions[i].cmd)) |