mirror of https://github.com/acidanthera/audk.git
Update to NOT to use EFI_BROWSER_ACTION_FORM_OPEN in Callback function thus able to function properly in UEFI2.1 platform.
Signed-off-by: tye Reviewed-by: lgao4 Reviewed-by: xdu2 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12197 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
83f1f16a83
commit
9ea13d7900
|
@ -1,7 +1,7 @@
|
||||||
///** @file
|
///** @file
|
||||||
// VLAN configuration formset.
|
// VLAN configuration formset.
|
||||||
//
|
//
|
||||||
// Copyright (c) 2009, 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
|
// are licensed and made available under the terms and conditions
|
||||||
// of the BSD License which accompanies this distribution. The full
|
// of the BSD License which accompanies this distribution. The full
|
||||||
|
@ -26,6 +26,17 @@ formset
|
||||||
name = VlanNvData,
|
name = VlanNvData,
|
||||||
guid = VLAN_CONFIG_PRIVATE_GUID;
|
guid = VLAN_CONFIG_PRIVATE_GUID;
|
||||||
|
|
||||||
|
form formid = VLAN_HEAD_FORM_ID,
|
||||||
|
title = STRING_TOKEN(STR_VLAN_FORM_TITLE);
|
||||||
|
|
||||||
|
goto VLAN_CONFIGURATION_FORM_ID,
|
||||||
|
prompt = STRING_TOKEN (STR_GET_CURRENT_SETTING),
|
||||||
|
help = STRING_TOKEN (STR_GET_CURRENT_SETTING_HELP),
|
||||||
|
flags = INTERACTIVE,
|
||||||
|
key = VLAN_UPDATE_QUESTION_ID;
|
||||||
|
|
||||||
|
endform;
|
||||||
|
|
||||||
form formid = VLAN_CONFIGURATION_FORM_ID,
|
form formid = VLAN_CONFIGURATION_FORM_ID,
|
||||||
title = STRING_TOKEN(STR_VLAN_FORM_TITLE);
|
title = STRING_TOKEN(STR_VLAN_FORM_TITLE);
|
||||||
|
|
||||||
|
|
|
@ -236,21 +236,7 @@ VlanCallback (
|
||||||
|
|
||||||
PrivateData = VLAN_CONFIG_PRIVATE_DATA_FROM_THIS (This);
|
PrivateData = VLAN_CONFIG_PRIVATE_DATA_FROM_THIS (This);
|
||||||
|
|
||||||
if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
|
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {
|
||||||
if (QuestionId == VLAN_ADD_QUESTION_ID) {
|
|
||||||
//
|
|
||||||
// Update current VLAN list into Form when Form is opened.
|
|
||||||
// This will be done only in FORM_OPEN CallBack of question with VLAN_ADD_QUESTION_ID.
|
|
||||||
//
|
|
||||||
VlanUpdateForm (PrivateData);
|
|
||||||
}
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Action == EFI_BROWSER_ACTION_FORM_CLOSE) {
|
|
||||||
//
|
|
||||||
// Do nothing for UEFI FORM_CLOSE action
|
|
||||||
//
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,6 +305,13 @@ VlanCallback (
|
||||||
ZeroMem (Configuration->VlanList, MAX_VLAN_NUMBER);
|
ZeroMem (Configuration->VlanList, MAX_VLAN_NUMBER);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VLAN_UPDATE_QUESTION_ID:
|
||||||
|
//
|
||||||
|
// Update current VLAN list into Form.
|
||||||
|
//
|
||||||
|
VlanUpdateForm (PrivateData);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Header file for NV data structure definition.
|
Header file for NV data structure definition.
|
||||||
|
|
||||||
Copyright (c) 2009, 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
|
are licensed and made available under the terms and conditions
|
||||||
of the BSD License which accompanies this distribution. The full
|
of the BSD License which accompanies this distribution. The full
|
||||||
|
@ -26,9 +26,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
#define VLAN_CONFIGURATION_VARSTORE_ID 0x0001
|
#define VLAN_CONFIGURATION_VARSTORE_ID 0x0001
|
||||||
#define VLAN_CONFIGURATION_FORM_ID 0x0001
|
#define VLAN_CONFIGURATION_FORM_ID 0x0001
|
||||||
|
#define VLAN_HEAD_FORM_ID 0x0002
|
||||||
|
|
||||||
#define VLAN_ADD_QUESTION_ID 0x1000
|
#define VLAN_ADD_QUESTION_ID 0x1000
|
||||||
#define VLAN_REMOVE_QUESTION_ID 0x2000
|
#define VLAN_REMOVE_QUESTION_ID 0x2000
|
||||||
|
#define VLAN_UPDATE_QUESTION_ID 0x3000
|
||||||
|
|
||||||
#define LABEL_VLAN_LIST 0x0001
|
#define LABEL_VLAN_LIST 0x0001
|
||||||
#define LABEL_END 0xffff
|
#define LABEL_END 0xffff
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue