Refine some call back function to return EFI_UNSUPPORTED for all unsupported call back type.

Signed-off-by:  ydong10
Reviewed-by: lgao4


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11686 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10 2011-05-20 02:48:59 +00:00
parent 4fdb97fa6e
commit 083f7c69c1
4 changed files with 395 additions and 389 deletions

View File

@ -680,15 +680,8 @@ IScsiFormCallback (
EFI_STATUS Status;
EFI_INPUT_KEY Key;
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {
//
// Do nothing for UEFI OPEN/CLOSE Action
//
return EFI_SUCCESS;
}
if (Action == EFI_BROWSER_ACTION_CHANGING) {
Private = ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK (This);
//
// Retrive uncommitted data from Browser
//
@ -698,7 +691,6 @@ IScsiFormCallback (
FreePool (IfrNvData);
return EFI_NOT_FOUND;
}
Status = EFI_SUCCESS;
switch (QuestionId) {
@ -928,7 +920,14 @@ IScsiFormCallback (
}
FreePool (IfrNvData);
return Status;
}
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}
/**

View File

@ -1,7 +1,7 @@
/** @file
Helper functions for configuring or getting the parameters relating to Ip4.
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
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
@ -692,13 +692,7 @@ Ip4FormCallback (
EFI_STATUS Status;
EFI_INPUT_KEY Key;
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {
//
// Do nothing for UEFI OPEN/CLOSE Action
//
return EFI_SUCCESS;
}
if (Action == EFI_BROWSER_ACTION_CHANGING) {
Ip4ConfigInstance = IP4_CONFIG_INSTANCE_FROM_CONFIG_ACCESS (This);
IfrFormNvData = AllocateZeroPool (sizeof (IP4_CONFIG_IFR_NVDATA));
@ -762,6 +756,12 @@ Ip4FormCallback (
FreePool (IfrFormNvData);
return Status;
}
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}
/**

View File

@ -1,7 +1,7 @@
/** @file
HII Config Access protocol implementation of VLAN configuration module.
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
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The full
@ -254,6 +254,7 @@ VlanCallback (
return EFI_SUCCESS;
}
if (Action == EFI_BROWSER_ACTION_CHANGING) {
//
// Get Browser data
//
@ -325,6 +326,12 @@ VlanCallback (
HiiSetBrowserData (&mVlanFormSetGuid, mVlanStorageName, sizeof (VLAN_CONFIGURATION), (UINT8 *) Configuration, NULL);
FreePool (Configuration);
return EFI_SUCCESS;
}
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}

View File

@ -13,7 +13,7 @@
4. It save all the mapping info in NV variables which will be consumed
by platform override protocol driver to publish the platform override protocol.
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
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
@ -1335,13 +1335,7 @@ PlatOverMngrCallback (
EFI_INPUT_KEY Key;
PLAT_OVER_MNGR_DATA *FakeNvData;
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {
//
// Do nothing for UEFI OPEN/CLOSE Action
//
return EFI_SUCCESS;
}
if (Action == EFI_BROWSER_ACTION_CHANGING) {
Private = EFI_CALLBACK_INFO_FROM_THIS (This);
FakeNvData = &Private->FakeNvData;
if (!HiiGetBrowserData (&mPlatformOverridesManagerGuid, mVariableName, sizeof (PLAT_OVER_MNGR_DATA), (UINT8 *) FakeNvData)) {
@ -1410,6 +1404,12 @@ PlatOverMngrCallback (
HiiSetBrowserData (&mPlatformOverridesManagerGuid, mVariableName, sizeof (PLAT_OVER_MNGR_DATA), (UINT8 *) FakeNvData, NULL);
return EFI_SUCCESS;
}
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}
/**