diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-03-26 14:03:10 +0900 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-03-27 11:05:25 +0200 |
commit | 830e52caa2bf1a29f56cb93e7ed85acb1bda11c3 (patch) | |
tree | 9816d11fe5a8b0ce1212178ffab8e8db023797e2 /src/machine-id-setup | |
parent | 4e24df3cc32fdfd48db9184d138f0051e0dafbbe (diff) | |
download | systemd-830e52caa2bf1a29f56cb93e7ed85acb1bda11c3.tar.gz |
sd-id128: make id128_read() optionally take root directory
Diffstat (limited to 'src/machine-id-setup')
-rw-r--r-- | src/machine-id-setup/machine-id-setup-main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/machine-id-setup/machine-id-setup-main.c b/src/machine-id-setup/machine-id-setup-main.c index 5620bf9baf..2d29890864 100644 --- a/src/machine-id-setup/machine-id-setup-main.c +++ b/src/machine-id-setup/machine-id-setup-main.c @@ -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_read(arg_root, "/etc/machine-id", ID128_FORMAT_PLAIN, &id); if (r < 0) return log_error_errno(r, "Failed to read machine ID back: %m"); } else { |