From 5a72a50367ac999e544c9cd119f6218ab7038311 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 7 Jan 2002 15:27:55 +0000 Subject: [PATCH] o vgcreate wasn't setting vg->cmd --- lib/format_text/export.c | 3 --- lib/metadata/metadata.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/format_text/export.c b/lib/format_text/export.c index 93be8849f..e04e436fb 100644 --- a/lib/format_text/export.c +++ b/lib/format_text/export.c @@ -127,9 +127,6 @@ static int _sectors_to_units(uint64_t sectors, char *buffer, size_t s) for (i = 0; (d > 1024.0) && _units[i]; i++) d /= 1024.0; - /* FIXME: arrange so this doesn't print a - * decimal point unless we have a - * fractional part. */ return lvm_snprintf(buffer, s, "# %g %s", d, _units[i]) > 0; } diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index e462f63c0..caf6f09fc 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -152,6 +152,8 @@ struct volume_group *vg_create(struct format_instance *fi, const char *vg_name, /* Strip dev_dir if present */ vg_name = strip_dir(vg_name, fi->cmd->dev_dir); + vg->cmd = fi->cmd; + if (!(vg->name = pool_strdup(mem, vg_name))) { stack; goto bad;