mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
327f4e7d26
commit
c62a593c90
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ EFI_STATUS
|
|||
;
|
||||
|
||||
/**
|
||||
Return the current video mode information.
|
||||
Set the current video mode information.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param HorizontalResolution Current video horizontal resolution in pixels
|
||||
|
|
Loading…
Reference in New Issue