summaryrefslogtreecommitdiffstats
path: root/src/basic/fd-util.h
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-12-05 16:32:30 +0100
committerLuca Boccassi <bluca@debian.org>2023-12-05 18:20:27 +0100
commit5134e5462513c9dca8d3cb03ab4d2e3c43421af9 (patch)
tree6f4b6aaecb26ccdf678fd294af469d666dfd562c /src/basic/fd-util.h
parentMerge pull request #30313 from mrc0mmand/ubuntu-ci (diff)
downloadsystemd-5134e5462513c9dca8d3cb03ab4d2e3c43421af9.tar.xz
systemd-5134e5462513c9dca8d3cb03ab4d2e3c43421af9.zip
basic: add fds_are_same_mount() helper
Diffstat (limited to 'src/basic/fd-util.h')
-rw-r--r--src/basic/fd-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
index 5061e32196..64918a4861 100644
--- a/src/basic/fd-util.h
+++ b/src/basic/fd-util.h
@@ -117,6 +117,8 @@ static inline int dir_fd_is_root_or_cwd(int dir_fd) {
return dir_fd == AT_FDCWD ? true : path_is_root_at(dir_fd, NULL);
}
+int fds_are_same_mount(int fd1, int fd2);
+
/* The maximum length a buffer for a /proc/self/fd/<fd> path needs */
#define PROC_FD_PATH_MAX \
(STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int))