Blame SOURCES/0030-Local-header-whitespace-cleanup.patch

4e0e09
From b6db7342f15a86f734445e83198dde024544e492 Mon Sep 17 00:00:00 2001
4e0e09
From: Peter Jones <pjones@redhat.com>
4e0e09
Date: Mon, 17 Jun 2019 14:25:21 -0400
4e0e09
Subject: [PATCH 30/63] Local header whitespace cleanup.
4e0e09
4e0e09
Signed-off-by: Peter Jones <pjones@redhat.com>
4e0e09
---
4e0e09
 src/crc32.h         |   2 +
4e0e09
 src/disk.h          |   4 +-
4e0e09
 src/dp.h            |   2 +
4e0e09
 src/efiboot.h       |   3 +-
4e0e09
 src/efivar.h        |   3 +-
4e0e09
 src/efivar_endian.h |   2 +
4e0e09
 src/fix_coverity.h  |  28 ++-
4e0e09
 src/generics.h      |   2 +
4e0e09
 src/gpt.h           |  97 ++++----
4e0e09
 src/guid.h          |  20 +-
4e0e09
 src/hexdump.h       |   2 +
4e0e09
 src/lib.h           |   2 +
4e0e09
 src/linux.h         | 370 +++++++++++++++---------------
4e0e09
 src/path-helpers.h  |  37 +--
4e0e09
 src/ucs2.h          |   2 +
4e0e09
 src/util.h          | 532 ++++++++++++++++++++++----------------------
4e0e09
 16 files changed, 572 insertions(+), 536 deletions(-)
4e0e09
4e0e09
diff --git a/src/crc32.h b/src/crc32.h
4e0e09
index 405d23c86ec..b5b975a5768 100644
4e0e09
--- a/src/crc32.h
4e0e09
+++ b/src/crc32.h
4e0e09
@@ -30,3 +30,5 @@
4e0e09
 extern uint32_t crc32 (const void *buf, unsigned long len, uint32_t seed);
4e0e09
 
4e0e09
 #endif /* _CRC32_H */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/disk.h b/src/disk.h
4e0e09
index f0fa7f9f42d..8ba0f4602f4 100644
4e0e09
--- a/src/disk.h
4e0e09
+++ b/src/disk.h
4e0e09
@@ -24,6 +24,8 @@
4e0e09
 extern bool HIDDEN is_partitioned(int fd);
4e0e09
 
4e0e09
 extern HIDDEN ssize_t make_hd_dn(uint8_t *buf, ssize_t size, int fd,
4e0e09
-                                 int32_t partition, uint32_t options);
4e0e09
+				 int32_t partition, uint32_t options);
4e0e09
 
4e0e09
 #endif /* _EFIBOOT_DISK_H */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/dp.h b/src/dp.h
4e0e09
index 1f921d524aa..33a29db0d5d 100644
4e0e09
--- a/src/dp.h
4e0e09
+++ b/src/dp.h
4e0e09
@@ -187,3 +187,5 @@ extern ssize_t _format_bios_boot_dn(char *buf, size_t size, const_efidp dp);
4e0e09
 	format_helper_2(_format_bios_boot_dn, buf, size, off, dp)
4e0e09
 
4e0e09
 #endif /* _EFIVAR_INTERNAL_DP_H */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/efiboot.h b/src/efiboot.h
4e0e09
index f60f2cf5c2a..23275ed82bf 100644
4e0e09
--- a/src/efiboot.h
4e0e09
+++ b/src/efiboot.h
4e0e09
@@ -24,4 +24,5 @@
4e0e09
 #include <efivar/efiboot.h>
4e0e09
 
4e0e09
 #endif /* !PRIVATE_EFIBOOT_H_ */
4e0e09
-// vim:fenc=utf-8:tw=75:et
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/efivar.h b/src/efivar.h
4e0e09
index ce6beb6850b..3d4b429631e 100644
4e0e09
--- a/src/efivar.h
4e0e09
+++ b/src/efivar.h
4e0e09
@@ -36,4 +36,5 @@
4e0e09
 #include "path-helpers.h"
4e0e09
 
4e0e09
 #endif /* !PRIVATE_EFIVAR_H_ */
4e0e09
-// vim:fenc=utf-8:tw=75:et
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/efivar_endian.h b/src/efivar_endian.h
4e0e09
index b8e6a314838..bed4603ad71 100644
4e0e09
--- a/src/efivar_endian.h
4e0e09
+++ b/src/efivar_endian.h
4e0e09
@@ -51,3 +51,5 @@
4e0e09
 #endif
4e0e09
 
4e0e09
 #endif /* _EFIVAR_ENDIAN_H */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/fix_coverity.h b/src/fix_coverity.h
4e0e09
index 95a5c9282c9..acb4cc65eff 100644
4e0e09
--- a/src/fix_coverity.h
4e0e09
+++ b/src/fix_coverity.h
4e0e09
@@ -22,8 +22,8 @@
4e0e09
  *
4e0e09
  * In glibc's headers, bits/floatn.h has:
4e0e09
  *
4e0e09
- * #if (defined __x86_64__                                              \
4e0e09
- *   ? __GNUC_PREREQ (4, 3)                                             \
4e0e09
+ * #if (defined __x86_64__						\
4e0e09
+ *   ? __GNUC_PREREQ (4, 3)						\
4e0e09
  *   : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4)))
4e0e09
  * # define __HAVE_FLOAT128 1
4e0e09
  * #else
4e0e09
@@ -35,24 +35,21 @@
4e0e09
  * #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
4e0e09
  * slash* Likewise for the '_Float128' format  *slash
4e0e09
  * extern _Float128 strtof128 (const char *__restrict __nptr,
4e0e09
- *                       char **__restrict __endptr)
4e0e09
- *      __THROW __nonnull ((1));
4e0e09
+ *			       char **__restrict __endptr)
4e0e09
+ *	__THROW __nonnull ((1));
4e0e09
  * #endif
4e0e09
  *
4e0e09
  * Which then causes cov-emit to lose its shit:
4e0e09
  *
