X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Futil.h;h=e6ffad6c2e89554b732ce83d3a870cef3740e78a;hp=be05cc87349b6f40c18ed216ee19dad33463deaa;hb=3043935f02da2e680b37cf282587106ad05440ee;hpb=55d7bfc19b72eca09d2bb7c9c73a62c886d8b9b4 diff --git a/src/util.h b/src/util.h index be05cc873..e6ffad6c2 100644 --- a/src/util.h +++ b/src/util.h @@ -68,7 +68,8 @@ typedef struct dual_timestamp { #define FORMAT_TIMESTAMP_PRETTY_MAX 256 #define FORMAT_TIMESPAN_MAX 64 -#define ANSI_HIGHLIGHT_ON "\x1B[1;31m" +#define ANSI_HIGHLIGHT_ON "\x1B[1;39m" +#define ANSI_HIGHLIGHT_RED_ON "\x1B[1;32m" #define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m" #define ANSI_HIGHLIGHT_OFF "\x1B[0m" @@ -251,6 +252,7 @@ int rmdir_parents(const char *path, const char *stop); 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); @@ -409,6 +411,7 @@ char *fstab_node_to_udev_node(const char *p); 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);