summaryrefslogtreecommitdiff
path: root/liblvm/lvm_pv.c
diff options
context:
space:
mode:
Diffstat (limited to 'liblvm/lvm_pv.c')
-rw-r--r--liblvm/lvm_pv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/liblvm/lvm_pv.c b/liblvm/lvm_pv.c
index 4fe2d3e..90edaed 100644
--- a/liblvm/lvm_pv.c
+++ b/liblvm/lvm_pv.c
@@ -107,12 +107,12 @@ pv_t lvm_pv_from_uuid(vg_t vg, const char *uuid)
log_errno (EINVAL, "Invalid UUID string length");
return NULL;
}
- if (strlen(uuid) >= ID_LEN) {
- if (!id_read_format(&id, uuid)) {
- log_errno(EINVAL, "Invalid UUID format");
- return NULL;
- }
+
+ if (!id_read_format(&id, uuid)) {
+ log_errno(EINVAL, "Invalid UUID format.");
+ return NULL;
}
+
dm_list_iterate_items(pvl, &vg->pvs) {
if (id_equal(&id, &pvl->pv->id))
return pvl->pv;