From e3de4ba830150820c9d5cb768c1fad80bcc03651 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Wed, 10 Oct 2001 13:09:40 +0000 Subject: [PATCH] o forgot to init a list head --- lib/format1/format1.c | 2 ++ lib/format1/import-export.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/format1/format1.c b/lib/format1/format1.c index 2eb2f4aff..b832a4784 100644 --- a/lib/format1/format1.c +++ b/lib/format1/format1.c @@ -163,6 +163,8 @@ static int _vg_write(struct io_space *is, struct volume_group *vg) return 0; } + INIT_LIST_HEAD(&pvs); + r = _flatten_vg(mem, vg, &pvs, is->prefix) && write_pvs(&pvs); pool_destroy(mem); return r; diff --git a/lib/format1/import-export.c b/lib/format1/import-export.c index 3ce4b58f2..08afbf9da 100644 --- a/lib/format1/import-export.c +++ b/lib/format1/import-export.c @@ -127,7 +127,7 @@ int export_pv(struct pv_disk *pvd, struct physical_volume *pv) memset(pvd->vg_name, 0, sizeof(pvd->vg_name)); if (pv->vg_name) - strcpy(pvd->vg_name, pv->vg_name); + strncpy(pvd->vg_name, pv->vg_name, sizeof(pvd->vg_name)); //pvd->pv_major = MAJOR(pv->dev); //pvd->pv_number = ??;