diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:42 +0000 |
commit | 78e9bb837c258ac0ec7712b3d612cc2f407e731e (patch) | |
tree | f515d16b6efd858a9aeb5b0ef5d6f90bf288283d /src/hibernate-resume/hibernate-resume-config.h | |
parent | Adding debian version 255.5-1. (diff) | |
download | systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.tar.xz systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.zip |
Merging upstream version 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.h | 29 |
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 |