1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

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
This commit is contained in:
Greg Lehey 1999-03-23 04:48:05 +00:00
parent b555657ffa
commit dae797bc58
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44953

View File

@ -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);