mirror of
https://github.com/systemd/systemd.git
synced 2026-07-24 16:25:52 +00:00
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
28 lines
573 B
C
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
|