summaryrefslogtreecommitdiffstats
path: root/sbin/pc98
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 /sbin/pc98
parentc174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff)
downloadFreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip
FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'sbin/pc98')
-rw-r--r--sbin/pc98/fdisk/fdisk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/pc98/fdisk/fdisk.c b/sbin/pc98/fdisk/fdisk.c
index 39faadd..9fe2773 100644
--- a/sbin/pc98/fdisk/fdisk.c
+++ b/sbin/pc98/fdisk/fdisk.c
@@ -35,6 +35,7 @@ static const char rcsid[] =
#include <fcntl.h>
#include <err.h>
#include <errno.h>
+#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -331,11 +332,11 @@ main(int argc, char *argv[])
{
static char realname[12];
- if(strncmp(argv[0], "/dev", 4) == 0)
+ if(strncmp(argv[0], _PATH_DEV, sizeof _PATH_DEV - 2) == 0)
disk = argv[0];
else
{
- snprintf(realname, 12, "/dev/%s", argv[0]);
+ snprintf(realname, 12, "%s%s", _PATH_DEV, argv[0]);
disk = realname;
}
OpenPOWER on IntegriCloud