summaryrefslogtreecommitdiffstats
path: root/sys/dev/vinum
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2001-01-14 06:29:56 +0000
committergrog <grog@FreeBSD.org>2001-01-14 06:29:56 +0000
commit7dca63380028f83b7e2a3e6ce76411bb47a4dfd4 (patch)
treeb84fc46872365bc517c5f08f0adba877d8eb7e49 /sys/dev/vinum
parentc4f38147e0dae41ab0c3568941dc584d7cf83ead (diff)
downloadFreeBSD-src-7dca63380028f83b7e2a3e6ce76411bb47a4dfd4.zip
FreeBSD-src-7dca63380028f83b7e2a3e6ce76411bb47a4dfd4.tar.gz
config_plex: Check that we have specified a plex organization.
Tripped over by: "Jeroen C. van Gelderen" <jeroen@vangelderen.org>
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r--sys/dev/vinum/vinumconfig.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/vinum/vinumconfig.c b/sys/dev/vinum/vinumconfig.c
index 5251f24..51f8de3 100644
--- a/sys/dev/vinum/vinumconfig.c
+++ b/sys/dev/vinum/vinumconfig.c
@@ -45,7 +45,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumconfig.c,v 1.31 2001/01/10 01:16:00 grog Exp grog $
+ * $Id: vinumconfig.c,v 1.30 2000/05/01 09:45:50 grog Exp grog $
* $FreeBSD$
*/
@@ -491,7 +491,7 @@ find_drive(const char *name, int create)
for (driveno = 0; driveno < vinum_conf.drives_allocated; driveno++) {
drive = &DRIVE[driveno]; /* point to drive */
if ((drive->label.name[0] != '\0') /* it has a name */
-&&(strcmp(drive->label.name, name) == 0) /* and it's this one */
+ &&(strcmp(drive->label.name, name) == 0) /* and it's this one */
&&(drive->state > drive_unallocated)) /* and it's a real one: found */
return driveno;
}
@@ -644,7 +644,7 @@ return_drive_space(int driveno, int64_t offset, int length)
* with a higher offset than the subdisk, or both.
*/
if ((fe > 1) /* not the first entry */
-&&((fe == drive->freelist_entries) /* gone past the end */
+ &&((fe == drive->freelist_entries) /* gone past the end */
||(drive->freelist[fe].offset > offset))) /* or past the block were looking for */
fe--; /* point to the block before */
dend = drive->freelist[fe].offset + drive->freelist[fe].sectors; /* end of the entry */
@@ -1374,6 +1374,9 @@ config_plex(int update)
}
}
+ if (plex->organization == plex_disorg)
+ throw_rude_remark(EINVAL, "No plex organization specified");
+
if ((plex->volno < 0) /* we don't have a volume */
&&(!detached)) /* and we wouldn't object */
plex->volno = current_volume;
OpenPOWER on IntegriCloud