1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Update a few liblvm calls with log_errno.

Author: Dave Wysochanski <dwysocha@redhat.com>
This commit is contained in:
Dave Wysochanski 2009-07-26 20:29:28 +00:00
parent f864285b3a
commit a57262a7ee

View File

@ -144,14 +144,15 @@ struct dm_list *lvm_vg_list_pvs(vg_t *vg)
return NULL;
if (!(list = dm_pool_zalloc(vg->vgmem, sizeof(*list)))) {
log_error("Memory allocation fail for dm_list.\n");
log_errno(ENOMEM, "Memory allocation fail for dm_list.\n");
return NULL;
}
dm_list_init(list);
dm_list_iterate_items(pvl, &vg->pvs) {
if (!(pvs = dm_pool_zalloc(vg->vgmem, sizeof(*pvs)))) {
log_error("Memory allocation fail for lvm_pv_list.\n");
log_errno(ENOMEM,
"Memory allocation fail for lvm_pv_list.\n");
return NULL;
}
pvs->pv = pvl->pv;
@ -170,14 +171,15 @@ struct dm_list *lvm_vg_list_lvs(vg_t *vg)
return NULL;
if (!(list = dm_pool_zalloc(vg->vgmem, sizeof(*list)))) {
log_error("Memory allocation fail for dm_list.\n");
log_errno(ENOMEM, "Memory allocation fail for dm_list.\n");
return NULL;
}
dm_list_init(list);
dm_list_iterate_items(lvl, &vg->lvs) {
if (!(lvs = dm_pool_zalloc(vg->vgmem, sizeof(*lvs)))) {
log_error("Memory allocation fail for lvm_lv_list.\n");
log_errno(ENOMEM,
"Memory allocation fail for lvm_lv_list.\n");
return NULL;
}
lvs->lv = lvl->lv;