From 221439164eb6683a5af35540b24b5620e5d8ab19 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 8 Apr 2018 22:12:08 -0500 Subject: Add mkpath() for common case of mkpathat(), and #define magic constants. --- lib/lib.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/lib.h') diff --git a/lib/lib.h b/lib/lib.h index 676c47b3..ccf342cc 100644 --- a/lib/lib.h +++ b/lib/lib.h @@ -191,7 +191,11 @@ void perror_exit_raw(char *msg); ssize_t readall(int fd, void *buf, size_t len); ssize_t writeall(int fd, void *buf, size_t len); off_t lskip(int fd, off_t offset); +#define MKPATHAT_MKLAST 1 +#define MKPATHAT_MAKE 2 +#define MKPATHAT_VERBOSE 4 int mkpathat(int atfd, char *dir, mode_t lastmode, int flags); +int mkpath(char *dir); struct string_list **splitpath(char *path, struct string_list **list); char *readfileat(int dirfd, char *name, char *buf, off_t *len); char *readfile(char *name, char *buf, off_t len); -- cgit v1.2.3