MdeModulePkg/UefiBootManagerLib: fix AddLoadOptionVariable docs/prototype

Clean up the leading comment and the prototype of
EfiBootManagerAddLoadOptionVariable():

- the function may modify Option on output, annotate the parameter with
  OUT and update the documentation;

- "@retval EFI_STATUS" and "@retval Others" are not idiomatic
  documentation, use @return instead;

- sync comment and prototype between lib instance and lib class header.

Change-Id: I8a609d6502b6f8929b2f568acaa147065003b6f4
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
Ruiyu Ni 2018-04-20 16:21:32 +08:00
parent 656d2539be
commit 8b5c80e029
2 changed files with 26 additions and 12 deletions

View File

@ -176,19 +176,29 @@ EfiBootManagerLoadOptionToVariable (
);
/**
This function will update the Boot####/Driver####/SysPrep#### and the
BootOrder/DriverOrder/SysPrepOrder to add a new load option.
This function will register the new Boot####, Driver#### or SysPrep#### option.
After the *#### is updated, the *Order will also be updated.
@param Option Pointer to load option to add.
@param Position Position of the new load option to put in the BootOrder/DriverOrder/SysPrepOrder.
@param Option Pointer to load option to add. If on input
Option->OptionNumber is LoadOptionNumberUnassigned,
then on output Option->OptionNumber is updated to
the number of the new Boot####,
Driver#### or SysPrep#### option.
@param Position Position of the new load option to put in the ****Order variable.
@retval EFI_SUCCESS The *#### have been successfully registered.
@retval EFI_INVALID_PARAMETER The option number exceeds 0xFFFF.
@retval EFI_ALREADY_STARTED The option number of Option is being used already.
Note: this API only adds new load option, no replacement support.
@retval EFI_OUT_OF_RESOURCES There is no free option number that can be used when the
option number specified in the Option is LoadOptionNumberUnassigned.
@return Status codes of gRT->SetVariable ().
@retval EFI_SUCCESS The load option has been successfully added.
@retval Others Error status returned by RT->SetVariable.
**/
EFI_STATUS
EFIAPI
EfiBootManagerAddLoadOptionVariable (
IN EFI_BOOT_MANAGER_LOAD_OPTION *Option,
IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option,
IN UINTN Position
);

View File

@ -329,7 +329,11 @@ BmAddOptionNumberToOrderVariable (
This function will register the new Boot####, Driver#### or SysPrep#### option.
After the *#### is updated, the *Order will also be updated.
@param Option Pointer to load option to add.
@param Option Pointer to load option to add. If on input
Option->OptionNumber is LoadOptionNumberUnassigned,
then on output Option->OptionNumber is updated to
the number of the new Boot####,
Driver#### or SysPrep#### option.
@param Position Position of the new load option to put in the ****Order variable.
@retval EFI_SUCCESS The *#### have been successfully registered.
@ -338,13 +342,13 @@ BmAddOptionNumberToOrderVariable (
Note: this API only adds new load option, no replacement support.
@retval EFI_OUT_OF_RESOURCES There is no free option number that can be used when the
option number specified in the Option is LoadOptionNumberUnassigned.
@retval EFI_STATUS Return the status of gRT->SetVariable ().
@return Status codes of gRT->SetVariable ().
**/
EFI_STATUS
EFIAPI
EfiBootManagerAddLoadOptionVariable (
IN EFI_BOOT_MANAGER_LOAD_OPTION *Option,
IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option,
IN UINTN Position
)
{