1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-07 21:18:41 +03:00

machine-id-setup: use empty_or_root()

This commit is contained in:
Yu Watanabe 2024-05-19 08:46:43 +09:00
parent d4d6a9e4ae
commit ba540e9f1c

View File

@ -61,7 +61,7 @@ static int generate_machine_id(const char *root, sd_id128_t *ret) {
return 0;
}
if (isempty(root) && running_in_chroot() <= 0) {
if (empty_or_root(root) && running_in_chroot() <= 0) {
/* Let's use a system credential for the machine ID if we can */
r = acquire_machine_id_from_credential(ret);
if (r >= 0)