]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machine-id-setup: use empty_or_root()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 May 2024 23:46:43 +0000 (08:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 19 May 2024 16:05:23 +0000 (01:05 +0900)
src/shared/machine-id-setup.c

index df99b0b009537ca48df2126e793ac93755db2fe2..8dab2ad4282c09db2b9d4dff685a3322aecf5e77 100644 (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)