4e0e09
- * "/usr/include/stdlib.h", line 133: error #20: identifier "_Float128" is
4e0e09
- *           undefined
4e0e09
+ * "/usr/include/stdlib.h", line 133: error #20: identifier "_Float128" is undefined
4e0e09
  *   extern _Float128 strtof128 (const char *__restrict __nptr,
4e0e09
- *          ^
4e0e09
- * "/usr/include/stdlib.h", line 190: error #20: identifier "_Float128" is
4e0e09
- *           undefined
4e0e09
- *                         _Float128 __f)
4e0e09
- *                         ^
4e0e09
- * "/usr/include/stdlib.h", line 236: error #20: identifier "_Float128" is
4e0e09
- *           undefined
4e0e09
+ *	    ^
4e0e09
+ * "/usr/include/stdlib.h", line 190: error #20: identifier "_Float128" is undefined
4e0e09
+ *			 _Float128 __f)
4e0e09
+ *			 ^
4e0e09
+ * "/usr/include/stdlib.h", line 236: error #20: identifier "_Float128" is undefined
4e0e09
  *   extern _Float128 strtof128_l (const char *__restrict __nptr,
4e0e09
- *          ^
4e0e09
+ *	    ^
4e0e09
  *
4e0e09
  * And then you'll notice something like this later on:
4e0e09
  * [WARNING] Emitted 0 C/C++ compilation units (0%) successfully
4e0e09
@@ -91,4 +88,5 @@ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
4e0e09
 #endif
4e0e09
 
4e0e09
 #endif /* !FIX_COVERITY_H */
4e0e09
-// vim:fenc=utf-8:tw=75
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/generics.h b/src/generics.h
4e0e09
index 66be4bd76ab..8ade54ee96b 100644
4e0e09
--- a/src/generics.h
4e0e09
+++ b/src/generics.h
4e0e09
@@ -184,3 +184,5 @@ generic_append_variable(efi_guid_t guid, const char *name,
4e0e09
 
4e0e09
 #endif /* LIBEFIVAR_GENERIC_NEXT_VARIABLE_NAME_H */
4e0e09
 #endif /* EFIVAR_BUILD_ENVIRONMENT */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/gpt.h b/src/gpt.h
4e0e09
index 0d7d5e8a649..66fbc21106c 100644
4e0e09
--- a/src/gpt.h
4e0e09
+++ b/src/gpt.h
4e0e09
@@ -38,27 +38,27 @@
4e0e09
 #define GPT_HEADER_REVISION_V0_99 0x00009900
4e0e09
 #define GPT_PRIMARY_PARTITION_TABLE_LBA 1
4e0e09
 
4e0e09
-#define PARTITION_SYSTEM_GUID                           \
4e0e09
-        EFI_GUID(0xC12A7328, 0xF81F, 0x11d2, 0xBA4B,    \
4e0e09
-                 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B)
4e0e09
-#define LEGACY_MBR_PARTITION_GUID                       \
4e0e09
-        EFI_GUID(0x024DEE41, 0x33E7, 0x11d3, 0x9D69,    \
4e0e09
-                 0x00, 0x08, 0xC7, 0x81, 0xF3, 0x9F)
4e0e09
-#define PARTITION_MSFT_RESERVED_GUID                    \
4e0e09
-        EFI_GUID(0xE3C9E316, 0x0B5C, 0x4DB8, 0x817D,    \
4e0e09
-                 0xF9, 0x2D, 0xF0, 0x02, 0x15, 0xAE)
4e0e09
-#define PARTITION_BASIC_DATA_GUID                       \
4e0e09
-        EFI_GUID(0xEBD0A0A2, 0xB9E5, 0x4433, 0x87C0,    \
4e0e09
-                 0x68, 0xB6, 0xB7, 0x26, 0x99, 0xC7)
4e0e09
-#define PARTITION_LINUX_RAID_GUID                       \
4e0e09
-        EFI_GUID(0xa19d880f, 0x05fc, 0x4d3b, 0xA006,    \
4e0e09
-                 0x74, 0x3f, 0x0f, 0x84, 0x91, 0x1e)
4e0e09
-#define PARTITION_LINUX_SWAP_GUID                       \
4e0e09
-        EFI_GUID(0x0657fd6d, 0xa4ab, 0x43c4, 0x84E5,    \
4e0e09
-                 0x09, 0x33, 0xc8, 0x4b, 0x4f, 0x4f)
4e0e09
-#define PARTITION_LINUX_LVM_GUID                        \
4e0e09
-        EFI_GUID(0xe6d6d379, 0xf507, 0x44c2, 0xa23c,    \
4e0e09
-                 0x23, 0x8f, 0x2a, 0x3d, 0xf9, 0x28)
4e0e09
+#define PARTITION_SYSTEM_GUID				\
4e0e09
+	EFI_GUID(0xC12A7328, 0xF81F, 0x11d2, 0xBA4B,	\
4e0e09
+		 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B)
4e0e09
+#define LEGACY_MBR_PARTITION_GUID			\
4e0e09
+	EFI_GUID(0x024DEE41, 0x33E7, 0x11d3, 0x9D69,	\
4e0e09
+		 0x00, 0x08, 0xC7, 0x81, 0xF3, 0x9F)
4e0e09
+#define PARTITION_MSFT_RESERVED_GUID			\
4e0e09
+	EFI_GUID(0xE3C9E316, 0x0B5C, 0x4DB8, 0x817D,	\
4e0e09
+		 0xF9, 0x2D, 0xF0, 0x02, 0x15, 0xAE)
4e0e09
+#define PARTITION_BASIC_DATA_GUID			\
4e0e09
+	EFI_GUID(0xEBD0A0A2, 0xB9E5, 0x4433, 0x87C0,	\
4e0e09
+		 0x68, 0xB6, 0xB7, 0x26, 0x99, 0xC7)
4e0e09
+#define PARTITION_LINUX_RAID_GUID			\
4e0e09
+	EFI_GUID(0xa19d880f, 0x05fc, 0x4d3b, 0xA006,	\
4e0e09
+		 0x74, 0x3f, 0x0f, 0x84, 0x91, 0x1e)
4e0e09
+#define PARTITION_LINUX_SWAP_GUID			\
4e0e09
+	EFI_GUID(0x0657fd6d, 0xa4ab, 0x43c4, 0x84E5,	\
4e0e09
+		 0x09, 0x33, 0xc8, 0x4b, 0x4f, 0x4f)
4e0e09
+#define PARTITION_LINUX_LVM_GUID			\
4e0e09
+	EFI_GUID(0xe6d6d379, 0xf507, 0x44c2, 0xa23c,	\
4e0e09
+		 0x23, 0x8f, 0x2a, 0x3d, 0xf9, 0x28)
4e0e09
 
4e0e09
 typedef struct _gpt_header {
4e0e09
 	uint64_t magic;
4e0e09
@@ -81,7 +81,7 @@ typedef struct _gpt_header {
4e0e09
 typedef struct _gpt_entry_attributes {
4e0e09
 	uint64_t required_to_function:1;
4e0e09
 	uint64_t reserved:47;
4e0e09
-        uint64_t type_guid_specific:16;
4e0e09
+	uint64_t type_guid_specific:16;
4e0e09
 } PACKED gpt_entry_attributes;
4e0e09
 
4e0e09
 typedef struct _gpt_entry {
4e0e09
@@ -103,25 +103,36 @@ typedef struct _gpt_entry {
4e0e09
  * Number of actual partition entries should be calculated as:
4e0e09
  */
4e0e09
 #define GPT_DEFAULT_RESERVED_PARTITION_ENTRIES \
4e0e09
-        (GPT_DEFAULT_RESERVED_PARTITION_ENTRY_ARRAY_SIZE / \
4e0e09
-         sizeof(gpt_entry))
4e0e09
+	(GPT_DEFAULT_RESERVED_PARTITION_ENTRY_ARRAY_SIZE / \
4e0e09
+	 sizeof(gpt_entry))
4e0e09
 
4e0e09
 typedef struct _partition_record {
4e0e09
-	uint8_t boot_indicator; /* Not used by EFI firmware. Set to 0x80 to indicate that this
4e0e09
-                                   is the bootable legacy partition. */
4e0e09
-	uint8_t start_head;     /* Start of partition in CHS address, not used by EFI firmware. */
4e0e09
-	uint8_t start_sector;   /* Start of partition in CHS address, not used by EFI firmware. */
4e0e09
-	uint8_t start_track;    /* Start of partition in CHS address, not used by EFI firmware. */
4e0e09
-	uint8_t os_type;        /* OS type. A value of 0xEF defines an EFI system partition.
4e0e09
-                                   Other values are reserved for legacy operating systems, and
4e0e09
-                                   allocated independently of the EFI specification. */
4e0e09
-	uint8_t end_head;       /* End of partition in CHS address, not used by EFI firmware. */
4e0e09
-	uint8_t end_sector;     /* End of partition in CHS address, not used by EFI firmware. */
4e0e09
-	uint8_t end_track;      /* End of partition in CHS address, not used by EFI firmware. */
4e0e09
-	uint32_t starting_lba;  /* Starting LBA address of the partition on the disk. Used by
4e0e09
-                                   EFI firmware to define the start of the partition. */
4e0e09
-	uint32_t size_in_lba;   /* Size of partition in LBA. Used by EFI firmware to determine
4e0e09
-                                   the size of the partition. */
4e0e09
+	uint8_t boot_indicator; /* Not used by EFI firmware. Set to 0x80 to
4e0e09
+				   indicate that this is the bootable
4e0e09
+				   legacy partition. */
4e0e09
+	uint8_t start_head;     /* Start of partition in CHS address, not
4e0e09
+				   used by EFI firmware. */
4e0e09
+	uint8_t start_sector;   /* Start of partition in CHS address, not
4e0e09
+				   used by EFI firmware. */
4e0e09
+	uint8_t start_track;    /* Start of partition in CHS address, not
4e0e09
+				   used by EFI firmware. */
4e0e09
+	uint8_t os_type;	/* OS type. A value of 0xEF defines an EFI
4e0e09
+				   system partition.
4e0e09
+				   Other values are reserved for legacy
4e0e09
+				   operating systems, and allocated
4e0e09
+				   independently of the EFI specification. */
4e0e09
+	uint8_t end_head;       /* End of partition in CHS address, not
4e0e09
+				   used by EFI firmware. */
4e0e09
+	uint8_t end_sector;     /* End of partition in CHS address, not
4e0e09
+				   used by EFI firmware. */
4e0e09
+	uint8_t end_track;      /* End of partition in CHS address, not
4e0e09
+				   used by EFI firmware. */
4e0e09
+	uint32_t starting_lba;  /* Starting LBA address of the partition on
4e0e09
+				   the disk. Used by EFI firmware to define
4e0e09
+				   the start of the partition. */
4e0e09
+	uint32_t size_in_lba;	/* Size of partition in LBA. Used by EFI
4e0e09
+				   firmware to determine the size of the
4e0e09
+				   partition. */
4e0e09
 } PACKED partition_record;
4e0e09
 
4e0e09
 /*
4e0e09
@@ -141,8 +152,10 @@ typedef struct _legacy_mbr {
4e0e09
 /* Functions */
4e0e09
 extern int NONNULL(3, 4, 5, 6, 7) HIDDEN
4e0e09
 gpt_disk_get_partition_info (int fd, uint32_t num, uint64_t *start,
4e0e09
-                             uint64_t *size, uint8_t *signature,
4e0e09
-                             uint8_t *mbr_type, uint8_t *signature_type,
4e0e09
-                             int ignore_pmbr_error, int logical_sector_size);
4e0e09
+			     uint64_t *size, uint8_t *signature,
4e0e09
+			     uint8_t *mbr_type, uint8_t *signature_type,
4e0e09
+			     int ignore_pmbr_error, int logical_sector_size);
4e0e09
 
4e0e09
 #endif /* _EFIBOOT_GPT_H */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/guid.h b/src/guid.h
4e0e09
index d4a06f957a5..3229621a3f1 100644
4e0e09
--- a/src/guid.h
4e0e09
+++ b/src/guid.h
4e0e09
@@ -110,7 +110,7 @@ text_to_guid(const char *text, efi_guid_t *guid)
4e0e09
 	guid->a = cpu_to_le32(guid->a);
4e0e09
 
4e0e09
 	/* 84be9c3e-8a32-42c0-891c-4cd3b072becc
4e0e09
-	 *          ^ */
4e0e09
+	 *	  ^ */
4e0e09
 	strncpy(fourbytes, text+9, 4);
4e0e09
 	if (check_segment_sanity(fourbytes, 4) < 0)
4e0e09
 		return -1;
4e0e09
@@ -118,7 +118,7 @@ text_to_guid(const char *text, efi_guid_t *guid)
4e0e09
 	guid->b = cpu_to_le16(guid->b);
4e0e09
 
4e0e09
 	/* 84be9c3e-8a32-42c0-891c-4cd3b072becc
4e0e09
-	 *               ^ */
4e0e09
+	 *	       ^ */
4e0e09
 	strncpy(fourbytes, text+14, 4);
4e0e09
 	if (check_segment_sanity(fourbytes, 4) < 0)
4e0e09
 		return -1;
4e0e09
@@ -126,7 +126,7 @@ text_to_guid(const char *text, efi_guid_t *guid)
4e0e09
 	guid->c = cpu_to_le16(guid->c);
4e0e09
 
4e0e09
 	/* 84be9c3e-8a32-42c0-891c-4cd3b072becc
4e0e09
-	 *                    ^ */
4e0e09
+	 *		    ^ */
4e0e09
 	strncpy(fourbytes, text+19, 4);
4e0e09
 	if (check_segment_sanity(fourbytes, 4) < 0)
4e0e09
 		return -1;
4e0e09
@@ -134,42 +134,42 @@ text_to_guid(const char *text, efi_guid_t *guid)
4e0e09
 	guid->d = cpu_to_be16(guid->d);
4e0e09
 
4e0e09
 	/* 84be9c3e-8a32-42c0-891c-4cd3b072becc
4e0e09
-	 *                         ^ */
4e0e09
+	 *			 ^ */
4e0e09
 	strncpy(twobytes, text+24, 2);
4e0e09
 	if (check_segment_sanity(twobytes, 2) < 0)
4e0e09
 		return -1;
4e0e09
 	guid->e[0] = (uint8_t)strtoul(twobytes, NULL, 16);
4e0e09
 
4e0e09
 	/* 84be9c3e-8a32-42c0-891c-4cd3b072becc
4e0e09
-	 *                           ^ */
4e0e09
+	 *			   ^ */
4e0e09
 	strncpy(twobytes, text+26, 2);
4e0e09
 	if (check_segment_sanity(twobytes, 2) < 0)
4e0e09
 		return -1;
4e0e09
 	guid->e[1] = (uint8_t)strtoul(twobytes, NULL, 16);
4e0e09
 
4e0e09
 	/* 84be9c3e-8a32-42c0-891c-4cd3b072becc
4e0e09
-	 *                             ^ */
4e0e09
+	 *			     ^ */
4e0e09
 	strncpy(twobytes, text+28, 2);
4e0e09
 	if (check_segment_sanity(twobytes, 2) < 0)
4e0e09
 		return -1;
4e0e09
 	guid->e[2] = (uint8_t)strtoul(twobytes, NULL, 16);
4e0e09
 
4e0e09
 	/* 84be9c3e-8a32-42c0-891c-4cd3b072becc
4e0e09
-	 *                               ^ */
4e0e09
+	 *			       ^ */
4e0e09
 	strncpy(twobytes, text+30, 2);
4e0e09
 	if (check_segment_sanity(twobytes, 2) < 0)
4e0e09
 		return -1;
4e0e09
 	guid->e[3] = (uint8_t)strtoul(twobytes, NULL, 16);
4e0e09
 
4e0e09
 	/* 84be9c3e-8a32-42c0-891c-4cd3b072becc
4e0e09
-	 *                                 ^ */
4e0e09
+	 *				 ^ */
4e0e09
 	strncpy(twobytes, text+32, 2);
4e0e09
 	if (check_segment_sanity(twobytes, 2) < 0)
4e0e09
 		return -1;
4e0e09
 	guid->e[4] = (uint8_t)strtoul(twobytes, NULL, 16);
4e0e09
 
4e0e09
 	/* 84be9c3e-8a32-42c0-891c-4cd3b072becc
4e0e09
-	 *                                   ^ */
4e0e09
+	 *				   ^ */
4e0e09
 	strncpy(twobytes, text+34, 2);
4e0e09
 	if (check_segment_sanity(twobytes, 2) < 0)
4e0e09
 		return -1;
4e0e09
@@ -185,3 +185,5 @@ struct guidname {
4e0e09
 };
4e0e09
 
4e0e09
 #endif /* LIBEFIVAR_GUID */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/hexdump.h b/src/hexdump.h
4e0e09
index f8c32faa9e1..d88aa507b8d 100644
4e0e09
--- a/src/hexdump.h
4e0e09
+++ b/src/hexdump.h
4e0e09
@@ -114,3 +114,5 @@ hexdump(uint8_t *data, unsigned long size)
4e0e09
 }
4e0e09
 
4e0e09
 #endif /* STATIC_HEXDUMP_H */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/lib.h b/src/lib.h
4e0e09
index 5024128c42c..3cc29a01fb4 100644
4e0e09
--- a/src/lib.h
4e0e09
+++ b/src/lib.h
4e0e09
@@ -51,3 +51,5 @@ extern struct efi_var_operations vars_ops;
4e0e09
 extern struct efi_var_operations efivarfs_ops;
4e0e09
 
4e0e09
 #endif /* LIBEFIVAR_LIB_H */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/linux.h b/src/linux.h
4e0e09
index 43a9b7899f5..5ae64ffaacf 100644
4e0e09
--- a/src/linux.h
4e0e09
+++ b/src/linux.h
4e0e09
@@ -22,75 +22,75 @@
4e0e09
 #define _EFIBOOT_LINUX_H
4e0e09
 
4e0e09
 struct acpi_root_info {
4e0e09
-        uint32_t acpi_hid;
4e0e09
-        uint64_t acpi_uid;
4e0e09
-        uint32_t acpi_cid;
4e0e09
-        char *acpi_hid_str;
4e0e09
-        char *acpi_uid_str;
4e0e09
-        char *acpi_cid_str;
4e0e09
+	uint32_t acpi_hid;
4e0e09
+	uint64_t acpi_uid;
4e0e09
+	uint32_t acpi_cid;
4e0e09
+	char *acpi_hid_str;
4e0e09
+	char *acpi_uid_str;
4e0e09
+	char *acpi_cid_str;
4e0e09
 };
4e0e09
 
4e0e09
 struct pci_root_info {
4e0e09
-        uint16_t pci_domain;
4e0e09
-        uint8_t pci_bus;
4e0e09
+	uint16_t pci_domain;
4e0e09
+	uint8_t pci_bus;
4e0e09
 };
4e0e09
 
4e0e09
 struct pci_dev_info {
4e0e09
-        uint16_t pci_domain;
4e0e09
-        uint8_t pci_bus;
4e0e09
-        uint8_t pci_device;
4e0e09
-        uint8_t pci_function;
4e0e09
-        char *driverlink;
4e0e09
+	uint16_t pci_domain;
4e0e09
+	uint8_t pci_bus;
4e0e09
+	uint8_t pci_device;
4e0e09
+	uint8_t pci_function;
4e0e09
+	char *driverlink;
4e0e09
 };
4e0e09
 
4e0e09
 struct scsi_info {
4e0e09
-        uint32_t scsi_bus;
4e0e09
-        uint32_t scsi_device;
4e0e09
-        uint32_t scsi_target;
4e0e09
-        uint64_t scsi_lun;
4e0e09
+	uint32_t scsi_bus;
4e0e09
+	uint32_t scsi_device;
4e0e09
+	uint32_t scsi_target;
4e0e09
+	uint64_t scsi_lun;
4e0e09
 };
4e0e09
 
4e0e09
 struct sas_info {
4e0e09
-        uint32_t scsi_bus;
4e0e09
-        uint32_t scsi_device;
4e0e09
-        uint32_t scsi_target;
4e0e09
-        uint64_t scsi_lun;
4e0e09
+	uint32_t scsi_bus;
4e0e09
+	uint32_t scsi_device;
4e0e09
+	uint32_t scsi_target;
4e0e09
+	uint64_t scsi_lun;
4e0e09
 
4e0e09
-        uint64_t sas_address;
4e0e09
+	uint64_t sas_address;
4e0e09
 };
4e0e09
 
4e0e09
 struct sata_info {
4e0e09
-        uint32_t scsi_bus;
4e0e09
-        uint32_t scsi_device;
4e0e09
-        uint32_t scsi_target;
4e0e09
-        uint64_t scsi_lun;
4e0e09
+	uint32_t scsi_bus;
4e0e09
+	uint32_t scsi_device;
4e0e09
+	uint32_t scsi_target;
4e0e09
+	uint64_t scsi_lun;
4e0e09
 
4e0e09
-        uint32_t ata_devno;
4e0e09
-        uint32_t ata_port;
4e0e09
-        uint32_t ata_pmp;
4e0e09
+	uint32_t ata_devno;
4e0e09
+	uint32_t ata_port;
4e0e09
+	uint32_t ata_pmp;
4e0e09
 
4e0e09
-        uint32_t ata_print_id;
4e0e09
+	uint32_t ata_print_id;
4e0e09
 };
4e0e09
 
4e0e09
 struct ata_info {
4e0e09
-        uint32_t scsi_bus;
4e0e09
-        uint32_t scsi_device;
4e0e09
-        uint32_t scsi_target;
4e0e09
-        uint64_t scsi_lun;
4e0e09
+	uint32_t scsi_bus;
4e0e09
+	uint32_t scsi_device;
4e0e09
+	uint32_t scsi_target;
4e0e09
+	uint64_t scsi_lun;
4e0e09
 
4e0e09
-        uint32_t scsi_host;
4e0e09
+	uint32_t scsi_host;
4e0e09
 };
4e0e09
 
4e0e09
 struct nvme_info {
4e0e09
-        int32_t ctrl_id;
4e0e09
-        int32_t ns_id;
4e0e09
-        int has_eui;
4e0e09
-        uint8_t eui[8];
4e0e09
+	int32_t ctrl_id;
4e0e09
+	int32_t ns_id;
4e0e09
+	int has_eui;
4e0e09
+	uint8_t eui[8];
4e0e09
 };
4e0e09
 
4e0e09
 struct nvdimm_info {
4e0e09
-        efi_guid_t namespace_label;
4e0e09
-        efi_guid_t nvdimm_label;
4e0e09
+	efi_guid_t namespace_label;
4e0e09
+	efi_guid_t nvdimm_label;
4e0e09
 };
4e0e09
 
4e0e09
 struct emmc_info {
4e0e09
@@ -98,58 +98,58 @@ struct emmc_info {
4e0e09
 };
4e0e09
 
4e0e09
 enum interface_type {
4e0e09
-        unknown,
4e0e09
-        isa, acpi_root, pci_root, soc_root, pci, network,
4e0e09
-        ata, atapi, scsi, sata, sas,
4e0e09
-        usb, i1394, fibre, i2o,
4e0e09
-        md, virtblk,
4e0e09
-        nvme, nd_pmem,
4e0e09
-        emmc,
4e0e09
+	unknown,
4e0e09
+	isa, acpi_root, pci_root, soc_root, pci, network,
4e0e09
+	ata, atapi, scsi, sata, sas,
4e0e09
+	usb, i1394, fibre, i2o,
4e0e09
+	md, virtblk,
4e0e09
+	nvme, nd_pmem,
4e0e09
+	emmc,
4e0e09
 };
4e0e09
 
4e0e09
 struct dev_probe;
4e0e09
 
4e0e09
 struct device {
4e0e09
-        enum interface_type interface_type;
4e0e09
-        uint32_t flags;
4e0e09
-        char *link;
4e0e09
-        char *device;
4e0e09
-        char *driver;
4e0e09
-
4e0e09
-        struct dev_probe **probes;
4e0e09
-        unsigned int n_probes;
4e0e09
-
4e0e09
-        union {
4e0e09
-                struct {
4e0e09
-                        struct stat stat;
4e0e09
-
4e0e09
-                        unsigned int controllernum;
4e0e09
-                        unsigned int disknum;
4e0e09
-                        int part;
4e0e09
-                        uint64_t major;
4e0e09
-                        uint32_t minor;
4e0e09
-                        uint32_t edd10_devicenum;
4e0e09
-
4e0e09
-                        char *disk_name;
4e0e09
-                        char *part_name;
4e0e09
-
4e0e09
-                        struct acpi_root_info acpi_root;
4e0e09
-                        struct pci_root_info pci_root;
4e0e09
-                        unsigned int n_pci_devs;
4e0e09
-                        struct pci_dev_info *pci_dev;
4e0e09
-
4e0e09
-                        union {
4e0e09
-                                struct scsi_info scsi_info;
4e0e09
-                                struct sas_info sas_info;
4e0e09
-                                struct sata_info sata_info;
4e0e09
-                                struct ata_info ata_info;
4e0e09
-                                struct nvme_info nvme_info;
4e0e09
-                                struct emmc_info emmc_info;
4e0e09
-                                struct nvdimm_info nvdimm_info;
4e0e09
-                        };
4e0e09
-                };
4e0e09
-                char *ifname;
4e0e09
-        };
4e0e09
+	enum interface_type interface_type;
4e0e09
+	uint32_t flags;
4e0e09
+	char *link;
4e0e09
+	char *device;
4e0e09
+	char *driver;
4e0e09
+
4e0e09
+	struct dev_probe **probes;
4e0e09
+	unsigned int n_probes;
4e0e09
+
4e0e09
+	union {
4e0e09
+		struct {
4e0e09
+			struct stat stat;
4e0e09
+
4e0e09
+			unsigned int controllernum;
4e0e09
+			unsigned int disknum;
4e0e09
+			int part;
4e0e09
+			uint64_t major;
4e0e09
+			uint32_t minor;
4e0e09
+			uint32_t edd10_devicenum;
4e0e09
+
4e0e09
+			char *disk_name;
4e0e09
+			char *part_name;
4e0e09
+
4e0e09
+			struct acpi_root_info acpi_root;
4e0e09
+			struct pci_root_info pci_root;
4e0e09
+			unsigned int n_pci_devs;
4e0e09
+			struct pci_dev_info *pci_dev;
4e0e09
+
4e0e09
+			union {
4e0e09
+				struct scsi_info scsi_info;
4e0e09
+				struct sas_info sas_info;
4e0e09
+				struct sata_info sata_info;
4e0e09
+				struct ata_info ata_info;
4e0e09
+				struct nvme_info nvme_info;
4e0e09
+				struct emmc_info emmc_info;
4e0e09
+				struct nvdimm_info nvdimm_info;
4e0e09
+			};
4e0e09
+		};
4e0e09
+		char *ifname;
4e0e09
+	};
4e0e09
 };
4e0e09
 
4e0e09
 extern struct device HIDDEN *device_get(int fd, int partition);
4e0e09
@@ -160,117 +160,117 @@ extern int HIDDEN set_part_name(struct device *dev, const char * const fmt, ...)
4e0e09
 extern int HIDDEN set_disk_name(struct device *dev, const char * const fmt, ...);
4e0e09
 extern bool HIDDEN is_pata(struct device *dev);
4e0e09
 extern int HIDDEN make_blockdev_path(uint8_t *buf, ssize_t size,
4e0e09
-                                     struct device *dev);
4e0e09
+				     struct device *dev);
4e0e09
 extern int HIDDEN parse_acpi_hid_uid(struct device *dev, const char *fmt, ...);
4e0e09
 extern int HIDDEN eb_nvme_ns_id(int fd, uint32_t *ns_id);
4e0e09
 
4e0e09
 int HIDDEN get_sector_size(int filedes);
4e0e09
 
4e0e09
 extern int HIDDEN find_parent_devpath(const char * const child,
4e0e09
-                                      char **parent);
4e0e09
+				      char **parent);
4e0e09
 
4e0e09
 extern ssize_t HIDDEN make_mac_path(uint8_t *buf, ssize_t size,
4e0e09
-                                    const char * const ifname);
4e0e09
-
4e0e09
-#define read_sysfs_file(buf, fmt, args...)                              \
4e0e09
-        ({                                                              \
4e0e09
-                uint8_t *buf_ = NULL;                                   \
4e0e09
-                ssize_t bufsize_ = -1;                                  \
4e0e09
-                int error_;                                             \
4e0e09
-                                                                        \
4e0e09
-                bufsize_ = get_file(&buf_, "/sys/" fmt, ## args);       \
4e0e09
-                if (bufsize_ > 0) {                                     \
4e0e09
-                        uint8_t *buf2_ = alloca(bufsize_);              \
4e0e09
-                        error_ = errno;                                 \
4e0e09
-                        if (buf2_)                                      \
4e0e09
-                                memcpy(buf2_, buf_, bufsize_);          \
4e0e09
-                        free(buf_);                                     \
4e0e09
-                        *(buf) = (__typeof__(*(buf)))buf2_;             \
4e0e09
-                        errno = error_;                                 \
4e0e09
-                } else if (buf_) {                                      \
4e0e09
-                        /* covscan is _sure_ we leak buf_ if bufsize_ */\
4e0e09
-                        /* is <= 0, which is wrong, but appease it.   */\
4e0e09
-                        free(buf_);                                     \
4e0e09
-                        buf_ = NULL;                                    \
4e0e09
-                }                                                       \
4e0e09
-                bufsize_;                                               \
4e0e09
-        })
4e0e09
-
4e0e09
-#define sysfs_readlink(linkbuf, fmt, args...)                           \
4e0e09
-        ({                                                              \
4e0e09
-                char *_lb = alloca(PATH_MAX+1);                         \
4e0e09
-                char *_pn;                                              \
4e0e09
-                int _rc;                                                \
4e0e09
-                                                                        \
4e0e09
-                *(linkbuf) = NULL;                                      \
4e0e09
-                _rc = asprintfa(&_pn, "/sys/" fmt, ## args);            \
4e0e09
-                if (_rc >= 0) {                                         \
4e0e09
-                        ssize_t _linksz;                                \
4e0e09
-                        _rc = _linksz = readlink(_pn, _lb, PATH_MAX);   \
4e0e09
-                        if (_linksz >= 0)                               \
4e0e09
-                                _lb[_linksz] = '\0';                    \
4e0e09
-                        else                                            \
4e0e09
-                                efi_error("readlink of %s failed", _pn);\
4e0e09
-                        *(linkbuf) = _lb;                               \
4e0e09
-                } else {                                                \
4e0e09
-                        efi_error("could not allocate memory");         \
4e0e09
-                }                                                       \
4e0e09
-                _rc;                                                    \
4e0e09
-        })
4e0e09
-
4e0e09
-#define sysfs_stat(statbuf, fmt, args...)                               \
4e0e09
-        ({                                                              \
4e0e09
-                int rc_;                                                \
4e0e09
-                char *pn_;                                              \
4e0e09
-                                                                        \
4e0e09
-                rc_ = asprintfa(&pn_, "/sys/" fmt, ## args);            \
4e0e09
-                if (rc_ >= 0) {                                         \
4e0e09
-                        rc_ = stat(pn_, statbuf);                       \
4e0e09
-                        if (rc_ < 0)                                    \
4e0e09
-                                efi_error("could not stat %s", pn_);    \
4e0e09
-                } else {                                                \
4e0e09
-                        efi_error("could not allocate memory");         \
4e0e09
-                }                                                       \
4e0e09
-                rc_;                                                    \
4e0e09
-        })
4e0e09
-
4e0e09
-#define sysfs_opendir(fmt, args...)                                     \
4e0e09
-        ({                                                              \
4e0e09
-                int rc_;                                                \
4e0e09
-                char *pn_;                                              \
4e0e09
-                DIR *dir_ = NULL;                                       \
4e0e09
-                                                                        \
4e0e09
-                rc_ = asprintfa(&pn_, "/sys/" fmt, ## args);            \
4e0e09
-                if (rc_ >= 0) {                                         \
4e0e09
-                        dir_ = opendir(pn_);                            \
4e0e09
-                        if (dir_ == NULL)                               \
4e0e09
-                                efi_error("could not open %s", pn_);    \
4e0e09
-                } else {                                                \
4e0e09
-                        efi_error("could not allocate memory");         \
4e0e09
-                }                                                       \
4e0e09
-                dir_;                                                   \
4e0e09
-        })
4e0e09
+				    const char * const ifname);
4e0e09
+
4e0e09
+#define read_sysfs_file(buf, fmt, args...)				\
4e0e09
+	({								\
4e0e09
+		uint8_t *buf_ = NULL;					\
4e0e09
+		ssize_t bufsize_ = -1;					\
4e0e09
+		int error_;						\
4e0e09
+									\
4e0e09
+		bufsize_ = get_file(&buf_, "/sys/" fmt, ## args);	\
4e0e09
+		if (bufsize_ > 0) {					\
4e0e09
+			uint8_t *buf2_ = alloca(bufsize_);		\
4e0e09
+			error_ = errno;					\
4e0e09
+			if (buf2_)					\
4e0e09
+				memcpy(buf2_, buf_, bufsize_);		\
4e0e09
+			free(buf_);					\
4e0e09
+			*(buf) = (__typeof__(*(buf)))buf2_;		\
4e0e09
+			errno = error_;					\
4e0e09
+		} else if (buf_) {					\
4e0e09
+			/* covscan is _sure_ we leak buf_ if bufsize_ */\
4e0e09
+			/* is <= 0, which is wrong, but appease it.   */\
4e0e09
+			free(buf_);					\
4e0e09
+			buf_ = NULL;					\
4e0e09
+		}							\
4e0e09
+		bufsize_;						\
4e0e09
+	})
4e0e09
+
4e0e09
+#define sysfs_readlink(linkbuf, fmt, args...)				\
4e0e09
+	({								\
4e0e09
+		char *_lb = alloca(PATH_MAX+1);				\
4e0e09
+		char *_pn;						\
4e0e09
+		int _rc;						\
4e0e09
+									\
4e0e09
+		*(linkbuf) = NULL;					\
4e0e09
+		_rc = asprintfa(&_pn, "/sys/" fmt, ## args);		\
4e0e09
+		if (_rc >= 0) {						\
4e0e09
+			ssize_t _linksz;				\
4e0e09
+			_rc = _linksz = readlink(_pn, _lb, PATH_MAX);   \
4e0e09
+			if (_linksz >= 0)				\
4e0e09
+				_lb[_linksz] = '\0';			\
4e0e09
+			else						\
4e0e09
+				efi_error("readlink of %s failed", _pn);\
4e0e09
+			*(linkbuf) = _lb;				\
4e0e09
+		} else {						\
4e0e09
+			efi_error("could not allocate memory");		\
4e0e09
+		}							\
4e0e09
+		_rc;							\
4e0e09
+	})
4e0e09
+
4e0e09
+#define sysfs_stat(statbuf, fmt, args...)				\
4e0e09
+	({								\
4e0e09
+		int rc_;						\
4e0e09
+		char *pn_;						\
4e0e09
+									\
4e0e09
+		rc_ = asprintfa(&pn_, "/sys/" fmt, ## args);		\
4e0e09
+		if (rc_ >= 0) {						\
4e0e09
+			rc_ = stat(pn_, statbuf);			\
4e0e09
+			if (rc_ < 0)					\
4e0e09
+				efi_error("could not stat %s", pn_);    \
4e0e09
+		} else {						\
4e0e09
+			efi_error("could not allocate memory");		\
4e0e09
+		}							\
4e0e09
+		rc_;							\
4e0e09
+	})
4e0e09
+
4e0e09
+#define sysfs_opendir(fmt, args...)					\
4e0e09
+	({								\
4e0e09
+		int rc_;						\
4e0e09
+		char *pn_;						\
4e0e09
+		DIR *dir_ = NULL;					\
4e0e09
+									\
4e0e09
+		rc_ = asprintfa(&pn_, "/sys/" fmt, ## args);		\
4e0e09
+		if (rc_ >= 0) {						\
4e0e09
+			dir_ = opendir(pn_);				\
4e0e09
+			if (dir_ == NULL)				\
4e0e09
+				efi_error("could not open %s", pn_);    \
4e0e09
+		} else {						\
4e0e09
+			efi_error("could not allocate memory");		\
4e0e09
+		}							\
4e0e09
+		dir_;							\
4e0e09
+	})
4e0e09
 
4e0e09
 #define DEV_PROVIDES_ROOT       1
4e0e09
-#define DEV_PROVIDES_HD         2
4e0e09
-#define DEV_ABBREV_ONLY         4
4e0e09
+#define DEV_PROVIDES_HD	 2
4e0e09
+#define DEV_ABBREV_ONLY	 4
4e0e09
 
4e0e09
 struct dev_probe {
4e0e09
-        char *name;
4e0e09
-        enum interface_type *iftypes;
4e0e09
-        uint32_t flags;
4e0e09
-        ssize_t (*parse)(struct device *dev,
4e0e09
-                         const char * const current, const char * const root);
4e0e09
-        ssize_t (*create)(struct device *dev,
4e0e09
-                          uint8_t *buf, ssize_t size, ssize_t off);
4e0e09
-        char *(*make_part_name)(struct device *dev);
4e0e09
+	char *name;
4e0e09
+	enum interface_type *iftypes;
4e0e09
+	uint32_t flags;
4e0e09
+	ssize_t (*parse)(struct device *dev,
4e0e09
+			 const char * const current, const char * const root);
4e0e09
+	ssize_t (*create)(struct device *dev,
4e0e09
+			  uint8_t *buf, ssize_t size, ssize_t off);
4e0e09
+	char *(*make_part_name)(struct device *dev);
4e0e09
 };
4e0e09
 
4e0e09
 extern ssize_t parse_scsi_link(const char *current, uint32_t *host,
4e0e09
-                               uint32_t *bus, uint32_t *device,
4e0e09
-                               uint32_t *target, uint64_t *lun,
4e0e09
-                               uint32_t *local_port_id, uint32_t *remote_port_id,
4e0e09
-                               uint32_t *remote_target_id);
4e0e09
+			       uint32_t *bus, uint32_t *device,
4e0e09
+			       uint32_t *target, uint64_t *lun,
4e0e09
+			       uint32_t *local_port_id, uint32_t *remote_port_id,
4e0e09
+			       uint32_t *remote_target_id);
4e0e09
 
4e0e09
 /* device support implementations */
4e0e09
 extern struct dev_probe pmem_parser;
4e0e09
@@ -288,3 +288,5 @@ extern struct dev_probe ata_parser;
4e0e09
 extern struct dev_probe emmc_parser;
4e0e09
 
4e0e09
 #endif /* _EFIBOOT_LINUX_H */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/path-helpers.h b/src/path-helpers.h
4e0e09
index 355f4be56af..7dec05b6297 100644
4e0e09
--- a/src/path-helpers.h
4e0e09
+++ b/src/path-helpers.h
4e0e09
@@ -24,25 +24,26 @@ void HIDDEN fill_spans(const char *str, const char *reject, void *spanbuf);
4e0e09
 unsigned int HIDDEN count_spans(const char *str, const char *reject, unsigned int *chars);
4e0e09
 int HIDDEN find_path_segment(const char *path, int segment, const char **pos, size_t *len);
4e0e09
 
4e0e09
-#define pathseg(path, seg)                                              \
4e0e09
-        ({                                                              \
4e0e09
-                const char *pos_ = NULL;                                \
4e0e09
-                char *ret_ = NULL;                                      \
4e0e09
-                size_t len_ = 0;                                        \
4e0e09
-                int rc_;                                                \
4e0e09
-                                                                        \
4e0e09
-                rc_ = find_path_segment(path, seg, &pos_, &len_);       \
4e0e09
-                if (rc_ >= 0) {                                         \
4e0e09
-                        ret_ = alloca(len_ + 1);                        \
4e0e09
-                        if (ret_) {                                     \
4e0e09
-                                memcpy(ret_, pos_, len_);               \
4e0e09
-                                ret_[len_] = '\0';                      \
4e0e09
-                        }                                               \
4e0e09
-                }                                                       \
4e0e09
-                ret_;                                                   \
4e0e09
-        })
4e0e09
+#define pathseg(path, seg)						\
4e0e09
+	({								\
4e0e09
+		const char *pos_ = NULL;				\
4e0e09
+		char *ret_ = NULL;					\
4e0e09
+		size_t len_ = 0;					\
4e0e09
+		int rc_;						\
4e0e09
+									\
4e0e09
+		rc_ = find_path_segment(path, seg, &pos_, &len_);       \
4e0e09
+		if (rc_ >= 0) {						\
4e0e09
+			ret_ = alloca(len_ + 1);			\
4e0e09
+			if (ret_) {					\
4e0e09
+				memcpy(ret_, pos_, len_);		\
4e0e09
+				ret_[len_] = '\0';			\
4e0e09
+			}						\
4e0e09
+		}							\
4e0e09
+		ret_;							\
4e0e09
+	})
4e0e09
 
4e0e09
 
4e0e09
 
4e0e09
 #endif /* !PATH_HELPER_H_ */
4e0e09
-// vim:fenc=utf-8:tw=75:et
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/ucs2.h b/src/ucs2.h
4e0e09
index fd8b056ad25..176f9ccac57 100644
4e0e09
--- a/src/ucs2.h
4e0e09
+++ b/src/ucs2.h
4e0e09
@@ -180,3 +180,5 @@ utf8_to_ucs2(void *ucs2void, ssize_t size, int terminate, uint8_t *utf8)
4e0e09
 };
4e0e09
 
4e0e09
 #endif /* _EFIVAR_UCS2_H */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
diff --git a/src/util.h b/src/util.h
4e0e09
index ec1c5f1a69a..712abea2d42 100644
4e0e09
--- a/src/util.h
4e0e09
+++ b/src/util.h
4e0e09
@@ -75,322 +75,322 @@
4e0e09
 #endif
4e0e09
 #endif
4e0e09
 #ifndef int_add
4e0e09
-#define int_add(a, b, c) ({                                             \
4e0e09
-                const int _limit = INT_MAX;                             \
4e0e09
-                int _ret;                                               \
4e0e09
-                _ret = _limit - ((unsigned long long)a) >               \
4e0e09
-                          ((unsigned long long)b);                      \
4e0e09
-                if (!_ret)                                              \
4e0e09
-                        *(c) = ((a) + (b));                             \
4e0e09
-                _ret;                                                   \
4e0e09
-        })
4e0e09
+#define int_add(a, b, c) ({					\
4e0e09
+		const int _limit = INT_MAX;			\
4e0e09
+		int _ret;					\
4e0e09
+		_ret = _limit - ((unsigned long long)a) >	\
4e0e09
+			  ((unsigned long long)b);		\
4e0e09
+		if (!_ret)					\
4e0e09
+			*(c) = ((a) + (b));			\
4e0e09
+		_ret;						\
4e0e09
+	})
4e0e09
 #endif
4e0e09
 #ifndef long_add
4e0e09
-#define long_add(a, b, c) ({                                            \
4e0e09
-                const long _limit = LONG_MAX;                           \
4e0e09
-                int _ret;                                               \
4e0e09
-                _ret = _limit - ((unsigned long long)a) >               \
4e0e09
-                           ((unsigned long long)b);                     \
4e0e09
-                if (!_ret)                                              \
4e0e09
-                        *(c) = ((a) + (b));                             \
4e0e09
-                _ret;                                                   \
4e0e09
-        })
4e0e09
+#define long_add(a, b, c) ({					\
4e0e09
+		const long _limit = LONG_MAX;			\
4e0e09
+		int _ret;					\
4e0e09
+		_ret = _limit - ((unsigned long long)a) >	\
4e0e09
+			   ((unsigned long long)b);		\
4e0e09
+		if (!_ret)					\
4e0e09
+			*(c) = ((a) + (b));			\
4e0e09
+		_ret;						\
4e0e09
+	})
4e0e09
 #endif
