]> git.hungrycats.org Git - bees/commitdiff
openat2: log a warning when we fall back to openat
authorZygo Blaxell <bees@furryterror.org>
Mon, 20 Jan 2025 02:11:17 +0000 (21:11 -0500)
committerZygo Blaxell <bees@furryterror.org>
Mon, 20 Jan 2025 03:19:42 +0000 (22:19 -0500)
This should occur only once per run, but it's worth leaving a note
that it has happened.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees-roots.cc

index 76a3357eb7faf679f3398b05ba5baec6d3dfa4d6..f7857b6a099bdefc42073d3fa459ed71aa00fe4a 100644 (file)
@@ -1774,6 +1774,7 @@ bees_openat(int const parent_fd, const char *const pathname, uint64_t const flag
                };
                const auto rv = openat2(parent_fd, pathname, &how, sizeof(open_how));
                if (rv == -1 && errno == ENOSYS) {
+                       BEESLOGWARN("openat2 returns ENOSYS, falling back to openat");
                        can_openat2 = false;
                } else {
                        return Fd(rv);