diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-29 02:57:38 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-29 02:57:38 +0000 |
commit | c62a593c903d92cf3e1330fb84170e32bad5b646 (patch) | |
tree | daa33a249e9da30128052342e6d2e99976609cec /MdeModulePkg/Universal/Console | |
parent | 327f4e7d260aafc76b0857ec34144e8c2eb07a92 (diff) | |
download | edk2-c62a593c903d92cf3e1330fb84170e32bad5b646.zip edk2-c62a593c903d92cf3e1330fb84170e32bad5b646.tar.gz edk2-c62a593c903d92cf3e1330fb84170e32bad5b646.tar.bz2 |
1. Fixed one bug in ConPlatform.c, add NULL judgment.
2. Fixed one type in UgaDraw.h.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3976 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console')
-rw-r--r-- | MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c index 61ed14b..e4f7e18 100644 --- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c +++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c @@ -41,9 +41,9 @@ EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding = { /**
The user Entry Point for module ConPlatform. The user code starts with this function.
- @param[in] ImageHandle The firmware allocated handle for the EFI image.
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.
@param[in] SystemTable A pointer to the EFI System Table.
-
+
@retval EFI_SUCCESS The entry point is executed successfully.
@retval other Some error occurs when executing this entry point.
@@ -739,8 +739,7 @@ Returns: --*/
{
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
- EFI_DEVICE_PATH_PROTOCOL *TempDevicePath1;
- EFI_DEVICE_PATH_PROTOCOL *TempDevicePath2;
+ EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;
EFI_DEVICE_PATH_PROTOCOL *DevicePathInst;
UINTN Size;
@@ -753,7 +752,7 @@ Returns: //
// if performing Delete operation, the NewDevicePath must not be NULL.
//
- TempDevicePath1 = NULL;
+ TempDevicePath = NULL;
DevicePath = Multi;
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
@@ -769,14 +768,10 @@ Returns: }
} else {
if (Delete) {
- TempDevicePath2 = AppendDevicePathInstance (
- TempDevicePath1,
+ TempDevicePath = AppendDevicePathInstance (
+ NULL,
DevicePathInst
);
- if (TempDevicePath1 != NULL) {
- FreePool (TempDevicePath1);
- }
- TempDevicePath1 = TempDevicePath2;
}
}
@@ -785,7 +780,7 @@ Returns: }
if (Delete) {
- *NewDevicePath = TempDevicePath1;
+ *NewDevicePath = TempDevicePath;
return EFI_SUCCESS;
}
@@ -878,15 +873,17 @@ Returns: return Status;
}
- Status = gRT->SetVariable (
- VariableName,
- &gEfiGlobalVariableGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
- GetDevicePathSize (NewVariableDevicePath),
- NewVariableDevicePath
- );
+ if (NewVariableDevicePath != NULL) {
+ Status = gRT->SetVariable (
+ VariableName,
+ &gEfiGlobalVariableGuid,
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+ GetDevicePathSize (NewVariableDevicePath),
+ NewVariableDevicePath
+ );
- FreePool (NewVariableDevicePath);
+ FreePool (NewVariableDevicePath);
+ }
return Status;
}
|