4e0e09
 #ifndef long_mult
4e0e09
-#define long_mult(a, b, c) ({                                           \
4e0e09
-                const long _limit = LONG_MAX;                           \
4e0e09
-                int _ret = 1;                                           \
4e0e09
-                if ((a) == 0 || (b) == 0)                               \
4e0e09
-                        _ret = 0;                                       \
4e0e09
-                else                                                    \
4e0e09
-                        _ret = _limit / (a) < (b);                      \
4e0e09
-                if (!_ret)                                              \
4e0e09
-                        *(c) = ((a) * (b));                             \
4e0e09
-                _ret;                                                   \
4e0e09
-        })
4e0e09
+#define long_mult(a, b, c) ({					\
4e0e09
+		const long _limit = LONG_MAX;			\
4e0e09
+		int _ret = 1;					\
4e0e09
+		if ((a) == 0 || (b) == 0)			\
4e0e09
+			_ret = 0;				\
4e0e09
+		else						\
4e0e09
+			_ret = _limit / (a) < (b);		\
4e0e09
+		if (!_ret)					\
4e0e09
+			*(c) = ((a) * (b));			\
4e0e09
+		_ret;						\
4e0e09
+	})
4e0e09
 #endif
4e0e09
 #ifndef ulong_add
4e0e09
-#define ulong_add(a, b, c) ({                                           \
4e0e09
-                const unsigned long _limit = ULONG_MAX;                 \
4e0e09
-                int _ret;                                               \
4e0e09
-                _ret = _limit - ((unsigned long long)a) >               \
4e0e09
-                            ((unsigned long long)b);                    \
4e0e09
-                if (!_ret)                                              \
4e0e09
-                        *(c) = ((a) + (b));                             \
4e0e09
-                _ret;                                                   \
4e0e09
-        })
4e0e09
+#define ulong_add(a, b, c) ({					\
4e0e09
+		const unsigned long _limit = ULONG_MAX;		\
4e0e09
+		int _ret;					\
4e0e09
+		_ret = _limit - ((unsigned long long)a) >	\
4e0e09
+			    ((unsigned long long)b);		\
4e0e09
+		if (!_ret)					\
4e0e09
+			*(c) = ((a) + (b));			\
4e0e09
+		_ret;						\
4e0e09
+	})
4e0e09
 #endif
