diff options
author | Geoff Levand <geoff@infradead.org> | 2018-08-10 17:29:15 +0000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-08-14 11:12:06 +1000 |
commit | 8d8bafa6cf7d903200b2284298211be835bdf84e (patch) | |
tree | 681256fc85288f7294eadda6b39e7969802edc5c | |
parent | 15751f10a1368f56ca10b2bc84011253216103aa (diff) | |
download | talos-petitboot-8d8bafa6cf7d903200b2284298211be835bdf84e.tar.gz talos-petitboot-8d8bafa6cf7d903200b2284298211be835bdf84e.zip |
lib/efi: Move magic to implementation
efi_check_mount now does a magic number check by default, so
move the magic number related code from efivar.h to efivar.c.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
-rw-r--r-- | lib/efi/efivar.c | 5 | ||||
-rw-r--r-- | lib/efi/efivar.h | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/efi/efivar.c b/lib/efi/efivar.c index f1dd002..37bb6d9 100644 --- a/lib/efi/efivar.c +++ b/lib/efi/efivar.c @@ -24,6 +24,7 @@ #include <string.h> #include <linux/fs.h> +#include <linux/magic.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/statfs.h> @@ -32,6 +33,10 @@ #include "log/log.h" #include "talloc/talloc.h" +#ifndef EFIVARFS_MAGIC +#define EFIVARFS_MAGIC 0xde5e81e4 +#endif + void efi_init_mount(struct efi_mount *efi_mount, const char *path, const char *guid) { diff --git a/lib/efi/efivar.h b/lib/efi/efivar.h index b74ab64..9307d6c 100644 --- a/lib/efi/efivar.h +++ b/lib/efi/efivar.h @@ -22,8 +22,6 @@ #include <stdbool.h> #include <stdint.h> -#include <linux/magic.h> - #define EFI_VARIABLE_NON_VOLATILE 0x00000001 #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 @@ -38,10 +36,6 @@ EFI_VARIABLE_BOOTSERVICE_ACCESS \ ) -#ifndef EFIVARFS_MAGIC -#define EFIVARFS_MAGIC 0xde5e81e4 -#endif - struct efi_data { uint32_t attributes; size_t data_size; |