From: Mike Yuan Date: Thu, 26 Oct 2023 14:17:12 +0000 (+0800) Subject: sleep: drop unneeded includes X-Git-Tag: v255-rc1~108^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37f80890b29ca28a23a1e36ecf03324f4f8d8e47;p=thirdparty%2Fsystemd.git sleep: drop unneeded includes --- diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 354044c67c8..05d6e38ae1f 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -7,11 +7,9 @@ #include #include #include -#include #include -#include -#include #include +#include #include #include @@ -22,7 +20,6 @@ #include "battery-capacity.h" #include "battery-util.h" -#include "btrfs-util.h" #include "build.h" #include "bus-error.h" #include "bus-locator.h" @@ -560,6 +557,7 @@ static int help(void) { } static int parse_argv(int argc, char *argv[]) { + enum { ARG_VERSION = 0x100, }; @@ -577,6 +575,7 @@ static int parse_argv(int argc, char *argv[]) { while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) switch (c) { + case 'h': return help(); @@ -588,6 +587,7 @@ static int parse_argv(int argc, char *argv[]) { default: assert_not_reached(); + } if (argc - optind != 1) @@ -644,6 +644,7 @@ static int run(int argc, char *argv[]) { default: r = execute(sleep_config, arg_operation, NULL); break; + } return r;