4e0e09
 #ifndef ulong_mult
4e0e09
-#define ulong_mult(a, b, c) ({                                          \
4e0e09
-                const unsigned long _limit = ULONG_MAX;                 \
4e0e09
-                int _ret = 1;                                           \
4e0e09
-                if ((a) == 0 || (b) == 0)                               \
4e0e09
-                        _ret = 0;                                       \
4e0e09
-                else                                                    \
4e0e09
-                        _ret = _limit / (a) < (b);                      \
4e0e09
-                if (!_ret)                                              \
4e0e09
-                        *(c) = ((a) * (b));                             \
4e0e09
-                _ret;                                                   \
4e0e09
-        })
4e0e09
+#define ulong_mult(a, b, c) ({					\
4e0e09
+		const unsigned long _limit = ULONG_MAX;		\
4e0e09
+		int _ret = 1;					\
4e0e09
+		if ((a) == 0 || (b) == 0)			\
4e0e09
+			_ret = 0;				\
4e0e09
+		else						\
4e0e09
+			_ret = _limit / (a) < (b);		\
4e0e09
+		if (!_ret)					\
4e0e09
+			*(c) = ((a) * (b));			\
4e0e09
+		_ret;						\
4e0e09
+	})
4e0e09
 #endif
4e0e09
 
