]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/hostname/hostnamectl.c
sd-bus: introduce new sd_bus_flush_close_unref() call
[thirdparty/systemd.git] / src / hostname / hostnamectl.c
index de4ce7ede6a84967e034eab8f3eba28d3b2406fc..c996fc04a08aefcba6a61c7697f7df33e99cb080 100644 (file)
 
 #include <stdlib.h>
 #include <stdbool.h>
-#include <unistd.h>
 #include <getopt.h>
 #include <locale.h>
 #include <string.h>
-#include <sys/timex.h>
-#include <sys/utsname.h>
 
 #include "sd-bus.h"
-
+#include "sd-id128.h"
+#include "hostname-util.h"
 #include "bus-util.h"
 #include "bus-error.h"
 #include "util.h"
 #include "spawn-polkit-agent.h"
 #include "build.h"
-#include "clock-util.h"
-#include "strv.h"
-#include "sd-id128.h"
-#include "virt.h"
 #include "architecture.h"
-#include "fileio.h"
 
 static bool arg_ask_password = true;
 static BusTransport arg_transport = BUS_TRANSPORT_LOCAL;
@@ -516,7 +509,7 @@ static int hostnamectl_main(sd_bus *bus, int argc, char *argv[]) {
 }
 
 int main(int argc, char *argv[]) {
-        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_flush_close_unref_ sd_bus *bus = NULL;
         int r;
 
         setlocale(LC_ALL, "");