]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Bds/BootMenu.c
Do not create boot option for logical block io device.
[mirror_edk2.git] / ArmPlatformPkg / Bds / BootMenu.c
index 1c923e902e8e5681de0898f9ac358e04b71a608a..62e7927defd6cc8eb291667f57b192520e619519 100644 (file)
@@ -215,7 +215,7 @@ BootMenuAddBootOption (
 \r
     BootArguments->LinuxArguments.CmdLineSize = CmdLineSize;\r
     BootArguments->LinuxArguments.InitrdSize = InitrdSize;\r
-    CopyMem ((VOID*)(&BootArguments->LinuxArguments + 1), CmdLine, CmdLineSize);\r
+    CopyMem ((VOID*)(&BootArguments->LinuxArguments + 1), AsciiCmdLine, CmdLineSize);\r
     CopyMem ((VOID*)((UINTN)(&BootArguments->LinuxArguments + 1) + CmdLineSize), InitrdPath, InitrdSize);\r
 \r
     OptionalData = (UINT8*)BootArguments;\r
@@ -782,7 +782,9 @@ BootMenuMain (
                   GetAlignedDevicePath ((EFI_DEVICE_PATH*)((UINTN)(&OptionalData->Arguments.LinuxArguments + 1) + CmdLineSize)), TRUE, TRUE);\r
               Print(L"\t- Initrd: %s\n", DevicePathTxt);\r
             }\r
-            Print(L"\t- Arguments: %a\n", (&OptionalData->Arguments.LinuxArguments + 1));\r
+            if (ReadUnaligned16 (&OptionalData->Arguments.LinuxArguments.CmdLineSize) > 0) {\r
+              Print(L"\t- Arguments: %a\n", (&OptionalData->Arguments.LinuxArguments + 1));\r
+            }\r
           }\r
 \r
           switch (LoaderType) {\r