#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
-#include <linux/fiemap.h>
#include <poll.h>
-#include <sys/stat.h>
-#include <sys/types.h>
#include <sys/timerfd.h>
+#include <sys/types.h>
#include <sys/utsname.h>
#include <unistd.h>
#include "battery-capacity.h"
#include "battery-util.h"
-#include "btrfs-util.h"
#include "build.h"
#include "bus-error.h"
#include "bus-locator.h"
setvbuf(f, NULL, _IONBF, 0);
/* Configure hibernation settings if we are supposed to hibernate */
- if (!strv_isempty(modes)) {
+ if (sleep_operation_is_hibernation(operation)) {
bool resume_set;
r = find_suitable_hibernation_device(&hibernation_device);
}
static int parse_argv(int argc, char *argv[]) {
+
enum {
ARG_VERSION = 0x100,
};
while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
switch (c) {
+
case 'h':
return help();
default:
assert_not_reached();
+
}
if (argc - optind != 1)
default:
r = execute(sleep_config, arg_operation, NULL);
break;
+
}
return r;