1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

o small bug in the format1 export code for snapshots.

o  tidied newlines in the snapshot section of format text.
This commit is contained in:
Joe Thornber 2002-02-18 11:25:43 +00:00
parent 0eb83127ef
commit d7783cc8b8
2 changed files with 6 additions and 5 deletions

View File

@ -506,7 +506,7 @@ int export_lvs(struct disk_list *dl, struct volume_group *vg,
lvdl->lvd.lv_dev = MKDEV(0, lv_num);
lvdl->lvd.lv_number = lv_num;
if (!hash_insert(lvd_hash, lvdl->lvd.lv_name, &lvdl->lvd)) {
if (!hash_insert(lvd_hash, ll->lv->name, &lvdl->lvd)) {
stack;
goto out;
}
@ -531,12 +531,14 @@ int export_lvs(struct disk_list *dl, struct volume_group *vg,
struct snapshot_list)->snapshot;
if (!(org = hash_lookup(lvd_hash, s->origin->name))) {
stack;
log_err("Couldn't find snapshot origin '%s'.",
s->origin->name);
goto out;
}
if (!(cow = hash_lookup(lvd_hash, s->cow->name))) {
stack;
log_err("Couldn't find snapshot cow store '%s'.",
s->cow->name);
goto out;
}

View File

@ -345,12 +345,12 @@ static int _print_lvs(struct formatter *f, struct volume_group *vg)
return 1;
_out(f, "logical_volumes {");
_nl(f);
_inc_indent(f);
list_iterate (lvh, &vg->lvs) {
lv = list_item(lvh, struct lv_list)->lv;
_nl(f);
_out(f, "%s {", lv->name);
_inc_indent(f);
@ -418,7 +418,6 @@ static int _print_snapshots(struct formatter *f, struct volume_group *vg)
return 1;
_out(f, "snapshots {");
_nl(f);
_inc_indent(f);
list_iterate (sh, &vg->snapshots) {