1 /* SPDX-License-Identifier: LGPL-2.1+ */
11 int utmp_get_runlevel(int *runlevel, int *previous);
13 int utmp_put_shutdown(void);
14 int utmp_put_reboot(usec_t timestamp);
15 int utmp_put_runlevel(int runlevel, int previous);
17 int utmp_put_dead_process(const char *id, pid_t pid, int code, int status);
18 int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line, int ut_type, const char *user);
23 const char *origin_tty,
24 bool (*match_tty)(const char *tty, void *userdata),
27 #else /* ENABLE_UTMP */
29 static inline int utmp_get_runlevel(int *runlevel, int *previous) {
32 static inline int utmp_put_shutdown(void) {
35 static inline int utmp_put_reboot(usec_t timestamp) {
38 static inline int utmp_put_runlevel(int runlevel, int previous) {
41 static inline int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
44 static inline int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line, int ut_type, const char *user) {
47 static inline int utmp_wall(
50 const char *origin_tty,
51 bool (*match_tty)(const char *tty, void *userdata),
56 #endif /* ENABLE_UTMP */