chiark / gitweb /
util: add functions getting proc cwd and root
[elogind.git] / src / shared / util.h
index 04f2d8a5647bcd54dbdd53e57ecae382aa8d28a4..fc59481b997090441a0ada7aff022f59e58c55c9 100644 (file)
@@ -245,6 +245,9 @@ static inline int safe_atoi64(const char *s, int64_t *ret_i) {
         return safe_atolli(s, (long long int*) ret_i);
 }
 
+int safe_atou16(const char *s, uint16_t *ret);
+int safe_atoi16(const char *s, int16_t *ret);
+
 const char* split(const char **state, size_t *l, const char *separator, bool quoted);
 
 #define FOREACH_WORD(word, length, s, state)                            \
@@ -292,6 +295,8 @@ int get_process_exe(pid_t pid, char **name);
 int get_process_uid(pid_t pid, uid_t *uid);
 int get_process_gid(pid_t pid, gid_t *gid);
 int get_process_capeff(pid_t pid, char **capeff);
+int get_process_cwd(pid_t pid, char **cwd);
+int get_process_root(pid_t pid, char **root);
 
 char hexchar(int x) _const_;
 int unhexchar(char c) _const_;