diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-23 00:27:05 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-23 04:43:47 +0000 |
| commit | c87e425442f17a70651e05d1deab2a9e50f7625e (patch) | |
| tree | a44e55ba0f37e4db1074bafd0f45cc56ebf9012d /util/nvmutil/include | |
| parent | 1684f475cda9219db7a593b6fa5345c7185117f3 (diff) | |
WIP dir support (also demons)
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/include')
| -rw-r--r-- | util/nvmutil/include/common.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/util/nvmutil/include/common.h b/util/nvmutil/include/common.h index 0fedeedd..67969832 100644 --- a/util/nvmutil/include/common.h +++ b/util/nvmutil/include/common.h @@ -36,6 +36,13 @@ int fchmod(int fd, mode_t mode); +#define MKHTEMP_RETRY_MAX 512 +#define MKHTEMP_SPIN_THRESHOLD 32 + +#define MKHTEMP_FILE 0 +#define MKHTEMP_DIR 1 + + /* if 1: on operations that * check ownership, always * permit root to access even @@ -493,10 +500,11 @@ static int mkhtemp_try_create(int dirfd, char *p, size_t xc, int *fd, - struct stat *st); + struct stat *st, + int type); int mkhtemp(int *fd, struct stat *st, char *template, int dirfd, const char *fname, - struct stat *st_dir_initial); + struct stat *st_dir_initial, int type); int mkhtemp_fill_random(char *p, size_t xc); int world_writeable_and_sticky(const char *s, int sticky_allowed, int always_sticky); @@ -529,6 +537,8 @@ int fs_dirname_basename(const char *path, char **dir, char **base, int allow_relative); int openat2p(int dirfd, const char *path, int flags, mode_t mode); +int mkdirat_on_eintr(int dirfd, + const char *pathname, mode_t mode); /* asserts */ |
