summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-20 01:33:42 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-20 01:33:42 +0000
commitd88f86f154ddbe39355fcf0aca03438f219b2660 (patch)
treef5443c8c2c011d77eddb53d28a13125f52ae331c /IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
parentd664f8a25c2966326a5e153516395dd1925be806 (diff)
downloadedk2-platforms-d88f86f154ddbe39355fcf0aca03438f219b2660.tar.xz
Refine all R9 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@11681 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c69
1 files changed, 34 insertions, 35 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
index 40d93c5ae0..1857ffa0a1 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
@@ -141,37 +141,36 @@ DeviceManagerCallback (
)
{
UINTN CurIndex;
+
+ if (Action == EFI_BROWSER_ACTION_CHANGING) {
+ if ((Value == NULL) || (ActionRequest == NULL)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ gCallbackKey = QuestionId;
+ if ((QuestionId < MAX_KEY_SECTION_LEN + NETWORK_DEVICE_LIST_KEY_OFFSET) && (QuestionId >= NETWORK_DEVICE_LIST_KEY_OFFSET)) {
+ //
+ // If user select the mac address, need to record mac address string to support next form show.
+ //
+ for (CurIndex = 0; CurIndex < mMacDeviceList.CurListLen; CurIndex ++) {
+ if (mMacDeviceList.NodeList[CurIndex].QuestionId == QuestionId) {
+ mSelectedMacAddrString = HiiGetString (gDeviceManagerPrivate.HiiHandle, mMacDeviceList.NodeList[CurIndex].PromptId, NULL);
+ }
+ }
+ }
- if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {
//
- // Do nothing for UEFI OPEN/CLOSE Action
+ // Request to exit SendForm(), so as to switch to selected form
//
- return EFI_SUCCESS;
- }
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
- if ((Value == NULL) || (ActionRequest == NULL)) {
- return EFI_INVALID_PARAMETER;
+ return EFI_SUCCESS;
}
- gCallbackKey = QuestionId;
-
- if ((QuestionId < MAX_KEY_SECTION_LEN + NETWORK_DEVICE_LIST_KEY_OFFSET) && (QuestionId >= NETWORK_DEVICE_LIST_KEY_OFFSET)) {
- //
- // If user select the mac address, need to record mac address string to support next form show.
- //
- for (CurIndex = 0; CurIndex < mMacDeviceList.CurListLen; CurIndex ++) {
- if (mMacDeviceList.NodeList[CurIndex].QuestionId == QuestionId) {
- mSelectedMacAddrString = HiiGetString (gDeviceManagerPrivate.HiiHandle, mMacDeviceList.NodeList[CurIndex].PromptId, NULL);
- }
- }
- }
-
//
- // Request to exit SendForm(), so as to switch to selected form
+ // All other action return unsupported.
//
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
-
- return EFI_SUCCESS;
+ return EFI_UNSUPPORTED;
}
/**
@@ -1109,25 +1108,25 @@ DriverHealthCallback (
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
)
{
- if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {
+ if (Action == EFI_BROWSER_ACTION_CHANGING) {
+ if ((Value == NULL) || (ActionRequest == NULL)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ gCallbackKey = QuestionId;
+
//
- // Do nothing for UEFI OPEN/CLOSE Action
+ // Request to exit SendForm(), so as to switch to selected form
//
- return EFI_SUCCESS;
- }
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
- if ((Value == NULL) || (ActionRequest == NULL)) {
- return EFI_INVALID_PARAMETER;
+ return EFI_SUCCESS;
}
- gCallbackKey = QuestionId;
-
//
- // Request to exit SendForm(), so as to switch to selected form
+ // All other action return unsupported.
//
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
-
- return EFI_SUCCESS;
+ return EFI_UNSUPPORTED;
}
/**