From 5deb67f22507481cf5cb8f991976a9969fa90a22 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Fri, 23 Jul 2010 17:22:25 -0700 Subject: Make LoadKernel() pass back the kernel partition's UniqueGuid. LoadKernel already returns the partition number for the selected kernel. This change makes it also return the GPT Entry's UniqueGuid, which will eventually be passed to the kernel itself, so the kernel can determine which of several possible devices it has booted from. It doesn't know for certain because the BIOS and the kernel may enumerate the devices in a different order. BUG=chromium-os:4984 Review URL: http://codereview.chromium.org/3056014 --- utility/load_kernel_test.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'utility/load_kernel_test.c') diff --git a/utility/load_kernel_test.c b/utility/load_kernel_test.c index c391c61c..4ac9330b 100644 --- a/utility/load_kernel_test.c +++ b/utility/load_kernel_test.c @@ -135,6 +135,25 @@ int main(int argc, char* argv[]) { printf("Partition number: %" PRIu64 "\n", lkp.partition_number); printf("Bootloader address: %" PRIu64 "\n", lkp.bootloader_address); printf("Bootloader size: %" PRIu64 "\n", lkp.bootloader_size); + printf("Partition guid: " + "%02x%02x%02x%02x-%02x%02x-%02x%02x" + "-%02x%02x-%02x%02x%02x%02x%02x%02x\n", + lkp.partition_guid[3], + lkp.partition_guid[2], + lkp.partition_guid[1], + lkp.partition_guid[0], + lkp.partition_guid[5], + lkp.partition_guid[4], + lkp.partition_guid[7], + lkp.partition_guid[6], + lkp.partition_guid[8], + lkp.partition_guid[9], + lkp.partition_guid[10], + lkp.partition_guid[11], + lkp.partition_guid[12], + lkp.partition_guid[13], + lkp.partition_guid[14], + lkp.partition_guid[15]); } fclose(image_file); -- cgit v1.2.1