#define FORMAT_TIMESTAMP_MAX 64
#define FORMAT_TIMESTAMP_PRETTY_MAX 256
#define FORMAT_TIMESPAN_MAX 64
+#define FORMAT_BYTES_MAX 8
-#define ANSI_HIGHLIGHT_ON "\x1B[1;31m"
+#define ANSI_HIGHLIGHT_ON "\x1B[1;39m"
+#define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m"
#define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m"
#define ANSI_HIGHLIGHT_OFF "\x1B[0m"
int get_process_comm(pid_t pid, char **name);
int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char **line);
int get_process_exe(pid_t pid, char **name);
+int get_process_uid(pid_t pid, uid_t *uid);
char hexchar(int x);
int unhexchar(char c);
int chvt(int vt);
-int read_one_char(FILE *f, char *ret, bool *need_nl);
+int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl);
int ask(char *ret, const char *replies, const char *text, ...);
-int reset_terminal_fd(int fd);
+int reset_terminal_fd(int fd, bool switch_to_text);
int reset_terminal(const char *name);
int open_terminal(const char *name, int mode);
cpu_set_t* cpu_set_malloc(unsigned *ncpus);
-void status_vprintf(const char *format, va_list ap);
-void status_printf(const char *format, ...);
+void status_vprintf(const char *status, bool ellipse, const char *format, va_list ap);
+void status_printf(const char *status, bool ellipse, const char *format, ...);
void status_welcome(void);
+int fd_columns(int fd);
unsigned columns(void);
+int fd_lines(int fd);
+unsigned lines(void);
+
int running_in_chroot(void);
char *ellipsize(const char *s, size_t length, unsigned percent);
void filter_environ(const char *prefix);
bool tty_is_vc(const char *tty);
+bool tty_is_vc_resolve(const char *tty);
int vtnr_from_tty(const char *tty);
const char *default_term_for_tty(const char *tty);
int get_user_creds(const char **username, uid_t *uid, gid_t *gid, const char **home);
int get_group_creds(const char **groupname, gid_t *gid);
+int in_group(const char *name);
+
int glob_exists(const char *path);
int dirent_ensure_type(DIR *d, struct dirent *de);
int block_get_whole_disk(dev_t d, dev_t *ret);
-int file_is_sticky(const char *p);
+int file_is_priv_sticky(const char *p);
int strdup_or_null(const char *a, char **b);
char *format_bytes(char *buf, size_t l, off_t t);
+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);
+int fd_inc_rcvbuf(int fd, size_t n);
+
#endif