summaryrefslogtreecommitdiff
path: root/src/boot/efi/stub.c
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-08-01 13:02:32 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2015-08-01 13:02:32 +0200
commit5fd56512f6dafa50adc03548e61c221f383e635e (patch)
treece5f40367e3dd1122ab0cb045080b4f1d3b3fb79 /src/boot/efi/stub.c
parent7035cd9e226bce7909e1365039431a4d21e21045 (diff)
downloadsystemd-5fd56512f6dafa50adc03548e61c221f383e635e.tar.gz
Imported Upstream version 224
Diffstat (limited to 'src/boot/efi/stub.c')
-rw-r--r--src/boot/efi/stub.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
index 0b1bc491ed..0c5ee4e9ff 100644
--- a/src/boot/efi/stub.c
+++ b/src/boot/efi/stub.c
@@ -18,6 +18,7 @@
#include "util.h"
#include "pefile.h"
+#include "disk.h"
#include "graphics.h"
#include "splash.h"
#include "linux.h"
@@ -46,6 +47,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
UINTN szs[ELEMENTSOF(sections)-1] = {};
CHAR8 *cmdline = NULL;
UINTN cmdline_len;
+ CHAR16 uuid[37];
EFI_STATUS err;
InitializeLib(image, sys_table);
@@ -99,6 +101,10 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
cmdline = line;
}
+ /* export the device path this image is started from */
+ if (disk_get_part_uuid(loaded_image->DeviceHandle, uuid) == EFI_SUCCESS)
+ efivar_set(L"LoaderDevicePartUUID", uuid, FALSE);
+
if (szs[3] > 0)
graphics_splash((UINT8 *)((UINTN)loaded_image->ImageBase + addrs[3]), szs[3], NULL);