diff options
| author | Greg Lehey <grog@FreeBSD.org> | 2003-05-04 05:16:02 +0000 |
|---|---|---|
| committer | Greg Lehey <grog@FreeBSD.org> | 2003-05-04 05:16:02 +0000 |
| commit | f911210e72d6eeb937f8ce7baf3e5be9bc6e1fe3 (patch) | |
| tree | f1317b222a5e9b5e1389e636f926609408f5debd /sys/dev | |
| parent | 8ffac9562ed86c36d143a32353d24d0f1bd8fc40 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/vinum/vinumioctl.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/dev/vinum/vinumioctl.c b/sys/dev/vinum/vinumioctl.c index 15e96c1da625f..ea734c8687f88 100644 --- a/sys/dev/vinum/vinumioctl.c +++ b/sys/dev/vinum/vinumioctl.c @@ -289,6 +289,24 @@ vinum_super_ioctl(dev_t dev, error = EINVAL; /* release what config? */ return error; + case VINUM_READCONFIG: + error = lock_config(); /* get the config for us alone */ + if (error) /* can't do it, */ + return error; /* give up */ + if (((char *) data)[0] == '\0') + ioctl_reply->error = vinum_scandisk(NULL); /* built your own list */ + else + ioctl_reply->error = vinum_scandisk((char *) data); + if (ioctl_reply->error == ENOENT) { + if (vinum_conf.drives_used > 0) + strcpy(ioctl_reply->msg, "no additional drives found"); + else + strcpy(ioctl_reply->msg, "no drives found"); + } else if (ioctl_reply->error) + strcpy(ioctl_reply->msg, "can't read configuration information, see log file"); + unlock_config(); + return 0; /* must be 0 to return the real error info */ + case VINUM_INIT: ioctl_reply = (struct _ioctl_reply *) data; /* reinstate the address to reply to */ ioctl_reply->error = 0; |
