chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
login: track login class (i.e. one of "user", "greeter", "lock-screen") for each...
[elogind.git]
/
src
/
util.h
diff --git
a/src/util.h
b/src/util.h
index 4d27c4bd516b2d222fb1dc3e2701b6c3651c0988..890a3b5d467e4097ce83674fa2ecee81738077bf 100644
(file)
--- a/
src/util.h
+++ b/
src/util.h
@@
-67,8
+67,10
@@
typedef struct dual_timestamp {
#define FORMAT_TIMESTAMP_MAX 64
#define FORMAT_TIMESTAMP_PRETTY_MAX 256
#define FORMAT_TIMESPAN_MAX 64
#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"
#define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m"
#define ANSI_HIGHLIGHT_OFF "\x1B[0m"
@@
-251,6
+253,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_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);
char hexchar(int x);
int unhexchar(char c);
@@
-324,10
+327,10
@@
bool fstype_is_network(const char *fstype);
int chvt(int vt);
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 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);
int reset_terminal(const char *name);
int open_terminal(const char *name, int mode);
@@
-381,6
+384,9
@@
void status_welcome(void);
int fd_columns(int fd);
unsigned columns(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);
int running_in_chroot(void);
char *ellipsize(const char *s, size_t length, unsigned percent);
@@
-409,6
+415,7
@@
char *fstab_node_to_udev_node(const char *p);
void filter_environ(const char *prefix);
bool tty_is_vc(const char *tty);
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 vtnr_from_tty(const char *tty);
const char *default_term_for_tty(const char *tty);
@@
-474,7
+481,7
@@
bool in_charset(const char *s, const char* charset);
int block_get_whole_disk(dev_t d, dev_t *ret);
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);
int strdup_or_null(const char *a, char **b);
@@
-521,6
+528,15
@@
unsigned long cap_last_cap(void);
char *format_bytes(char *buf, size_t l, off_t t);
char *format_bytes(char *buf, size_t l, off_t t);
-int fd_wait_for_event(int fd, int event);
+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
#endif