diff --git a/lib/format1/lvm1_label.c b/lib/format1/lvm1_label.c index 06c6d582b..9eca65b23 100644 --- a/lib/format1/lvm1_label.c +++ b/lib/format1/lvm1_label.c @@ -73,7 +73,7 @@ static int _read(struct labeller *l, int r = 0; if (!(dl = read_disk(dev, mem, NULL))) { - log_err("Couldn't read lvm1 label."); + stack; return 0; } diff --git a/lib/label/label.c b/lib/label/label.c index ba280d9f7..be2bcefa8 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -120,18 +120,20 @@ int label_remove(struct device *dev) int label_read(struct device *dev, struct label **result) { - struct labeller *l; int r; + struct list *lih; + struct labeller_i *li; - if (!(l = _find_labeller(dev))) { - stack; - return 0; + list_iterate (lih, &_labellers) { + li = list_item(lih, struct labeller_i); + if ((r = li->l->ops->read(li->l, dev, result))) { + (*result)->labeller = li->l; + return r; + } } - if ((r = l->ops->read(l, dev, result))) - (*result)->labeller = l; - - return r; + log_debug("No label on device '%s'.", dev_name(dev)); + return 0; } int label_verify(struct device *dev)