summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2000-02-29 06:21:38 +0000
committergrog <grog@FreeBSD.org>2000-02-29 06:21:38 +0000
commit726ca37d80c04fe7539eefad9ae1053201a844e2 (patch)
tree1ab54b3f744595f04d644c815f6db354ff4a9b5a /sbin
parent83943ac9675ca697b18f40dfe0f2be67ea845715 (diff)
downloadFreeBSD-src-726ca37d80c04fe7539eefad9ae1053201a844e2.zip
FreeBSD-src-726ca37d80c04fe7539eefad9ae1053201a844e2.tar.gz
Don't print any error message if we can't open the history file. This
replaces an older attempt to silence vinum(8) when started in single-user mode. Add entries for vinum_raid[45]. Replace the preprocessor variable name CDEV_MAJOR with VINUM_CDEV_MAJOR. continue_revive: Set the proc title to 'reviving <sdname>' so that it can be recognized in a ps list. Approved-by: jkh
Diffstat (limited to 'sbin')
-rw-r--r--sbin/vinum/v.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sbin/vinum/v.c b/sbin/vinum/v.c
index 55c2747..7a29aaa 100644
--- a/sbin/vinum/v.c
+++ b/sbin/vinum/v.c
@@ -129,12 +129,7 @@ main(int argc, char *argv[], char *envp[])
timestamp();
fprintf(history, "*** " VINUMMOD " started ***\n");
fflush(history); /* before we start the daemon */
- } else
- fprintf(stderr,
- "Can't open history file %s: %s (%d)\n",
- historyfile,
- strerror(errno),
- errno);
+ }
superdev = open(VINUM_SUPERDEV_NAME, O_RDWR); /* open vinum superdevice */
if (superdev < 0) { /* no go */
if (errno == ENODEV) { /* not configured, */
@@ -259,6 +254,8 @@ struct funkey {
FUNKEY(quit),
FUNKEY(concat),
FUNKEY(stripe),
+ FUNKEY(raid4),
+ FUNKEY(raid5),
FUNKEY(mirror),
FUNKEY(setdaemon),
FUNKEY(readpol),
@@ -490,19 +487,19 @@ make_devices(void)
if (mknod(VINUM_SUPERDEV_NAME,
S_IRUSR | S_IWUSR | S_IFCHR, /* user only */
- makedev(CDEV_MAJOR, VINUM_SUPERDEV)) < 0)
+ makedev(VINUM_CDEV_MAJOR, VINUM_SUPERDEV)) < 0)
fprintf(stderr, "Can't create %s: %s\n", VINUM_SUPERDEV_NAME, strerror(errno));
if (mknod(VINUM_WRONGSUPERDEV_NAME,
S_IRUSR | S_IWUSR | S_IFCHR, /* user only */
- makedev(CDEV_MAJOR, VINUM_WRONGSUPERDEV)) < 0)
+ makedev(VINUM_CDEV_MAJOR, VINUM_WRONGSUPERDEV)) < 0)
fprintf(stderr, "Can't create %s: %s\n", VINUM_WRONGSUPERDEV_NAME, strerror(errno));
superdev = open(VINUM_SUPERDEV_NAME, O_RDWR); /* open the super device */
if (mknod(VINUM_DAEMON_DEV_NAME, /* daemon super device */
S_IRUSR | S_IWUSR | S_IFCHR, /* user only */
- makedev(CDEV_MAJOR, VINUM_DAEMON_DEV)) < 0)
+ makedev(VINUM_CDEV_MAJOR, VINUM_DAEMON_DEV)) < 0)
fprintf(stderr, "Can't create %s: %s\n", VINUM_DAEMON_DEV_NAME, strerror(errno));
if (ioctl(superdev, VINUM_GETCONFIG, &vinum_conf) < 0) {
@@ -607,7 +604,7 @@ make_plex_dev(int plexno, int recurse)
}
}
-/* Create the contents of /dev/vinum/sd */
+/* Create the contents of /dev/vinum/sd and /dev/vinum/rsd */
void
make_sd_dev(int sdno)
{
@@ -706,6 +703,7 @@ continue_revive(int sdno)
openlog(VINUMMOD, LOG_CONS | LOG_PERROR | LOG_PID, LOG_KERN);
syslog(LOG_INFO | LOG_KERN, "reviving %s", sd.name);
+ setproctitle("reviving %s", sd.name);
for (reply.error = EAGAIN; reply.error == EAGAIN;) { /* revive the subdisk */
message->index = sdno; /* pass sd number */
OpenPOWER on IntegriCloud