From 1f2e80af229d06a59d99a7882ab1872ba72e0654 Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Fri, 4 Mar 2016 16:34:43 +0800 Subject: MdeModulePkg/UefiBootManagerLib: Separate boot description functions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Siyuan Fu --- .../Library/UefiBootManagerLib/InternalBm.h | 69 ++++++++-------------- 1 file changed, 25 insertions(+), 44 deletions(-) (limited to 'MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h') diff --git a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h index cfaeefe181..c1514c3ee4 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h +++ b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h @@ -166,28 +166,6 @@ typedef struct { #define BM_HOTKEY_FROM_LINK(a) CR (a, BM_HOTKEY, Link, BM_HOTKEY_SIGNATURE) -/** - Get the image file buffer data and buffer size by its device path. - - @param FilePath On input, a pointer to an allocated buffer containing the device - path of the file. - On output the pointer could be NULL when the function fails to - load the boot option, or could point to an allocated buffer containing - the device path of the file. - It could be updated by either short-form device path expanding, - or default boot file path appending. - Caller is responsible to free it when it's non-NULL. - @param FileSize A pointer to the size of the file buffer. - - @retval NULL File is NULL, or FileSize is NULL. Or, the file can't be found. - @retval other The file buffer. The caller is responsible to free the memory. -**/ -VOID * -BmLoadEfiBootOption ( - IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath, - OUT UINTN *FileSize - ); - /** Get the Option Number that wasn't used. @@ -221,28 +199,6 @@ BmWriteBootToOsPerformanceData ( IN VOID *Context ); - -/** - Get the headers (dos, image, optional header) from an image - - @param Device SimpleFileSystem device handle - @param FileName File name for the image - @param DosHeader Pointer to dos header - @param Hdr The buffer in which to return the PE32, PE32+, or TE header. - - @retval EFI_SUCCESS Successfully get the machine type. - @retval EFI_NOT_FOUND The file is not found. - @retval EFI_LOAD_ERROR File is not a valid image file. - -**/ -EFI_STATUS -BmGetImageHeader ( - IN EFI_HANDLE Device, - IN CHAR16 *FileName, - OUT EFI_IMAGE_DOS_HEADER *DosHeader, - OUT EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr - ); - /** This routine adjust the memory information for different memory type and save them into the variables for next boot. It resets the system when @@ -472,4 +428,29 @@ BmGetFileBufferFromLoadFileFileSystem ( OUT EFI_DEVICE_PATH_PROTOCOL **FullPath, OUT UINTN *FileSize ); + +/** + Return the boot description for the controller. + + @param Handle Controller handle. + + @return The description string. +**/ +CHAR16 * +BmGetBootDescription ( + IN EFI_HANDLE Handle + ); + +/** + Enumerate all boot option descriptions and append " 2"/" 3"/... to make + unique description. + + @param BootOptions Array of boot options. + @param BootOptionCount Count of boot options. +**/ +VOID +BmMakeBootOptionDescriptionUnique ( + EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions, + UINTN BootOptionCount + ); #endif // _INTERNAL_BM_H_ -- cgit v1.2.3