summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-04 19:20:21 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-04 20:02:50 +0100
commit1c231f56482546725c4dbd3303f70300bd3c63e9 (patch)
treedc0f3ff586db692d961264a23b2b23040c1ce53e /src/shared/util.h
parentb5d742138f71e87312541a89aac5657015f50f48 (diff)
logind: make $XDG_RUNTIME_DIR a per-user tmpfs
This way each user allocates from his own pool, with its own size limit. This puts the size limit by default to 10% of the physical RAM size but makes it configurable in logind.conf.
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index 78b1444739..e4300719a3 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -58,6 +58,14 @@
# error Unknown uid_t size
#endif
+#if SIZEOF_GID_T == 4
+# define GID_FMT "%" PRIu32
+#elif SIZEOF_GID_T == 2
+# define GID_FMT "%" PRIu16
+#else
+# error Unknown gid_t size
+#endif
+
#include "macro.h"
#include "time-util.h"
@@ -883,3 +891,5 @@ int fd_warn_permissions(const char *path, int fd);
unsigned long personality_from_string(const char *p);
const char *personality_to_string(unsigned long);
+
+uint64_t physical_memory(void);