summaryrefslogtreecommitdiff
path: root/src/basic/util.h
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-10-23 10:50:53 +0200
committerDaniel Mack <github@zonque.org>2015-10-23 10:50:53 +0200
commit952b4473bc392652b1d4c9dae5ec88fd003c4e1d (patch)
tree8d27afa9b27ceb997013868f2b80a4bb5a993911 /src/basic/util.h
parentc9fc270e462bf2f4eab963bf71234d64b0c4c30f (diff)
parentb0830e21f47109d8a6ba2fc0afbf9b2ca1ffc2a9 (diff)
Merge pull request #1641 from poettering/btrfs-quota
btrfs quota beef up and various other unrelated changes
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);