]> sourceware.org Git - lvm2.git/commitdiff
debug: check for fail in id validation
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 26 Jun 2017 21:20:29 +0000 (23:20 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 26 Jun 2017 22:27:36 +0000 (00:27 +0200)
lib/metadata/metadata.c

index b44f2df83954cb3528c257a8806c4841c5137855..45495dcaf3b661cbb10a71c57f2a262d5dd9041f 100644 (file)
@@ -4149,7 +4149,8 @@ static int _check_or_repair_pv_ext(struct cmd_context *cmd,
                if (!pvl->pv->dev) {
                        /* is_missing_pv doesn't catch NULL dev */
                        memset(&uuid, 0, sizeof(uuid));
-                       id_write_format(&pvl->pv->id, uuid, sizeof(uuid));
+                       if (!id_write_format(&pvl->pv->id, uuid, sizeof(uuid)))
+                               goto_out;
                        log_warn("WARNING: Not repairing PV %s with missing device.", uuid);
                        continue;
                }
This page took 0.037185 seconds and 5 git commands to generate.