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/systemctl/systemctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/systemctl/systemctl.c') diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 4e702fb8bc..38d15ff4ed 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -251,7 +251,7 @@ static void warn_wall(enum action a) { } if (*p) { - utmp_wall(p, NULL, NULL); + utmp_wall(p, NULL, NULL, NULL, NULL); return; } } @@ -259,7 +259,7 @@ static void warn_wall(enum action a) { if (!table[a]) return; - utmp_wall(table[a], NULL, NULL); + utmp_wall(table[a], NULL, NULL, NULL, NULL); } static bool avoid_bus(void) { -- cgit v1.2.3-54-g00ecf