4e0e09
 #if defined(__GNUC__) && defined(__GNUC_MINOR__)
4e0e09
 #if __GNUC__ >= 5 && __GNUC_MINOR__ >= 1
4e0e09
-#define add(a, b, c) _Generic((c),                                      \
4e0e09
-                              int *: int_add(a,b,c),                    \
4e0e09
-                              long *: long_add(a,b,c),                  \
4e0e09
-                              unsigned long *: ulong_add(a,b,c))
4e0e09
-#define mult(a, b, c) _Generic((c),                                     \
4e0e09
-                              long *: long_mult(a,b,c),                 \
4e0e09
-                              unsigned long *: ulong_mult(a,b,c))
4e0e09
+#define add(a, b, c) _Generic((c),				\
4e0e09
+			      int *: int_add(a,b,c),		\
4e0e09
+			      long *: long_add(a,b,c),		\
4e0e09
+			      unsigned long *: ulong_add(a,b,c))
4e0e09
+#define mult(a, b, c) _Generic((c),				\
4e0e09
+			      long *: long_mult(a,b,c),		\
4e0e09
+			      unsigned long *: ulong_mult(a,b,c))
4e0e09
 #endif
4e0e09
 #endif
4e0e09
 
4e0e09
 #ifndef add
4e0e09
-#define add(a, b, c) ({                                                 \
4e0e09
-                (*(c)) = ((a) + (b));                                   \
4e0e09
-                })
4e0e09
+#define add(a, b, c) ({						\
4e0e09
+		(*(c)) = ((a) + (b));				\
4e0e09
+		})
4e0e09
 #endif
