chiark / gitweb /
Remove src/gpt-auto-generator
[elogind.git] / src / hostname / hostnamectl.c
index 1026e195dc9e88072373c700c8ef54c32a1d9838..5218b41b41595047a879fcb7e6324e4377248dc5 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 "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;
@@ -405,7 +398,7 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case 'M':
-                        arg_transport = BUS_TRANSPORT_CONTAINER;
+                        arg_transport = BUS_TRANSPORT_MACHINE;
                         arg_host = optarg;
                         break;
 
@@ -536,5 +529,5 @@ int main(int argc, char *argv[]) {
         r = hostnamectl_main(bus, argc, argv);
 
 finish:
-        return r < 0 ? EXIT_FAILURE : r;
+        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }