#include <sys/stat.h>
#include <sys/socket.h>
-#include <efivar/efivar.h>
-#include <efivar/efiboot.h>
-
-#include "disk.h"
-#include "dp.h"
-#include "linux.h"
-#include "util.h"
+#include "efiboot.h"
static int
__attribute__((__nonnull__ (1,2,3)))
#include <sys/utsname.h>
#include <unistd.h>
-#include <efivar/efivar.h>
-#include <efivar/efiboot.h>
-
-#include "util.h"
-#include "crc32.h"
-#include "disk.h"
-#include "gpt.h"
+#include "efiboot.h"
/**
* is_mbr_valid(): test MBR for validity
#include <stdarg.h>
#include <stddef.h>
-#include <efivar/efivar.h>
-#include "dp.h"
+#include "efivar.h"
static ssize_t
_format_acpi_adr(char *buf, size_t size,
#include <errno.h>
#include <inttypes.h>
-#include <efivar/efivar.h>
-#include "dp.h"
+#include "efivar.h"
ssize_t
format_edd10_guid(char *buf, size_t size, const char *dp_type, const_efidp dp)
#include <stdarg.h>
#include <stddef.h>
-#include <efivar/efivar.h>
-#include "dp.h"
+#include "efivar.h"
ssize_t
_format_media_dn(char *buf, size_t size, const_efidp dp)
#include <inttypes.h>
#include <stddef.h>
-#include <efivar/efivar.h>
-#include "efivar_endian.h"
-#include "dp.h"
+#include "efivar.h"
static ssize_t
format_ipv4_addr_helper(char *buf, size_t size, const char *dp_type,
#include <stdlib.h>
#include <stdio.h>
-#include <efivar/efivar.h>
-#include "dp.h"
-#include "util.h"
+#include "efivar.h"
static const efidp_header end_entire = {
.type = EFIDP_END_TYPE,
--- /dev/null
+/*
+ * efiboot.h
+ * Copyright 2018 Peter Jones <pjones@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of the
+ * License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PRIVATE_EFIBOOT_H_
+#define PRIVATE_EFIBOOT_H_
+
+#include "efivar.h"
+#include <efivar/efiboot.h>
+
+#endif /* !PRIVATE_EFIBOOT_H_ */
+// vim:fenc=utf-8:tw=75:et
extern char *optarg;
extern int optind, opterr, optopt;
-#include <efivar/efivar.h>
-#include "guid.h"
+#include "efivar.h"
#define ACTION_LIST 0x1
#define ACTION_PRINT 0x2
--- /dev/null
+/*
+ * efivar.h
+ * Copyright 2018 Peter Jones <pjones@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of the
+ * License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PRIVATE_EFIVAR_H_
+#define PRIVATE_EFIVAR_H_
+
+#include <efivar/efivar.h>
+
+#include "util.h"
+#include "efivar_endian.h"
+#include "lib.h"
+#include "guid.h"
+#include "generics.h"
+#include "dp.h"
+#include "gpt.h"
+#include "disk.h"
+#include "linux.h"
+#include "crc32.h"
+
+#endif /* !PRIVATE_EFIVAR_H_ */
+// vim:fenc=utf-8:tw=75:et
#include <sys/vfs.h>
#include <unistd.h>
-#include "lib.h"
-#include "generics.h"
-#include "util.h"
+#include "efivar.h"
#include <linux/fs.h>
#include <string.h>
#include <unistd.h>
+#include "efiboot.h"
+
/*
* GCC/Clang complains that we check for null if we have a nonnull attribute,
* even though older or other compilers might just ignore that attribute if
#include <stdlib.h>
#include <uchar.h>
-#include <efivar/efivar.h>
-#include "lib.h"
+#include "efivar.h"
#define EFIVAR_MAGIC 0xf3df1597
#include <sys/types.h>
#include <unistd.h>
-#include "guid.h"
-
static DIR *dir;
static inline int
#include <sys/utsname.h>
#include <unistd.h>
-#include <efivar/efivar.h>
-
-#include "crc32.h"
-#include "disk.h"
-#include "gpt.h"
-#include "util.h"
-#include "efivar_endian.h"
+#include "efivar.h"
#ifndef BLKGETLASTSECT
#define BLKGETLASTSECT _IO(0x12,108) /* get last sector of block device */
#include <errno.h>
#include <stdio.h>
-#include <efivar/efivar.h>
-#include "guid.h"
+#include "efivar.h"
#define GUID_LENGTH_WITH_NUL 37
#include <sys/stat.h>
#include <unistd.h>
-#include <efivar/efivar.h>
-#include "lib.h"
-#include "generics.h"
+#include "efivar.h"
static int default_probe(void)
{
#ifndef LIBEFIVAR_LIB_H
#define LIBEFIVAR_LIB_H 1
-#include <efivar/efivar.h>
-
#include <dirent.h>
#include <limits.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <efivar/efivar.h>
-#include <efivar/efiboot.h>
-
-#include "dp.h"
-#include "linux.h"
-#include "util.h"
+#include "efiboot.h"
int
__attribute__((__visibility__ ("hidden")))
#include "fix_coverity.h"
-#include <efivar/efivar.h>
#include <stddef.h>
-#include "dp.h"
+#include "efiboot.h"
#include "include/efivar/efiboot-loadopt.h"
typedef struct efi_load_option_s {
#include <sys/types.h>
#include <sys/stat.h>
-#include <efivar/efivar.h>
-#include "util.h"
-#include "guid.h"
+#include "efivar.h"
efi_guid_t const efi_guid_zero = {0};
efi_guid_t const efi_guid_empty = {0};
#include <sys/types.h>
#include <sys/utsname.h>
-#include "lib.h"
-#include "generics.h"
-#include "util.h"
+#include "efivar.h"
static const char default_vars_path[] = "/sys/firmware/efi/vars/";