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 /libexec/bootpd | |
parent | c174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff) | |
download | FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz |
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'libexec/bootpd')
-rw-r--r-- | libexec/bootpd/bootpd.c | 3 | ||||
-rw-r--r-- | libexec/bootpd/bootpgw/bootpgw.c | 5 | ||||
-rw-r--r-- | libexec/bootpd/getether.c | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c index 216e08f..aac6263 100644 --- a/libexec/bootpd/bootpd.c +++ b/libexec/bootpd/bootpd.c @@ -65,6 +65,7 @@ SOFTWARE. #include <errno.h> #include <ctype.h> #include <netdb.h> +#include <paths.h> #include <syslog.h> #include <assert.h> @@ -395,7 +396,7 @@ main(argc, argv) #ifdef NO_SETSID setpgrp(0,0); #ifdef TIOCNOTTY - n = open("/dev/tty", O_RDWR); + n = open(_PATH_TTY, O_RDWR); if (n >= 0) { ioctl(n, TIOCNOTTY, (char *) 0); (void) close(n); diff --git a/libexec/bootpd/bootpgw/bootpgw.c b/libexec/bootpd/bootpgw/bootpgw.c index b552eb3..7271a7a 100644 --- a/libexec/bootpd/bootpgw/bootpgw.c +++ b/libexec/bootpd/bootpgw/bootpgw.c @@ -25,6 +25,8 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ +/* $FreeBSD$ */ + /* * BOOTPGW is typically used to forward BOOTP client requests from * one subnet to a BOOTP server on a different subnet. @@ -54,6 +56,7 @@ SOFTWARE. #include <errno.h> #include <ctype.h> #include <netdb.h> +#include <paths.h> #include <syslog.h> #include <assert.h> @@ -372,7 +375,7 @@ main(argc, argv) #ifdef NO_SETSID setpgrp(0,0); #ifdef TIOCNOTTY - n = open("/dev/tty", O_RDWR); + n = open(_PATH_TTY, O_RDWR); if (n >= 0) { ioctl(n, TIOCNOTTY, (char *) 0); (void) close(n); diff --git a/libexec/bootpd/getether.c b/libexec/bootpd/getether.c index 8f95a59..071b5fc 100644 --- a/libexec/bootpd/getether.c +++ b/libexec/bootpd/getether.c @@ -18,6 +18,7 @@ #endif #include <ctype.h> +#include <paths.h> #include <syslog.h> #include "getether.h" @@ -195,7 +196,7 @@ getether(ifname, eap) char *enaddr; int unit = -1; /* which unit to attach */ - snprintf(devname, sizeof(devname), "/dev/%s", ifname); + snprintf(devname, sizeof(devname), "%s%s", _PATH_DEV, ifname); fd = open(devname, 2); if (fd < 0) { /* Try without the trailing digit. */ |