chiark / gitweb /
systemctl: warn users via wall that the system goes down
[elogind.git] / src / util.h
index efc993c370488a6bfea6dda302ad0b7f3949495f..e371f0b9e54a5f725c8864d48a731345bdcddca1 100644 (file)
@@ -104,9 +104,11 @@ bool first_word(const char *s, const char *word);
 
 int close_nointr(int fd);
 void close_nointr_nofail(int fd);
+void close_many(const int fds[], unsigned n_fd);
 
 int parse_boolean(const char *v);
 int parse_usec(const char *t, usec_t *usec);
+int parse_pid(const char *s, pid_t* ret_pid);
 
 int safe_atou(const char *s, unsigned *ret_u);
 int safe_atoi(const char *s, int *ret_i);
@@ -139,6 +141,7 @@ int read_one_line_file(const char *fn, char **line);
 char *strappend(const char *s, const char *suffix);
 
 int readlink_malloc(const char *p, char **r);
+int readlink_and_make_absolute(const char *p, char **r);
 
 char *file_name_from_path(const char *p);
 bool is_path(const char *p);
@@ -195,6 +198,8 @@ int make_stdio(int fd);
 
 bool is_clean_exit(int code, int status);
 
+unsigned long long random_ull(void);
+
 #define DEFINE_STRING_TABLE_LOOKUP(name,type)                           \
         const char *name##_to_string(type i) {                          \
                 if (i < 0 || i >= (type) ELEMENTSOF(name##_table))      \
@@ -249,7 +254,13 @@ bool is_device_path(const char *path);
 
 int dir_is_empty(const char *path);
 
-extern char * __progname;
+void rename_process(const char name[8]);
+
+void sigset_add_many(sigset_t *ss, ...);
+
+char* gethostname_malloc(void);
+char* getlogname_malloc(void);
+char *getttyname_malloc(void);
 
 const char *ioprio_class_to_string(int i);
 int ioprio_class_from_string(const char *s);