diff options
author | obrien <obrien@FreeBSD.org> | 2001-02-28 17:50:29 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-02-28 17:50:29 +0000 |
commit | 68b225051bfb5632ab79f2bd176479264331ff1a (patch) | |
tree | ad3d9b3f909ea6443fec970430bcaf3849f9d9e6 /sbin/vinum | |
parent | 130eca7d1b828efc4b1276e38a285254ae91aafa (diff) | |
download | FreeBSD-src-68b225051bfb5632ab79f2bd176479264331ff1a.zip FreeBSD-src-68b225051bfb5632ab79f2bd176479264331ff1a.tar.gz |
Use _PATH_DEV.
Reviewed by: grog
Diffstat (limited to 'sbin/vinum')
-rw-r--r-- | sbin/vinum/commands.c | 5 | ||||
-rw-r--r-- | sbin/vinum/v.c | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sbin/vinum/commands.c b/sbin/vinum/commands.c index 44a170a..2566af2 100644 --- a/sbin/vinum/commands.c +++ b/sbin/vinum/commands.c @@ -45,6 +45,7 @@ #include <fcntl.h> #include <sys/mman.h> #include <netdb.h> +#include <paths.h> #include <setjmp.h> #include <stdio.h> #include <stdlib.h> @@ -544,7 +545,7 @@ vinum_start(int argc, char *argv[], char *arg0[]) if (((stat->device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_DIRECT) /* disk device */ &&((stat->device_type & DEVSTAT_TYPE_PASS) == 0) /* and not passthrough */ &&((stat->device_name[0] != '\0'))) { /* and it has a name */ - sprintf(enamelist, "/dev/%s%d", stat->device_name, stat->unit_number); + sprintf(enamelist, "%s%s%d", _PATH_DEV, stat->device_name, stat->unit_number); token[tokens] = enamelist; /* point to it */ tokens++; /* one more token */ enamelist = &enamelist[strlen(enamelist) + 1]; /* and start beyond the end */ @@ -1363,7 +1364,7 @@ vinum_help(int argc, char *argv[], char *argv0[]) "printconfig [file]\n" " Write a copy of the current configuration to file.\n" "makedev\n" - " Remake the device nodes in /dev/vinum.\n" + " Remake the device nodes in " _PATH_DEV "vinum.\n" "move drive [subdisk | plex | drive]\n" " Move the subdisks of the specified object(s) to drive.\n" "quit\n" diff --git a/sbin/vinum/v.c b/sbin/vinum/v.c index 0cda377..27798c3 100644 --- a/sbin/vinum/v.c +++ b/sbin/vinum/v.c @@ -45,6 +45,7 @@ #include <fcntl.h> #include <sys/mman.h> #include <netdb.h> +#include <paths.h> #include <setjmp.h> #include <signal.h> #include <stdio.h> @@ -529,11 +530,11 @@ make_devices(void) else devfs_is_active = 0; - if (!devfs_is_active && access("/dev", W_OK) < 0) { /* can't access /dev to write? */ + if (!devfs_is_active && access(_PATH_DEV, W_OK) < 0) { /* can't access /dev to write? */ if (errno == EROFS) /* because it's read-only, */ - fprintf(stderr, VINUMMOD ": /dev is mounted read-only, not rebuilding " VINUM_DIR "\n"); + fprintf(stderr, VINUMMOD ": %s is mounted read-only, not rebuilding %s\n", _PATH_DEV, VINUM_DIR); else - vinum_perror(VINUMMOD ": Can't write to /dev"); + vinum_perror(VINUMMOD ": Can't write to " _PATH_DEV); return; } if (history) { |