4e0e09
 #ifndef mult
4e0e09
-#define mult(a, b, c) ({                                                \
4e0e09
-                (*(c)) = ((a) * (b));                                   \
4e0e09
-                })
4e0e09
+#define mult(a, b, c) ({					\
4e0e09
+		(*(c)) = ((a) * (b));				\
4e0e09
+		})
4e0e09
 #endif
4e0e09
 
4e0e09
 static inline int UNUSED
4e0e09
 read_file(int fd, uint8_t **result, size_t *bufsize)
4e0e09
 {
4e0e09
-        uint8_t *p;
4e0e09
-        size_t size = 4096;
4e0e09
-        size_t filesize = 0;
4e0e09
-        ssize_t s = 0;
4e0e09
-        uint8_t *buf, *newbuf;
4e0e09
+	uint8_t *p;
4e0e09
+	size_t size = 4096;
4e0e09
+	size_t filesize = 0;
4e0e09
+	ssize_t s = 0;
4e0e09
+	uint8_t *buf, *newbuf;
4e0e09
 
4e0e09
-        if (!(newbuf = calloc(size, sizeof (uint8_t)))) {
4e0e09
-                efi_error("could not allocate memory");
4e0e09
-                *result = buf = NULL;
4e0e09
-                *bufsize = 0;
4e0e09
-                return -1;
4e0e09
-        }
4e0e09
-        buf = newbuf;
4e0e09
+	if (!(newbuf = calloc(size, sizeof (uint8_t)))) {
4e0e09
+		efi_error("could not allocate memory");
4e0e09
+		*result = buf = NULL;
4e0e09
+		*bufsize = 0;
4e0e09
+		return -1;
4e0e09
+	}
4e0e09
+	buf = newbuf;
4e0e09
 
4e0e09
-        do {
4e0e09
-                p = buf + filesize;
4e0e09
-                /* size - filesize shouldn't exceed SSIZE_MAX because we're
4e0e09
-                 * only allocating 4096 bytes at a time and we're checking that
4e0e09
-                 * before doing so. */
4e0e09
-                s = read(fd, p, size - filesize);
4e0e09
-                if (s < 0 && errno == EAGAIN) {
4e0e09
-                        /*
4e0e09
-                         * if we got EAGAIN, there's a good chance we've hit
4e0e09
-                         * the kernel rate limiter.  Doing more reads is just
4e0e09
-                         * going to make it worse, so instead, give it a rest.
4e0e09
-                         */
4e0e09
-                        sched_yield();
4e0e09
-                        continue;
4e0e09
-                } else if (s < 0) {
4e0e09
-                        int saved_errno = errno;
4e0e09
-                        free(buf);
4e0e09
-                        *result = buf = NULL;
4e0e09
-                        *bufsize = 0;
4e0e09
-                        errno = saved_errno;
4e0e09
-                        efi_error("could not read from file");
4e0e09
-                        return -1;
4e0e09
-                }
4e0e09
-                filesize += s;
4e0e09
-                /* only exit for empty reads */
4e0e09
-                if (s == 0)
4e0e09
-                        break;
4e0e09
-                if (filesize >= size) {
4e0e09
-                        /* See if we're going to overrun and return an error
4e0e09
-                         * instead. */
4e0e09
-                        if (size > (size_t)-1 - 4096) {
4e0e09
-                                free(buf);
4e0e09
-                                *result = buf = NULL;
4e0e09
-                                *bufsize = 0;
4e0e09
-                                errno = ENOMEM;
4e0e09
-                                efi_error("could not read from file");
4e0e09
-                                return -1;
4e0e09
-                        }
4e0e09
-                        newbuf = realloc(buf, size + 4096);
4e0e09
-                        if (newbuf == NULL) {
4e0e09
-                                int saved_errno = errno;
4e0e09
-                                free(buf);
4e0e09
-                                *result = buf = NULL;
4e0e09
-                                *bufsize = 0;
4e0e09
-                                errno = saved_errno;
4e0e09
-                                efi_error("could not allocate memory");
4e0e09
-                                return -1;
4e0e09
-                        }
4e0e09
-                        buf = newbuf;
4e0e09
-                        memset(buf + size, '\0', 4096);
4e0e09
-                        size += 4096;
4e0e09
-                }
4e0e09
-        } while (1);
4e0e09
+	do {
4e0e09
+		p = buf + filesize;
4e0e09
+		/* size - filesize shouldn't exceed SSIZE_MAX because we're
4e0e09
+		 * only allocating 4096 bytes at a time and we're checking that
4e0e09
+		 * before doing so. */
4e0e09
+		s = read(fd, p, size - filesize);
4e0e09
+		if (s < 0 && errno == EAGAIN) {
4e0e09
+			/*
4e0e09
+			 * if we got EAGAIN, there's a good chance we've hit
4e0e09
+			 * the kernel rate limiter.  Doing more reads is just
4e0e09
+			 * going to make it worse, so instead, give it a rest.
4e0e09
+			 */
4e0e09
+			sched_yield();
4e0e09
+			continue;
4e0e09
+		} else if (s < 0) {
4e0e09
+			int saved_errno = errno;
4e0e09
+			free(buf);
4e0e09
+			*result = buf = NULL;
4e0e09
+			*bufsize = 0;
4e0e09
+			errno = saved_errno;
4e0e09
+			efi_error("could not read from file");
4e0e09
+			return -1;
4e0e09
+		}
4e0e09
+		filesize += s;
4e0e09
+		/* only exit for empty reads */
4e0e09
+		if (s == 0)
4e0e09
+			break;
4e0e09
+		if (filesize >= size) {
4e0e09
+			/* See if we're going to overrun and return an error
4e0e09
+			 * instead. */
4e0e09
+			if (size > (size_t)-1 - 4096) {
4e0e09
+				free(buf);
4e0e09
+				*result = buf = NULL;
4e0e09
+				*bufsize = 0;
4e0e09
+				errno = ENOMEM;
4e0e09
+				efi_error("could not read from file");
4e0e09
+				return -1;
4e0e09
+			}
4e0e09
+			newbuf = realloc(buf, size + 4096);
4e0e09
+			if (newbuf == NULL) {
4e0e09
+				int saved_errno = errno;
4e0e09
+				free(buf);
4e0e09
+				*result = buf = NULL;
4e0e09
+				*bufsize = 0;
4e0e09
+				errno = saved_errno;
4e0e09
+				efi_error("could not allocate memory");
4e0e09
+				return -1;
4e0e09
+			}
4e0e09
+			buf = newbuf;
4e0e09
+			memset(buf + size, '\0', 4096);
4e0e09
+			size += 4096;
4e0e09
+		}
4e0e09
+	} while (1);
4e0e09
 
4e0e09
-        newbuf = realloc(buf, filesize+1);
4e0e09
-        if (!newbuf) {
4e0e09
-                free(buf);
4e0e09
-                *result = buf = NULL;
4e0e09
-                efi_error("could not allocate memory");
4e0e09
-                return -1;
4e0e09
-        }
4e0e09
-        newbuf[filesize] = '\0';
4e0e09
-        *result = newbuf;
4e0e09
-        *bufsize = filesize+1;
4e0e09
-        return 0;
4e0e09
+	newbuf = realloc(buf, filesize+1);
4e0e09
+	if (!newbuf) {
4e0e09
+		free(buf);
4e0e09
+		*result = buf = NULL;
4e0e09
+		efi_error("could not allocate memory");
4e0e09
+		return -1;
4e0e09
+	}
4e0e09
+	newbuf[filesize] = '\0';
4e0e09
+	*result = newbuf;
4e0e09
+	*bufsize = filesize+1;
4e0e09
+	return 0;
4e0e09
 }
