Follow PI1.2c spec, check empty string and return EFI_INVALID_PARAMETER.
Clean up comment according to PI1.2c spec. signed-off-by: jyao1 reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12690 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Save the S3 data to S3 boot script.
|
Save the S3 data to S3 boot script.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions
|
are licensed and made available under the terms and conditions
|
||||||
@ -1754,9 +1754,15 @@ S3BootScriptLabel (
|
|||||||
EFI_BOOT_SCRIPT_TABLE_HEADER TableHeader;
|
EFI_BOOT_SCRIPT_TABLE_HEADER TableHeader;
|
||||||
UINT32 LabelLength;
|
UINT32 LabelLength;
|
||||||
//
|
//
|
||||||
// Assume Label is not NULL
|
// Check NULL Label
|
||||||
//
|
//
|
||||||
if (Label == NULL) {
|
if (Label == NULL) {
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// Check empty Label
|
||||||
|
//
|
||||||
|
if (Label[0] == '\0') {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation for S3 Boot Script Saver state driver.
|
Implementation for S3 Boot Script Saver state driver.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions
|
are licensed and made available under the terms and conditions
|
||||||
@ -827,7 +827,8 @@ BootScriptInsert (
|
|||||||
@param Label Points to the label which will be inserted in the boot script table.
|
@param Label Points to the label which will be inserted in the boot script table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The label already exists or was inserted.
|
@retval EFI_SUCCESS The label already exists or was inserted.
|
||||||
@retval EFI_INVALID_PARAMETER The Opcode is an invalid opcode value or the Position is not a valid position in the boot script table..
|
@retval EFI_INVALID_PARAMETER The Label is NULL or points to an empty string.
|
||||||
|
@retval EFI_INVALID_PARAMETER The Position is not a valid position in the boot script table.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -856,6 +857,7 @@ BootScriptLabel (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS The operation succeeded.
|
@retval EFI_SUCCESS The operation succeeded.
|
||||||
@retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table.
|
@retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table.
|
||||||
|
@retval EFI_INVALID_PARAMETER The RelativePosition is NULL.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation for S3 SMM Boot Script Saver state driver.
|
Implementation for S3 SMM Boot Script Saver state driver.
|
||||||
|
|
||||||
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions
|
are licensed and made available under the terms and conditions
|
||||||
@ -825,7 +825,8 @@ BootScriptInsert (
|
|||||||
@param Label Points to the label which will be inserted in the boot script table.
|
@param Label Points to the label which will be inserted in the boot script table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The label already exists or was inserted.
|
@retval EFI_SUCCESS The label already exists or was inserted.
|
||||||
@retval EFI_INVALID_PARAMETER The Opcode is an invalid opcode value or the Position is not a valid position in the boot script table..
|
@retval EFI_INVALID_PARAMETER The Label is NULL or points to an empty string.
|
||||||
|
@retval EFI_INVALID_PARAMETER The Position is not a valid position in the boot script table.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -854,6 +855,7 @@ BootScriptLabel (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS The operation succeeded.
|
@retval EFI_SUCCESS The operation succeeded.
|
||||||
@retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table.
|
@retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table.
|
||||||
|
@retval EFI_INVALID_PARAMETER The RelativePosition is NULL.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
to be replayed during an S3 resume.
|
to be replayed during an S3 resume.
|
||||||
This protocol is not required for all platforms.
|
This protocol is not required for all platforms.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -125,7 +125,7 @@ EFI_STATUS
|
|||||||
|
|
||||||
@retval EFI_SUCCESS The label already exists or was inserted.
|
@retval EFI_SUCCESS The label already exists or was inserted.
|
||||||
@retval EFI_NOT_FOUND The label did not already exist and CreateifNotFound was FALSE.
|
@retval EFI_NOT_FOUND The label did not already exist and CreateifNotFound was FALSE.
|
||||||
@retval EFI_INVALID_PARAMETER The Opcode is an invalid opcode value.
|
@retval EFI_INVALID_PARAMETER The Label is NULL or points to an empty string.
|
||||||
@retval EFI_INVALID_PARAMETER The Position is not a valid position in the boot script table.
|
@retval EFI_INVALID_PARAMETER The Position is not a valid position in the boot script table.
|
||||||
@retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
|
@retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
|
||||||
**/
|
**/
|
||||||
@ -151,8 +151,9 @@ EFI_STATUS
|
|||||||
@param[in] Position2 The positions in the boot script table to compare.
|
@param[in] Position2 The positions in the boot script table to compare.
|
||||||
@param[out] RelativePosition On return, points to the result of the comparison.
|
@param[out] RelativePosition On return, points to the result of the comparison.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The label already exists or was inserted.
|
@retval EFI_SUCCESS The operation succeeded.
|
||||||
@retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table.
|
@retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table.
|
||||||
|
@retval EFI_INVALID_PARAMETER The RelativePosition is NULL.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
Reference in New Issue
Block a user