From: Sven Eden Date: Wed, 14 Jun 2017 15:21:19 +0000 (+0200) Subject: Prep v231: Minor fix for update-utmp X-Git-Tag: v231.3~51 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=34f4737c00f51e8477cf32b30bba4f981bed093e;ds=sidebyside Prep v231: Minor fix for update-utmp --- diff --git a/src/update-utmp/Makefile b/src/update-utmp/Makefile deleted file mode 100644 index 9d0750519..000000000 --- a/src/update-utmp/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# This file is part of systemd. -# -# Copyright 2010 Lennart Poettering -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. -# -# systemd is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with systemd; If not, see . - -# This file is a dirty trick to simplify compilation from within -# emacs. This file is not intended to be distributed. So, don't touch -# it, even better ignore it! - -all: - $(MAKE) -C .. - -clean: - $(MAKE) -C .. clean - -.PHONY: all clean diff --git a/src/update-utmp/Makefile b/src/update-utmp/Makefile new file mode 120000 index 000000000..d0b0e8e00 --- /dev/null +++ b/src/update-utmp/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c index 716208406..655615fc0 100644 --- a/src/update-utmp/update-utmp.c +++ b/src/update-utmp/update-utmp.c @@ -38,12 +38,10 @@ //#include "util.h" #include "utmp-wtmp.h" -/// includes needed by elogind: +/// Additional includes needed by elogind #include "string-util.h" #include "time-util.h" #include "update-utmp.h" - - typedef struct Context { sd_bus *bus; #ifdef HAVE_AUDIT @@ -270,7 +268,6 @@ void update_utmp(int argc, char* argv[], sd_bus *bus) { if (c.audit_fd < 0 && errno != EAFNOSUPPORT && errno != EPROTONOSUPPORT) log_error_errno(errno, "Failed to connect to audit log: %m"); #endif - #if 0 /// UNNEEDED by elogind r = bus_connect_system_systemd(&c.bus); if (r < 0) { @@ -302,14 +299,12 @@ finish: else if (streq(argv[1], "shutdown")) (void)on_shutdown(&c); #endif // 0 - #ifdef HAVE_AUDIT if (c.audit_fd >= 0) audit_close(c.audit_fd); #endif sd_bus_flush_close_unref(c.bus); - #if 0 /// UNNEEDED by elogind return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; #endif // 0