Correct some comments.

vinum_attach: Get correct names (were being overwritten).

Submitted by:	Terry Glanfield <Terry.Glanfield@program-products.co.uk>
This commit is contained in:
Greg Lehey 2000-12-20 05:05:39 +00:00
parent f6f0c4b90d
commit 0b01781882
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70206

View File

@ -597,7 +597,7 @@ vinum_start(int argc, char *argv[], char *arg0[])
* here.
*/
message->index = plex.plexno; /* pass object number */
message->type = plex_object; /* it's a subdisk */
message->type = plex_object; /* it's a plex */
message->state = object_up;
message->force = 0; /* don't force it */
ioctl(superdev, VINUM_SETSTATE, message);
@ -923,6 +923,7 @@ vinum_attach(int argc, char *argv[], char *argv0[])
const char *supername = argv[1];
int sdno = -1;
int plexno = -1;
char oldname[MAXNAME + 8];
char newname[MAXNAME + 8];
int rename = 0; /* set if we want to rename the object */
@ -1016,7 +1017,8 @@ vinum_attach(int argc, char *argv[], char *argv0[])
break;
}
sprintf(newname, "%s.s%d", plex.name, sdno);
vinum_rename_2(sd.name, newname);
sprintf(oldname, "%s", sd.name);
vinum_rename_2(oldname, newname);
break;
case plex_object:
@ -1027,7 +1029,8 @@ vinum_attach(int argc, char *argv[], char *argv0[])
break;
}
sprintf(newname, "%s.p%d", vol.name, plexno);
vinum_rename_2(plex.name, newname); /* this may recurse */
sprintf(oldname, "%s", plex.name);
vinum_rename_2(oldname, newname); /* this may recurse */
break;
default: /* can't get here */