mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
o vgcreate wasn't setting vg->cmd
This commit is contained in:
parent
16ab7a0da2
commit
5a72a50367
@ -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++)
|
for (i = 0; (d > 1024.0) && _units[i]; i++)
|
||||||
d /= 1024.0;
|
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;
|
return lvm_snprintf(buffer, s, "# %g %s", d, _units[i]) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +152,8 @@ struct volume_group *vg_create(struct format_instance *fi, const char *vg_name,
|
|||||||
/* Strip dev_dir if present */
|
/* Strip dev_dir if present */
|
||||||
vg_name = strip_dir(vg_name, fi->cmd->dev_dir);
|
vg_name = strip_dir(vg_name, fi->cmd->dev_dir);
|
||||||
|
|
||||||
|
vg->cmd = fi->cmd;
|
||||||
|
|
||||||
if (!(vg->name = pool_strdup(mem, vg_name))) {
|
if (!(vg->name = pool_strdup(mem, vg_name))) {
|
||||||
stack;
|
stack;
|
||||||
goto bad;
|
goto bad;
|
||||||
|
Loading…
Reference in New Issue
Block a user