summaryrefslogtreecommitdiff
path: root/util/nvmutil/include
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvmutil/include')
-rw-r--r--util/nvmutil/include/common.h14
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 */