mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
device_id: check return value of label_read_pvid
for covscan
This commit is contained in:
parent
e71b434663
commit
a74468116e
@ -2489,6 +2489,7 @@ void device_ids_check_serial(struct cmd_context *cmd, struct dm_list *scan_devs,
|
|||||||
int has_pvid;
|
int has_pvid;
|
||||||
int found;
|
int found;
|
||||||
int count;
|
int count;
|
||||||
|
int err;
|
||||||
|
|
||||||
dm_list_init(&dus_check);
|
dm_list_init(&dus_check);
|
||||||
dm_list_init(&devs_check);
|
dm_list_init(&devs_check);
|
||||||
@ -2544,8 +2545,8 @@ void device_ids_check_serial(struct cmd_context *cmd, struct dm_list *scan_devs,
|
|||||||
dev = devl->dev;
|
dev = devl->dev;
|
||||||
has_pvid = 0;
|
has_pvid = 0;
|
||||||
|
|
||||||
label_read_pvid(dev, &has_pvid);
|
err = label_read_pvid(dev, &has_pvid);
|
||||||
if (!has_pvid) {
|
if (!err || !has_pvid) {
|
||||||
log_debug("serial %s no pvid %s", idname, dev_name(devl->dev));
|
log_debug("serial %s no pvid %s", idname, dev_name(devl->dev));
|
||||||
dm_list_del(&devl->list);
|
dm_list_del(&devl->list);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user