repart: correctly handle "uninitialized" machine-id
authorHarald Seiler <hws@denx.de>
Thu, 15 Oct 2020 19:25:06 +0000 (21:25 +0200)
committerHarald Seiler <hws@denx.de>
Mon, 19 Oct 2020 14:28:21 +0000 (16:28 +0200)
commit448b782cb2629f303f0c979f67e97411073e19cc
tree4779b10548c02055b7b13daa3bcc373a862ae820
parentc5fbeedb0c9e154ddde7ad47b48b469dfc835d02
repart: correctly handle "uninitialized" machine-id

When systemd-repart runs from initramfs, it reads out /etc/machine-id
from the rootfs as a seed for partition UUIDs.  However, the machine-id
could be in an "uninitialized" state from a previous failed first boot.
In this situation the -ENOMEDIUM code-path (no machine-id set) should be
taken.
src/partition/repart.c