chiark / gitweb /
Prep v233: Unmask now needed functions in src/basic
[elogind.git] / src / basic / util.h
index af5a4fc9e607fd86d4650661abaae33cb79b56bb..a2a01f886c0986efa1be7154b84d54df1e1e396d 100644 (file)
@@ -41,7 +41,7 @@
 #include <time.h>
 #include <unistd.h>
 
-#include "formats-util.h"
+#include "format-util.h"
 #include "macro.h"
 #include "missing.h"
 #include "time-util.h"
@@ -61,7 +61,9 @@ static inline const char* one_zero(bool b) {
         return b ? "1" : "0";
 }
 
-void execute_directories(const char* const* directories, usec_t timeout, char *argv[]);
+static inline const char* enable_disable(bool b) {
+        return b ? "enable" : "disable";
+}
 
 #if 0 /// UNNEEDED by elogind
 bool plymouth_running(void);
@@ -92,6 +94,7 @@ int prot_from_flags(int flags) _const_;
 int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *path, ...);
 
 bool in_initrd(void);
+void in_initrd_force(bool value);
 
 #if 0 /// UNNEEDED by elogind
 void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
@@ -186,15 +189,17 @@ static inline unsigned log2u_round_up(unsigned x) {
 }
 
 #if 0 /// UNNEEDED by elogind
-bool id128_is_valid(const char *s) _pure_;
 #endif // 0
-
 int container_get_leader(const char *machine, pid_t *pid);
 
 int namespace_open(pid_t pid, int *pidns_fd, int *mntns_fd, int *netns_fd, int *userns_fd, int *root_fd);
 int namespace_enter(int pidns_fd, int mntns_fd, int netns_fd, int userns_fd, int root_fd);
 
 uint64_t physical_memory(void);
+uint64_t physical_memory_scale(uint64_t v, uint64_t max);
+
+uint64_t system_tasks_max(void);
+uint64_t system_tasks_max_scale(uint64_t v, uint64_t max);
 
 #if 0 /// UNNEEDED by elogind
 #endif // 0