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>
#include <string.h>
#include <linux/fs.h>
#include <string.h>
#include <linux/fs.h>
+#include <linux/magic.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include "log/log.h"
#include "talloc/talloc.h"
#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)
{
void efi_init_mount(struct efi_mount *efi_mount, const char *path,
const char *guid)
{
#include <stdbool.h>
#include <stdint.h>
#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
#define EFI_VARIABLE_NON_VOLATILE 0x00000001
#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
EFI_VARIABLE_BOOTSERVICE_ACCESS \
)
EFI_VARIABLE_BOOTSERVICE_ACCESS \
)
-#ifndef EFIVARFS_MAGIC
-#define EFIVARFS_MAGIC 0xde5e81e4
-#endif
-
struct efi_data {
uint32_t attributes;
size_t data_size;
struct efi_data {
uint32_t attributes;
size_t data_size;