]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/hibernate-resume/hibernate-resume-config.h
hibernate-resume-config: expose get_efi_hibernate_location
[thirdparty/systemd.git] / src / hibernate-resume / hibernate-resume-config.h
index c0aa9e00ad1348f53b51351124849ddb6995be46..68ef0753559adb3ea48fabdcac5e15ef07ff5e66 100644 (file)
@@ -5,8 +5,27 @@
 
 #include "sd-id128.h"
 
+#include "macro.h"
+
 typedef struct KernelHibernateLocation KernelHibernateLocation;
-typedef struct EFIHibernateLocation EFIHibernateLocation;
+
+typedef struct EFIHibernateLocation {
+        char *device;
+
+        sd_id128_t uuid;
+        uint64_t offset;
+
+        char *kernel_version;
+        char *id;
+        char *image_id;
+        char *version_id;
+        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;
@@ -20,14 +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);
-
-#else
-
-static inline void compare_hibernate_location_and_warn(const HibernateInfo *info) {
-        return;
-}
-
-#endif