summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cdcontrol
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-12-09 09:35:55 +0000
committerobrien <obrien@FreeBSD.org>2000-12-09 09:35:55 +0000
commitc2ee1dcc02035d781d6c70f06df7106979a9f870 (patch)
tree757810dc1fdd19be4c8125ccb9e8beb1aff3d929 /usr.sbin/cdcontrol
parentc174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff)
downloadFreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip
FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'usr.sbin/cdcontrol')
-rw-r--r--usr.sbin/cdcontrol/cdcontrol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/cdcontrol/cdcontrol.c b/usr.sbin/cdcontrol/cdcontrol.c
index d5a754e..0161bdd 100644
--- a/usr.sbin/cdcontrol/cdcontrol.c
+++ b/usr.sbin/cdcontrol/cdcontrol.c
@@ -26,6 +26,7 @@ static const char rcsid[] =
#include <ctype.h>
#include <err.h>
#include <errno.h>
+#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -1141,7 +1142,7 @@ int open_cd ()
if (*cdname == '/') {
snprintf (devbuf, MAXPATHLEN, "%s", cdname);
} else {
- snprintf (devbuf, MAXPATHLEN, "/dev/%s", cdname);
+ snprintf (devbuf, MAXPATHLEN, "%s%s", _PATH_DEV, cdname);
}
fd = open (devbuf, O_RDONLY);
OpenPOWER on IntegriCloud