specifier: always convert missing machine-id file to EUNATCH

Then, use id128_get_machine().
This commit is contained in:
Yu Watanabe
2023-04-05 00:52:56 +09:00
parent 319477f1b6
commit edd595f760
2 changed files with 4 additions and 14 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ TEST(specifiers) {
xsprintf(spec, "%%%c", s->specifier);
r = specifier_printf(spec, SIZE_MAX, specifier_table, NULL, NULL, &resolved);
if (s->specifier == 'm' && IN_SET(r, -ENOENT, -ENOMEDIUM)) /* machine-id might be missing in build chroots */
if (s->specifier == 'm' && IN_SET(r, -EUNATCH, -ENOMEDIUM)) /* machine-id might be missing in build chroots */
continue;
assert_se(r >= 0);