diff options
author | grog <grog@FreeBSD.org> | 2000-12-20 05:05:39 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 2000-12-20 05:05:39 +0000 |
commit | acdbf93b97dfb2f5d849d378554645970cf267a1 (patch) | |
tree | 6e3e90e4d82b6cf47e1f787a0b35e2f3a9d99c3f /sbin/vinum | |
parent | c9771e4d86f2755b9d4e99ca5a3e09d7ad8b2e00 (diff) | |
download | FreeBSD-src-acdbf93b97dfb2f5d849d378554645970cf267a1.zip FreeBSD-src-acdbf93b97dfb2f5d849d378554645970cf267a1.tar.gz |
Correct some comments.
vinum_attach: Get correct names (were being overwritten).
Submitted by: Terry Glanfield <Terry.Glanfield@program-products.co.uk>
Diffstat (limited to 'sbin/vinum')
-rw-r--r-- | sbin/vinum/commands.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/vinum/commands.c b/sbin/vinum/commands.c index c5b6f82..f5e9c2d 100644 --- a/sbin/vinum/commands.c +++ b/sbin/vinum/commands.c @@ -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 */ |