4e0e09
 
4e0e09
 static inline uint64_t UNUSED
4e0e09
 lcm(uint64_t x, uint64_t y)
4e0e09
 {
4e0e09
-        uint64_t m = x, n = y, o;
4e0e09
-        while ((o = m % n)) {
4e0e09
-                m = n;
4e0e09
-                n = o;
4e0e09
-        }
4e0e09
-        return (x / n) * y;
4e0e09
+	uint64_t m = x, n = y, o;
4e0e09
+	while ((o = m % n)) {
4e0e09
+		m = n;
4e0e09
+		n = o;
4e0e09
+	}
4e0e09
+	return (x / n) * y;
4e0e09
 }
4e0e09
 
4e0e09
 #ifndef strdupa
4e0e09
-#define strdupa(s)                                                      \
4e0e09
-       (__extension__ ({                                                \
4e0e09
-                const char *__in = (s);                                 \
4e0e09
-                size_t __len = strlen (__in);                           \
4e0e09
-                char *__out = (char *) alloca (__len + 1);              \
4e0e09
-                strcpy(__out, __in);                                    \
4e0e09
-                __out;                                                  \
4e0e09
-        }))
4e0e09
+#define strdupa(s)						      \
4e0e09
+       (__extension__ ({						\
4e0e09
+		const char *__in = (s);				 \
4e0e09
+		size_t __len = strlen (__in);			   \
4e0e09
+		char *__out = (char *) alloca (__len + 1);	      \
4e0e09
+		strcpy(__out, __in);				    \
4e0e09
+		__out;						  \
4e0e09
+	}))
4e0e09
 #endif
4e0e09
 
4e0e09
 #ifndef strndupa
4e0e09
-#define strndupa(s, l)                                                  \
4e0e09
-       (__extension__ ({                                                \
4e0e09
-                const char *__in = (s);                                 \
4e0e09
-                size_t __len = strnlen (__in, (l));                     \
4e0e09
-                char *__out = (char *) alloca (__len + 1);              \
4e0e09
-                strncpy(__out, __in, __len);                            \
4e0e09
-                __out[__len] = '\0';                                    \
4e0e09
-                __out;                                                  \
4e0e09
-        }))
4e0e09
+#define strndupa(s, l)						  \
4e0e09
+       (__extension__ ({						\
4e0e09
+		const char *__in = (s);				 \
4e0e09
+		size_t __len = strnlen (__in, (l));		     \
4e0e09
+		char *__out = (char *) alloca (__len + 1);	      \
4e0e09
+		strncpy(__out, __in, __len);			    \
4e0e09
+		__out[__len] = '\0';				    \
4e0e09
+		__out;						  \
4e0e09
+	}))
4e0e09
 #endif
4e0e09
 
