diff options
| author | Michael Biebl <biebl@debian.org> | 2019-07-31 10:52:41 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-07-31 10:52:41 +0200 |
| commit | 3a99ba5fd066fe42bd5461360a7411766496619c (patch) | |
| tree | b43863fbe867d7b0f9f9032fd40664c521c88fcb /shared/systemd/src/basic/fs-util.h | |
| parent | 13cfe714153013158bdf3e74ab58ab713a04223c (diff) | |
| parent | 2e5fa45ddfbb5cffa1e78221f1cea706e2f298af (diff) | |
Update upstream source from tag 'upstream/1.19.90'
Update to upstream version '1.19.90' with Debian dir 6d1a5b9902866beee1365904d425141b5d4c944c
Diffstat (limited to 'shared/systemd/src/basic/fs-util.h')
| -rw-r--r-- | shared/systemd/src/basic/fs-util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shared/systemd/src/basic/fs-util.h b/shared/systemd/src/basic/fs-util.h index b9651205..c5527cc4 100644 --- a/shared/systemd/src/basic/fs-util.h +++ b/shared/systemd/src/basic/fs-util.h @@ -7,12 +7,20 @@ #include <stdbool.h> #include <stdint.h> #include <sys/inotify.h> +#include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include "errno-util.h" #include "time-util.h" +#define MODE_INVALID ((mode_t) -1) + +/* The following macros add 1 when converting things, since 0 is a valid mode, while the pointer + * NULL is special */ +#define PTR_TO_MODE(p) ((mode_t) ((uintptr_t) (p)-1)) +#define MODE_TO_PTR(u) ((void *) ((uintptr_t) (u)+1)) + int unlink_noerrno(const char *path); int rmdir_parents(const char *path, const char *stop); |