summaryrefslogtreecommitdiff
path: root/tools/vgrename.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2002-12-19 23:25:55 +0000
committerAlasdair Kergon <agk@redhat.com>2002-12-19 23:25:55 +0000
commit8ef2b021edcdec38f160675349c4797335f7a264 (patch)
tree9abf06514583ded09112a98cb066879f557bee87 /tools/vgrename.c
parent4c64ed4ced7dcd3a98a63da1cd3a6f2f1f2d1701 (diff)
downloadlvm2-8ef2b021edcdec38f160675349c4797335f7a264.tar.gz
Default stripesize 64k & config file setting for it;
Clear many compiler warnings (i386) & associated bugs - hopefully without introducing too many new bugs:-) (Same exercise required for other archs.) Default compilation has optimisation - or else use ./configure --enable-debug
Diffstat (limited to 'tools/vgrename.c')
-rw-r--r--tools/vgrename.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/tools/vgrename.c b/tools/vgrename.c
index 50c045121..c9f847240 100644
--- a/tools/vgrename.c
+++ b/tools/vgrename.c
@@ -23,7 +23,7 @@
int vgrename(struct cmd_context *cmd, int argc, char **argv)
{
char *dev_dir;
- int length;
+ unsigned int length;
int consistent = 1;
char *vg_name_old, *vg_name_new;
@@ -31,7 +31,6 @@ int vgrename(struct cmd_context *cmd, int argc, char **argv)
char old_path[NAME_LEN], new_path[NAME_LEN];
struct volume_group *vg_old, *vg_new;
- struct list *pvh;
if (argc != 2) {
log_error("Old and new volume group names need specifying");
@@ -124,13 +123,7 @@ int vgrename(struct cmd_context *cmd, int argc, char **argv)
goto error;
/* Change the volume group name */
- strcpy(vg_old->name, vg_name_new);
-
- /* FIXME Should vg_write fix these implicitly? It has to check them. */
- list_iterate(pvh, &vg_old->pvs) {
- strcpy(list_item(pvh, struct pv_list)->pv->vg_name,
- vg_name_new);
- }
+ vg_rename(cmd, vg_old, vg_name_new);
sprintf(old_path, "%s%s", dev_dir, vg_name_old);
sprintf(new_path, "%s%s", dev_dir, vg_name_new);