chiark / gitweb /
util: split-out hwclock.[ch]
[elogind.git] / src / shared / util.h
index 76bc7b3572ee94d2f1a3356d1beacd10ab577a9c..cca611836370778bc751e081be94540a96a6a983 100644 (file)
@@ -100,6 +100,8 @@ bool streq_ptr(const char *a, const char *b);
 
 #define new0(t, n) ((t*) calloc((n), sizeof(t)))
 
+#define newa(t, n) ((t*) alloca(sizeof(t)*(n)))
+
 #define newdup(t, p, n) ((t*) memdup(p, sizeof(t)*(n))
 
 #define malloc0(n) (calloc((n), 1))
@@ -415,6 +417,7 @@ char *fstab_node_to_udev_node(const char *p);
 
 bool tty_is_vc(const char *tty);
 bool tty_is_vc_resolve(const char *tty);
+bool tty_is_console(const char *tty);
 int vtnr_from_tty(const char *tty);
 const char *default_term_for_tty(const char *tty);
 
@@ -446,14 +449,6 @@ int symlink_or_copy_atomic(const char *from, const char *to);
 
 int fchmod_umask(int fd, mode_t mode);
 
-int conf_files_list(char ***strv, const char *suffix, const char *dir, ...);
-
-int hwclock_is_localtime(void);
-int hwclock_apply_localtime_delta(int *min);
-int hwclock_reset_localtime_delta(void);
-int hwclock_get_time(struct tm *tm);
-int hwclock_set_time(const struct tm *tm);
-
 bool display_is_local(const char *display);
 int socket_from_display(const char *display, char **path);
 
@@ -526,8 +521,6 @@ int fd_wait_for_event(int fd, int event, usec_t timeout);
 
 void* memdup(const void *p, size_t l);
 
-int rtc_open(int flags);
-
 int is_kernel_thread(pid_t pid);
 
 int fd_inc_sndbuf(int fd, size_t n);
@@ -537,4 +530,6 @@ int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *pa
 
 int setrlimit_closest(int resource, const struct rlimit *rlim);
 
+int getenv_for_pid(pid_t pid, const char *field, char **_value);
+
 #endif