diff options
Diffstat (limited to 'src/partition')
-rw-r--r-- | src/partition/repart.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c index 920b442316..73712a36eb 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -4789,10 +4789,12 @@ static int context_read_seed(Context *context, const char *root) { return log_error_errno(fd, "Failed to determine machine ID of image: %m"); else { r = id128_read_fd(fd, ID128_FORMAT_PLAIN, &context->seed); - if (IN_SET(r, -ENOMEDIUM, -ENOPKG)) + if (r < 0) { + if (!ERRNO_IS_MACHINE_ID_UNSET(r)) + return log_error_errno(r, "Failed to parse machine ID of image: %m"); + log_info("No machine ID set, using randomized partition UUIDs."); - else if (r < 0) - return log_error_errno(r, "Failed to parse machine ID of image: %m"); + } return 0; } |