diff options
author | grog <grog@FreeBSD.org> | 1999-03-23 04:48:05 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1999-03-23 04:48:05 +0000 |
commit | 5f48e8b76883910e8d48274bcdf47f93374d6cc7 (patch) | |
tree | 872ae0af03c668991755907fec710ef62845f0c6 /sys | |
parent | 688623aa5445c713edfc90dbd8d94aad8ac2b4d1 (diff) | |
download | FreeBSD-src-5f48e8b76883910e8d48274bcdf47f93374d6cc7.zip FreeBSD-src-5f48e8b76883910e8d48274bcdf47f93374d6cc7.tar.gz |
init_drive:
Check for partition types FS_VINUM and FS_UNUSED. Accept both, but
complain about FS_UNUSED. At a later date, only FS_VINUM will be
accepted.
Threatened-since: over a year
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/vinum/vinumio.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c index 14c623d..43e179c 100644 --- a/sys/dev/vinum/vinumio.c +++ b/sys/dev/vinum/vinumio.c @@ -201,7 +201,8 @@ init_drive(struct drive *drive, int verbose) drive->state = drive_down; /* don't tell the system about this one at all */ return error; } - if (drive->partinfo.part->p_fstype != 0) { /* not plain */ + if ((drive->partinfo.part->p_fstype != FS_UNUSED) /* not plain */ + &&(drive->partinfo.part->p_fstype != FS_VINUM)) { /* and not Vinum */ drive->lasterror = EFTYPE; if (verbose) log(LOG_WARNING, @@ -502,7 +503,7 @@ read_drive_label(struct drive *drive, int verbose) */ drive->label = vhdr->label; /* put in the label information */ } else if (vhdr->magic == VINUM_NOMAGIC) /* was ours, but we gave it away */ - result = DL_DELETED_LABEL; + result = DL_DELETED_LABEL; /* and return the info */ else result = DL_NOT_OURS; /* we could have it, but we don't yet */ Free(vhdr); /* that's all. */ @@ -994,6 +995,12 @@ vinum_scandisk(char *drivename[], int drives) else log(LOG_INFO, "vinum: updating configuration from %s\n", drive->devicename); + /* XXX Transition until we can get things changed */ + if (drive->partinfo.part->p_fstype == FS_UNUSED) /* still set to unused */ + log(LOG_WARNING, + "vinum: %s partition type is 'unused', should be 'vinum'\n", + drive->devicename); + /* Read in both copies of the configuration information */ error = read_drive(drive, config_text, MAXCONFIG * 2, VINUM_CONFIG_OFFSET); |