diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-10-19 01:30:24 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-10-19 01:30:24 +0000 |
commit | ccee6099223bb2d05e7fcacaab285a9cb7331ad7 (patch) | |
tree | 377ac0956e2bf4117681c52875db4c6dce810c20 /MdeModulePkg/Universal/DriverSampleDxe | |
parent | ab00035d0a7c2431d310aa799363317621bf1237 (diff) | |
download | edk2-platforms-ccee6099223bb2d05e7fcacaab285a9cb7331ad7.tar.xz |
Add the example for default opcode usage.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9343 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DriverSampleDxe')
-rw-r--r-- | MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c | 5 | ||||
-rw-r--r-- | MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index 02264c7f8c..f74ae3e959 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -839,7 +839,7 @@ DriverSampleInit ( //
// Initialize driver private data
//
- PrivateData = AllocatePool (sizeof (DRIVER_SAMPLE_PRIVATE_DATA));
+ PrivateData = AllocateZeroPool (sizeof (DRIVER_SAMPLE_PRIVATE_DATA));
if (PrivateData == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -1048,6 +1048,7 @@ DriverSampleUnload ( &PrivateData->ConfigAccess,
NULL
);
+ DriverHandle[0] = NULL;
}
if (DriverHandle[1] != NULL) {
@@ -1057,6 +1058,7 @@ DriverSampleUnload ( &mHiiVendorDevicePath1,
NULL
);
+ DriverHandle[1] = NULL;
}
if (PrivateData->HiiHandle[0] != NULL) {
@@ -1069,6 +1071,7 @@ DriverSampleUnload ( if (PrivateData != NULL) {
FreePool (PrivateData);
+ PrivateData = NULL;
}
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index 71a4c91057..e8aae2b4d1 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -153,6 +153,7 @@ formset oneof varid = MyIfrNVData.BootOrderLarge,
prompt = STRING_TOKEN(STR_ONE_OF_PROMPT),
help = STRING_TOKEN(STR_ONE_OF_HELP),
+ default value = cond (questionref(MyOneOf) == 0x0 ? 0 : 1),
option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0x0, flags = 0;
option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 0x1, flags = DEFAULT;
endoneof;
|