]> sourceware.org Git - lvm2.git/commitdiff
cov: check device_ids_write return code
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 15 Oct 2021 13:04:43 +0000 (15:04 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 15 Oct 2021 21:40:56 +0000 (23:40 +0200)
At least 'stack' failure code path as the
function device_id_update_vg_uuid() is void.

lib/device/device_id.c

index e4208c56bf3e73c34e2d6be765abe26dff5c8c14..eb06109ff82c3df70f698dd98825c9729dd1adea 100644 (file)
@@ -1351,8 +1351,9 @@ void device_id_update_vg_uuid(struct cmd_context *cmd, struct volume_group *vg,
                }
        }
 
-       if (update)
-               device_ids_write(cmd);
+       if (update &&
+           !device_ids_write(cmd))
+               stack;
  out:
        unlock_devices_file(cmd);
 }
This page took 0.041264 seconds and 5 git commands to generate.