aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-07-03 11:41:24 +0100
committerMatt Fleming <matt.fleming@intel.com>2013-07-03 12:12:18 +0100
commitb63e0f20f7f6717eaca978a0c499b953949c6dd2 (patch)
treed20ec0405d610538881a7d665315c57d71012c7a
parentd44ea657666e3a34d3859fc7262185e24c0b40fe (diff)
downloadsyslinux-b63e0f20f7f6717eaca978a0c499b953949c6dd2.tar.gz
syslinux-b63e0f20f7f6717eaca978a0c499b953949c6dd2.tar.xz
syslinux-b63e0f20f7f6717eaca978a0c499b953949c6dd2.zip
efi: update derivative info on boot
Various bits of Syslinux use the filesystem type of the derivative info structure to figure out how we were booted. Update this for SYSLINUX and PXELINUX. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--efi/derivative.c15
-rw-r--r--efi/efi.h3
-rw-r--r--efi/main.c5
3 files changed, 14 insertions, 9 deletions
diff --git a/efi/derivative.c b/efi/derivative.c
index 4391d4c5..ca43b98b 100644
--- a/efi/derivative.c
+++ b/efi/derivative.c
@@ -1,10 +1,3 @@
-/*
- * We don't have separate boot loader derivatives under EFI, rather,
- * the derivative info reflects the capabilities of the machine. For
- * instance, if we have the PXE Base Code Protocol, then we support
- * PXELINUX, if we have the Disk I/O Protocol, we support SYSLINUX,
- * etc.
- */
#include <syslinux/config.h>
/*
@@ -14,7 +7,13 @@
struct syslinux_ipinfo IPInfo;
uint16_t APIVer; /* PXE API version found */
+static enum syslinux_filesystem __filesystem;
+
+void efi_derivative(enum syslinux_filesystem fs)
+{
+ __filesystem = fs;
+}
__export void get_derivative_info(union syslinux_derivative_info *di)
{
- di->disk.filesystem = SYSLINUX_FS_SYSLINUX;
+ di->disk.filesystem = __filesystem;
}
diff --git a/efi/efi.h b/efi/efi.h
index 9bb0e20c..72d08e10 100644
--- a/efi/efi.h
+++ b/efi/efi.h
@@ -1,6 +1,7 @@
#ifndef _SYSLINUX_EFI_H
#define _SYSLINUX_EFI_H
+#include <syslinux/config.h>
#include <core.h>
#include <sys/types.h> /* needed for off_t */
//#include <syslinux/version.h> /* avoid redefinition of __STDC_VERSION__ */
@@ -61,4 +62,6 @@ efi_setup_event(EFI_EVENT *ev, EFI_EVENT_NOTIFY func, void *ctx)
return status;
}
+extern void efi_derivative(enum syslinux_filesystem fs);
+
#endif /* _SYSLINUX_EFI_H */
diff --git a/efi/main.c b/efi/main.c
index 757cf327..f21b66ec 100644
--- a/efi/main.c
+++ b/efi/main.c
@@ -1202,9 +1202,12 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *table)
goto out;
}
+ efi_derivative(SYSLINUX_FS_SYSLINUX);
ops[0] = &vfat_fs_ops;
- } else
+ } else {
+ efi_derivative(SYSLINUX_FS_PXELINUX);
ops[0] = &pxe_fs_ops;
+ }
/* setup timer for boot menu system support */
status = setup_default_timer(&timer_ev);