]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
id128-util: pass through XAT_FDROOT
authorLennart Poettering <lennart@poettering.net>
Mon, 8 Dec 2025 12:32:55 +0000 (13:32 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 17 Jan 2026 11:37:39 +0000 (12:37 +0100)
src/libsystemd/sd-id128/id128-util.c

index 86a2938af4486059c25f5e53ce396fd3d5724b1c..0cae92b7289e3e61bbcd07c5b239138acda96298 100644 (file)
@@ -140,7 +140,7 @@ int id128_read_fd(int fd, Id128Flag f, sd_id128_t *ret) {
 int id128_read_at(int dir_fd, const char *path, Id128Flag f, sd_id128_t *ret) {
         _cleanup_close_ int fd = -EBADF;
 
-        assert(dir_fd >= 0 || dir_fd == AT_FDCWD);
+        assert(dir_fd >= 0 || IN_SET(dir_fd, AT_FDCWD, XAT_FDROOT));
         assert(path);
 
         fd = xopenat(dir_fd, path, O_RDONLY|O_CLOEXEC|O_NOCTTY);