summaryrefslogtreecommitdiff
path: root/src/basic/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/util.h')
-rw-r--r--src/basic/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/basic/util.h b/src/basic/util.h
index ff39eae715..a3ebb987e4 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -358,6 +358,14 @@ bool is_device_path(const char *path);
int dir_is_empty(const char *path);
char* dirname_malloc(const char *path);
+static inline int dir_is_populated(const char *path) {
+ int r;
+ r = dir_is_empty(path);
+ if (r < 0)
+ return r;
+ return !r;
+}
+
char* lookup_uid(uid_t uid);
char* getlogname_malloc(void);
char* getusername_malloc(void);