4e0e09
-#define asprintfa(str, fmt, args...)                                    \
4e0e09
-        ({                                                              \
4e0e09
-                char *_tmp = NULL;                                      \
4e0e09
-                int _rc;                                                \
4e0e09
-                *(str) = NULL;                                          \
4e0e09
-                _rc = asprintf((str), (fmt), ## args);                  \
4e0e09
-                if (_rc > 0) {                                          \
4e0e09
-                        _tmp = strdupa(*(str));                         \
4e0e09
-                        if (!_tmp) {                                    \
4e0e09
-                                _rc = -1;                               \
4e0e09
-                        } else {                                        \
4e0e09
-                                free(*(str));                           \
4e0e09
-                                *(str) = _tmp;                          \
4e0e09
-                        }                                               \
4e0e09
-                } else {                                                \
4e0e09
-                        _rc = -1;                                       \
4e0e09
-                }                                                       \
4e0e09
-                _rc;                                                    \
4e0e09
-        })
4e0e09
+#define asprintfa(str, fmt, args...)				    \
4e0e09
+	({							      \
4e0e09
+		char *_tmp = NULL;				      \
4e0e09
+		int _rc;						\
4e0e09
+		*(str) = NULL;					  \
4e0e09
+		_rc = asprintf((str), (fmt), ## args);		  \
4e0e09
+		if (_rc > 0) {					  \
4e0e09
+			_tmp = strdupa(*(str));			 \
4e0e09
+			if (!_tmp) {				    \
4e0e09
+				_rc = -1;			       \
4e0e09
+			} else {					\
4e0e09
+				free(*(str));			   \
4e0e09
+				*(str) = _tmp;			  \
4e0e09
+			}					       \
4e0e09
+		} else {						\
4e0e09
+			_rc = -1;				       \
4e0e09
+		}						       \
4e0e09
+		_rc;						    \
4e0e09
+	})
4e0e09
 
4e0e09
-#define vasprintfa(str, fmt, ap)                                        \
4e0e09
-        ({                                                              \
4e0e09
-                char *_tmp = NULL;                                      \
4e0e09
-                int _rc;                                                \
4e0e09
-                *(str) = NULL;                                          \
4e0e09
-                _rc = vasprintf((str), (fmt), (ap));                    \
4e0e09
-                if (_rc > 0) {                                          \
4e0e09
-                        _tmp = strdupa(*(str));                         \
4e0e09
-                        if (!_tmp) {                                    \
4e0e09
-                                _rc = -1;                               \
4e0e09
-                        } else {                                        \
4e0e09
-                                free(*(str));                           \
4e0e09
-                                *(str) = _tmp;                          \
4e0e09
-                        }                                               \
4e0e09
-                } else {                                                \
4e0e09
-                        _rc = -1;                                       \
4e0e09
-                }                                                       \
4e0e09
-                _rc;                                                    \
4e0e09
-        })
4e0e09
+#define vasprintfa(str, fmt, ap)					\
4e0e09
+	({							      \
4e0e09
+		char *_tmp = NULL;				      \
4e0e09
+		int _rc;						\
4e0e09
+		*(str) = NULL;					  \
4e0e09
+		_rc = vasprintf((str), (fmt), (ap));		    \
4e0e09
+		if (_rc > 0) {					  \
4e0e09
+			_tmp = strdupa(*(str));			 \
4e0e09
+			if (!_tmp) {				    \
4e0e09
+				_rc = -1;			       \
4e0e09
+			} else {					\
4e0e09
+				free(*(str));			   \
4e0e09
+				*(str) = _tmp;			  \
4e0e09
+			}					       \
4e0e09
+		} else {						\
4e0e09
+			_rc = -1;				       \
4e0e09
+		}						       \
4e0e09
+		_rc;						    \
4e0e09
+	})
4e0e09
 
4e0e09
 static inline ssize_t
4e0e09
 get_file(uint8_t **result, const char * const fmt, ...)
4e0e09
 {
4e0e09
-        char *path;
4e0e09
-        uint8_t *buf = NULL;
4e0e09
-        size_t bufsize = 0;
4e0e09
-        ssize_t rc;
4e0e09
-        va_list ap;
4e0e09
-        int error;
4e0e09
-        int fd;
4e0e09
+	char *path;
4e0e09
+	uint8_t *buf = NULL;
4e0e09
+	size_t bufsize = 0;
4e0e09
+	ssize_t rc;
4e0e09
+	va_list ap;
4e0e09
+	int error;
4e0e09
+	int fd;
4e0e09
 
4e0e09
-        if (result == NULL) {
4e0e09
-                efi_error("invalid parameter 'result'");
4e0e09
-                return -1;
4e0e09
-        }
4e0e09
+	if (result == NULL) {
4e0e09
+		efi_error("invalid parameter 'result'");
4e0e09
+		return -1;
4e0e09
+	}
4e0e09
 
4e0e09
-        va_start(ap, fmt);
4e0e09
-        rc = vasprintfa(&path, fmt, ap);
4e0e09
-        va_end(ap);
4e0e09
-        if (rc < 0) {
4e0e09
-                efi_error("could not allocate memory");
4e0e09
-                return -1;
4e0e09
-        }
4e0e09
+	va_start(ap, fmt);
4e0e09
+	rc = vasprintfa(&path, fmt, ap);
4e0e09
+	va_end(ap);
4e0e09
+	if (rc < 0) {
4e0e09
+		efi_error("could not allocate memory");
4e0e09
+		return -1;
4e0e09
+	}
4e0e09
 
4e0e09
-        fd = open(path, O_RDONLY);
4e0e09
-        if (fd < 0) {
4e0e09
-                efi_error("could not open file \"%s\" for reading",
4e0e09
-                          path);
4e0e09
-                return -1;
4e0e09
-        }
4e0e09
+	fd = open(path, O_RDONLY);
4e0e09
+	if (fd < 0) {
4e0e09
+		efi_error("could not open file \"%s\" for reading",
4e0e09
+			  path);
4e0e09
+		return -1;
4e0e09
+	}
4e0e09
 
4e0e09
-        rc = read_file(fd, &buf, &bufsize);
4e0e09
-        error = errno;
4e0e09
-        close(fd);
4e0e09
-        errno = error;
4e0e09
+	rc = read_file(fd, &buf, &bufsize);
4e0e09
+	error = errno;
4e0e09
+	close(fd);
4e0e09
+	errno = error;
4e0e09
 
4e0e09
-        if (rc < 0 || bufsize < 1) {
4e0e09
-                /*
4e0e09
-                 * I don't think this can happen, but I can't convince
4e0e09
-                 * cov-scan
4e0e09
-                 */
4e0e09
-                if (buf)
4e0e09
-                        free(buf);
4e0e09
-                *result = NULL;
4e0e09
-                efi_error("could not read file \"%s\"", path);
4e0e09
-                return -1;
4e0e09
-        }
4e0e09
+	if (rc < 0 || bufsize < 1) {
4e0e09
+		/*
4e0e09
+		 * I don't think this can happen, but I can't convince
4e0e09
+		 * cov-scan
4e0e09
+		 */
4e0e09
+		if (buf)
4e0e09
+			free(buf);
4e0e09
+		*result = NULL;
4e0e09
+		efi_error("could not read file \"%s\"", path);
4e0e09
+		return -1;
4e0e09
+	}
4e0e09
 
4e0e09
-        *result = buf;
4e0e09
-        return bufsize;
4e0e09
+	*result = buf;
4e0e09
+	return bufsize;
4e0e09
 }
4e0e09
 
4e0e09
 static inline void UNUSED
4e0e09
 swizzle_guid_to_uuid(efi_guid_t *guid)
4e0e09
 {
4e0e09
-        uint32_t *u32;
4e0e09
-        uint16_t *u16;
4e0e09
+	uint32_t *u32;
4e0e09
+	uint16_t *u16;
4e0e09
 
4e0e09
-        u32 = (uint32_t *)guid;
4e0e09
-        u32[0] = __builtin_bswap32(u32[0]);
4e0e09
-        u16 = (uint16_t *)&u32[1];
4e0e09
-        u16[0] = __builtin_bswap16(u16[0]);
4e0e09
-        u16[1] = __builtin_bswap16(u16[1]);
4e0e09
+	u32 = (uint32_t *)guid;
4e0e09
+	u32[0] = __builtin_bswap32(u32[0]);
4e0e09
+	u16 = (uint16_t *)&u32[1];
4e0e09
+	u16[0] = __builtin_bswap16(u16[0]);
4e0e09
+	u16[1] = __builtin_bswap16(u16[1]);
4e0e09
 }
4e0e09
 
4e0e09
-#define log_(file, line, func, level, fmt, args...)                     \
4e0e09
-        ({                                                              \
4e0e09
-                efi_set_loglevel(level);                                \
4e0e09
-                FILE *logfile_ = efi_get_logfile();                     \
4e0e09
-                int len_ = strlen(fmt);                                 \
4e0e09
-                fprintf(logfile_, "%s:%d %s(): ",                       \
4e0e09
-                        file, line, func);                              \
4e0e09
-                fprintf(logfile_, fmt, ## args);                        \
4e0e09
-                if (!len_ || fmt[len_ - 1] != '\n')                     \
4e0e09
-                        fprintf(logfile_, "\n");                        \
4e0e09
-        })
4e0e09
+#define log_(file, line, func, level, fmt, args...)			\
4e0e09
+	({								\
4e0e09
+		efi_set_loglevel(level);				\
4e0e09
+		FILE *logfile_ = efi_get_logfile();			\
4e0e09
+		int len_ = strlen(fmt);					\
4e0e09
+		fprintf(logfile_, "%s:%d %s(): ",			\
4e0e09
+			file, line, func);				\
4e0e09
+		fprintf(logfile_, fmt, ## args);			\
4e0e09
+		if (!len_ || fmt[len_ - 1] != '\n')			\
4e0e09
+			fprintf(logfile_, "\n");			\
4e0e09
+	})
4e0e09
 
4e0e09
 #define LOG_VERBOSE 0
4e0e09
 #define LOG_DEBUG 1
4e0e09
@@ -399,14 +399,16 @@ swizzle_guid_to_uuid(efi_guid_t *guid)
4e0e09
 #endif
4e0e09
 #define log(level, fmt, args...) log_(__FILE__, __LINE__, __func__, level, fmt, ## args)
4e0e09
 #define debug(fmt, args...) log(LOG_DEBUG, fmt, ## args)
4e0e09
-#define log_hex_(file, line, func, level, buf, size)                    \
4e0e09
-        ({                                                              \
4e0e09
-                efi_set_loglevel(level);                                \
4e0e09
-                fhexdumpf(efi_get_logfile(), "%s:%d %s(): ",            \
4e0e09
-                          (uint8_t *)buf, size,                         \
4e0e09
-                          file, line, func);                            \
4e0e09
-        })
4e0e09
+#define log_hex_(file, line, func, level, buf, size)			\
4e0e09
+	({								\
4e0e09
+		efi_set_loglevel(level);				\
4e0e09
+		fhexdumpf(efi_get_logfile(), "%s:%d %s(): ",		\
4e0e09
+			  (uint8_t *)buf, size,				\
4e0e09
+			  file, line, func);				\
4e0e09
+	})
4e0e09
 #define log_hex(level, buf, size) log_hex_(__FILE__, __LINE__, __func__, level, buf, size)
4e0e09
 #define debug_hex(buf, size) log_hex(LOG_DEBUG, buf, size)
4e0e09
 
4e0e09
 #endif /* EFIVAR_UTIL_H */
4e0e09
+
4e0e09
+// vim:fenc=utf-8:tw=75:noet
4e0e09
-- 
4e0e09
2.26.2
4e0e09