1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvscan: check result of id_write_format

Currently rather impossible to happen - but check
for returned value of id_write_format().
This commit is contained in:
Zdenek Kabelac 2014-08-19 14:26:06 +02:00
parent ad9aee9af4
commit cdb16a6039

View File

@ -33,9 +33,11 @@ static int _lvscan_single_lvmetad(struct cmd_context *cmd, struct logical_volume
dm_list_iterate_items(pvl, &all_pvs) {
if (!pvl->pv->dev) {
id_write_format(&pvl->pv->id, pvid_s, sizeof(pvid_s));
log_warn("WARNING: Device for PV %s already missing, skipping.",
pvid_s);
if (!id_write_format(&pvl->pv->id, pvid_s, sizeof(pvid_s)))
stack;
else
log_warn("WARNING: Device for PV %s already missing, skipping.",
pvid_s);
continue;
}
if (!lvmetad_pvscan_single(cmd, pvl->pv->dev, NULL))