summaryrefslogtreecommitdiffstats
path: root/src/hibernate-resume/hibernate-resume-config.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
commitfc53809803cd2bc2434e312b19a18fa36776da12 (patch)
treeb4b43bd6538f51965ce32856e9c053d0f90919c8 /src/hibernate-resume/hibernate-resume-config.h
parentAdding upstream version 255.5. (diff)
downloadsystemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz
systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/hibernate-resume/hibernate-resume-config.h')
-rw-r--r--src/hibernate-resume/hibernate-resume-config.h29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/hibernate-resume/hibernate-resume-config.h b/src/hibernate-resume/hibernate-resume-config.h
index 365d9cc..68ef075 100644
--- a/src/hibernate-resume/hibernate-resume-config.h
+++ b/src/hibernate-resume/hibernate-resume-config.h
@@ -5,11 +5,9 @@
#include "sd-id128.h"
-typedef struct KernelHibernateLocation {
- char *device;
- uint64_t offset;
- bool offset_set;
-} KernelHibernateLocation;
+#include "macro.h"
+
+typedef struct KernelHibernateLocation KernelHibernateLocation;
typedef struct EFIHibernateLocation {
char *device;
@@ -24,6 +22,11 @@ typedef struct EFIHibernateLocation {
char *image_version;
} EFIHibernateLocation;
+EFIHibernateLocation* efi_hibernate_location_free(EFIHibernateLocation *e);
+DEFINE_TRIVIAL_CLEANUP_FUNC(EFIHibernateLocation*, efi_hibernate_location_free);
+
+int get_efi_hibernate_location(EFIHibernateLocation **ret);
+
typedef struct HibernateInfo {
const char *device;
uint64_t offset; /* in memory pages */
@@ -36,20 +39,4 @@ void hibernate_info_done(HibernateInfo *info);
int acquire_hibernate_info(HibernateInfo *ret);
-#if ENABLE_EFI
-
void compare_hibernate_location_and_warn(const HibernateInfo *info);
-
-void clear_efi_hibernate_location(void);
-
-#else
-
-static inline void compare_hibernate_location_and_warn(const HibernateInfo *info) {
- return;
-}
-
-static inline void clear_efi_hibernate_location(void) {
- return;
-}
-
-#endif