sd-id128: make id128_read() or friends return -ENOPKG when the file contents is "uninitialized"

Then, this drops ID128_PLAIN_OR_UNINIT. Also, this renames
Id128Format -> Id128FormatFlag, and make it bitfield.

Fixes #25634.
This commit is contained in:
Yu Watanabe
2022-12-12 21:57:31 +09:00
parent 28bf2de201
commit 057bf780e9
14 changed files with 61 additions and 63 deletions
+1 -1
View File
@@ -195,7 +195,7 @@ int specifier_machine_id(char specifier, const void *data, const char *root, con
/* Translate error for missing os-release file to EUNATCH. */
return fd == -ENOENT ? -EUNATCH : fd;
r = id128_read_fd(fd, ID128_PLAIN, &id);
r = id128_read_fd(fd, ID128_FORMAT_PLAIN, &id);
} else
r = sd_id128_get_machine(&id);
if (r < 0)