mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 08:44:33 +00:00
Use _PATH_DEV.
Reviewed by: grog
This commit is contained in:
parent
083745b549
commit
1d9153d7ad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73236
|
@ -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"
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue