#include "sleep-config.h"
#include "strv.h"
#include "tests.h"
-#include "util.h"
TEST(parse_sleep_config) {
_cleanup_(free_sleep_configp) SleepConfig *sleep_config = NULL;
static int test_fiemap_one(const char *path) {
_cleanup_free_ struct fiemap *fiemap = NULL;
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
int r;
log_info("/* %s */", __func__);
log_info("/= high-level sleep verbs =/");
r = can_sleep(SLEEP_SUSPEND);
- log_info("Suspend configured and possible: %s", r >= 0 ? yes_no(r) : strerror_safe(r));
+ log_info("Suspend configured and possible: %s", r >= 0 ? yes_no(r) : STRERROR(r));
r = can_sleep(SLEEP_HIBERNATE);
- log_info("Hibernation configured and possible: %s", r >= 0 ? yes_no(r) : strerror_safe(r));
+ log_info("Hibernation configured and possible: %s", r >= 0 ? yes_no(r) : STRERROR(r));
r = can_sleep(SLEEP_HYBRID_SLEEP);
- log_info("Hybrid-sleep configured and possible: %s", r >= 0 ? yes_no(r) : strerror_safe(r));
+ log_info("Hybrid-sleep configured and possible: %s", r >= 0 ? yes_no(r) : STRERROR(r));
r = can_sleep(SLEEP_SUSPEND_THEN_HIBERNATE);
- log_info("Suspend-then-Hibernate configured and possible: %s", r >= 0 ? yes_no(r) : strerror_safe(r));
+ log_info("Suspend-then-Hibernate configured and possible: %s", r >= 0 ? yes_no(r) : STRERROR(r));
}
static int intro(void) {