From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - device_id: check return value of label_read_pvid
Date: Thu, 1 Dec 2022 18:07:27 +0000 (GMT) [thread overview]
Message-ID: <20221201180727.8267B3858C54@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a74468116ea51542e409e4bc393c63dc7ddb20b6
Commit: a74468116ea51542e409e4bc393c63dc7ddb20b6
Parent: e71b434663e445ee9232fc72786e5bc2ac699f4b
Author: David Teigland <teigland@redhat.com>
AuthorDate: Thu Dec 1 11:49:51 2022 -0600
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Thu Dec 1 11:49:51 2022 -0600
device_id: check return value of label_read_pvid
for covscan
---
lib/device/device_id.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/device/device_id.c b/lib/device/device_id.c
index 367b7dbb9..1f2ab5ad4 100644
--- a/lib/device/device_id.c
+++ b/lib/device/device_id.c
@@ -2489,6 +2489,7 @@ void device_ids_check_serial(struct cmd_context *cmd, struct dm_list *scan_devs,
int has_pvid;
int found;
int count;
+ int err;
dm_list_init(&dus_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;
has_pvid = 0;
- label_read_pvid(dev, &has_pvid);
- if (!has_pvid) {
+ err = label_read_pvid(dev, &has_pvid);
+ if (!err || !has_pvid) {
log_debug("serial %s no pvid %s", idname, dev_name(devl->dev));
dm_list_del(&devl->list);
continue;
reply other threads:[~2022-12-01 18:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221201180727.8267B3858C54@sourceware.org \
--to=teigland@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.