machine-id-setup: use id128_get_machine() at one more place

This commit is contained in:
Yu Watanabe
2023-04-05 00:52:56 +09:00
parent f7b5f39934
commit c1d74108a0
+1 -4
View File
@@ -158,14 +158,11 @@ static int run(int argc, char *argv[]) {
}
if (arg_commit) {
const char *etc_machine_id;
r = machine_id_commit(arg_root);
if (r < 0)
return r;
etc_machine_id = prefix_roota(arg_root, "/etc/machine-id");
r = id128_read(etc_machine_id, ID128_FORMAT_PLAIN, &id);
r = id128_get_machine(arg_root, &id);
if (r < 0)
return log_error_errno(r, "Failed to read machine ID back: %m");
} else {