X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Flogin%2Flogind-utmp.c;h=d959a4a45496959922e184da5349180823b39fbd;hb=91234e9678a03a52f0dccfcd4b24f561d3612d54;hp=1e13ff01de75c460aa0e915c0f8b46848d118a0e;hpb=c6f9360e347fcd159edf75b3ebe1de7913fb83e4;p=elogind.git diff --git a/src/login/logind-utmp.c b/src/login/logind-utmp.c index 1e13ff01d..d959a4a45 100644 --- a/src/login/logind-utmp.c +++ b/src/login/logind-utmp.c @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - /*** This file is part of systemd. @@ -20,20 +18,23 @@ ***/ #include +#include #include #include -#include #include "sd-messages.h" -#include "strv.h" -#include "special.h" -#include "unit-name.h" -#include "audit.h" -#include "bus-util.h" -#include "bus-error.h" + +#include "alloc-util.h" +#include "audit-util.h" #include "bus-common-errors.h" -#include "logind.h" +#include "bus-error.h" +#include "bus-util.h" #include "formats-util.h" +#include "logind.h" +//#include "special.h" +#include "strv.h" +#include "unit-name.h" +#include "user-util.h" #include "utmp-wtmp.h" _const_ static usec_t when_wall(usec_t n, usec_t elapse) { @@ -64,7 +65,7 @@ bool logind_wall_tty_filter(const char *tty, void *userdata) { assert(m); - if (!startswith(tty, "/dev/")) + if (!startswith(tty, "/dev/") || !m->scheduled_shutdown_tty) return true; return !streq(tty + 5, m->scheduled_shutdown_tty); @@ -94,7 +95,7 @@ static int warn_wall(Manager *m, usec_t n) { return 0; } - utmp_wall(l, lookup_uid(m->scheduled_shutdown_uid), + utmp_wall(l, uid_to_name(m->scheduled_shutdown_uid), m->scheduled_shutdown_tty, logind_wall_tty_filter, m); return 1;