Files
systemd/src/shared/wall.h
Mike Yuan 056aff96b9 shared/wall: several cleanups
Follow-up for 53c0397b1d

* Split do_wall into wall_utmp and wall_logind
* Don't pass unused arguments
* Add missing asserts
* Modernize error handling
* Don't do anything if neither utmp nor logind is enabled
2023-09-09 03:19:22 +08:00

28 lines
573 B
C

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdbool.h>
#if ENABLE_UTMP || ENABLE_LOGIND
int wall(
const char *message,
const char *username,
const char *origin_tty,
bool (*match_tty)(const char *tty, bool is_local, void *userdata),
void *userdata);
#else
static inline int wall(
const char *message,
const char *username,
const char *origin_tty,
bool (*match_tty)(const char *tty, bool is_local, void *userdata),
void *userdata) {
return 0;
}
#endif