summaryrefslogtreecommitdiff
path: root/fallback.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2013-04-30 14:21:41 -0400
committerPeter Jones <pjones@redhat.com>2013-04-30 14:21:41 -0400
commit4f80140b53ba290f3fb2dd4cf9af4637b28f24ed (patch)
tree9eff8e4f45a2e7cea529023e3dafb5da401933c4 /fallback.c
parent39baf6dff76ac3ab16d8831144a382f1ea6e9085 (diff)
downloadefi-boot-shim-4f80140b53ba290f3fb2dd4cf9af4637b28f24ed.tar.gz
efi-boot-shim-4f80140b53ba290f3fb2dd4cf9af4637b28f24ed.zip
Explain byte order handling better.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'fallback.c')
-rw-r--r--fallback.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fallback.c b/fallback.c
index d3179b6c..dab3d3dc 100644
--- a/fallback.c
+++ b/fallback.c
@@ -365,9 +365,13 @@ try_boot_csv(EFI_FILE_HANDLE fh, CHAR16 *dirname, CHAR16 *filename)
#endif
CHAR16 *start = buffer;
- /* If I create boot.csv with the efi shell's "edit" command,
- * it starts with 0xfeff. I assume there's some reason for this,
- * but it doesn't matter much to me...
+ /* The file may or may not start with the Unicode byte order marker.
+ * Sadness ensues. Since UEFI is defined as LE, I'm going to decree
+ * that these files must also be LE.
+ *
+ * IT IS THUS SO.
+ *
+ * But if we find the LE byte order marker, just skip it.
*/
if (*start == 0xfeff)
start++;