summaryrefslogtreecommitdiff
path: root/src/shutdownd
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-04-24 15:31:29 +0200
committerDaniel Mack <daniel@zonque.org>2015-04-24 17:48:12 +0200
commit99f710dde855f7ecb699ddac6ad77923c1f6bc85 (patch)
tree3fb5bb95bd9eeb0ad1839285b08ae0665cf76e50 /src/shutdownd
parent8aaa023ae78f3cb28db3edd87f96b21486810b91 (diff)
shared/utmp-wtmp: add parameter for origin tty and callback userdata
Instead of looking up the tty from STDIN, let utmp_wall() take an argument to specify an origin tty for the wall message. Only if that argument is NULL do the STDIN lookup. Also add an void *userdata argument that is handed back to the callback function.
Diffstat (limited to 'src/shutdownd')
-rw-r--r--src/shutdownd/shutdownd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shutdownd/shutdownd.c b/src/shutdownd/shutdownd.c
index a05cddceb2..8b857b55cb 100644
--- a/src/shutdownd/shutdownd.c
+++ b/src/shutdownd/shutdownd.c
@@ -142,7 +142,7 @@ static void warn_wall(usec_t n, struct sd_shutdown_command *c) {
if (asprintf(&l, "%s%s%s%s!", c->wall_message, c->wall_message[0] ? "\n" : "",
prefix, format_timestamp(date, sizeof(date), c->usec)) >= 0)
- utmp_wall(l, NULL, NULL);
+ utmp_wall(l, NULL, NULL, NULL, NULL);
else
log_error("Failed to allocate wall message");
}