From 99f710dde855f7ecb699ddac6ad77923c1f6bc85 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 24 Apr 2015 15:31:29 +0200 Subject: 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. --- src/shutdownd/shutdownd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shutdownd') 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"); } -- cgit v1.2.3-54-g00ecf