Revert "Capsule-on-Disk entire Patch
This reverts commit0d4aa276d1
,6470a43160
,fd72860895
,7837d12498
,6b32af2e10
,8636f70b5a
,f17935321a
due to incorrect review process. Cc: Wei6 Xu <wei6.xu@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Zhang, Chao B <chao.b.zhang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
@@ -23,8 +23,6 @@
|
||||
#include <Guid/GlobalVariable.h>
|
||||
#include <Guid/Gpt.h>
|
||||
|
||||
#define MAX_CAPSULE_NUM 10
|
||||
|
||||
EFI_GUID mCapsuleOnDiskBootOptionGuid = { 0x4CC29BB7, 0x2413, 0x40A2, { 0xB0, 0x6D, 0x25, 0x3E, 0x37, 0x10, 0xF5, 0x32 } };
|
||||
|
||||
/**
|
||||
@@ -746,41 +744,6 @@ SetCapsuleStatusVariable (
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
Check if Capsule On Disk is supported.
|
||||
|
||||
@retval TRUE Capsule On Disk is supported.
|
||||
@retval FALSE Capsule On Disk is not supported.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
IsCapsuleOnDiskSupported (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINT64 OsIndicationsSupported;
|
||||
UINTN DataSize;
|
||||
|
||||
DataSize = sizeof(UINT64);
|
||||
Status = gRT->GetVariable (
|
||||
L"OsIndicationsSupported",
|
||||
&gEfiGlobalVariableGuid,
|
||||
NULL,
|
||||
&DataSize,
|
||||
&OsIndicationsSupported
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (OsIndicationsSupported & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
Process Capsule On Disk.
|
||||
|
||||
@@ -807,16 +770,6 @@ ProcessCapsuleOnDisk (
|
||||
UINT16 BootNext;
|
||||
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Fs;
|
||||
BOOLEAN UpdateBootNext;
|
||||
CHAR16 *FileName[MAX_CAPSULE_NUM];
|
||||
UINTN Index;
|
||||
|
||||
//
|
||||
// Check if Capsule On Disk is supported
|
||||
//
|
||||
if (!IsCapsuleOnDiskSupported ()) {
|
||||
Print (L"CapsuleApp: Capsule On Disk is not supported.\n");
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Get a valid file system from boot path
|
||||
@@ -829,17 +782,10 @@ ProcessCapsuleOnDisk (
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Get file name from file path
|
||||
//
|
||||
for (Index = 0; Index < CapsuleNum; Index ++) {
|
||||
FileName[Index] = GetFileNameFromPath (FilePath[Index]);
|
||||
}
|
||||
|
||||
//
|
||||
// Copy capsule image to '\efi\UpdateCapsule\'
|
||||
//
|
||||
Status = WriteUpdateFile (CapsuleBuffer, CapsuleBufferSize, FileName, CapsuleNum, Fs);
|
||||
Status = WriteUpdateFile (CapsuleBuffer, CapsuleBufferSize, FilePath, CapsuleNum, Fs);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Print (L"CapsuleApp: capsule image could not be copied for update.\n");
|
||||
return Status;
|
||||
|
Reference in New Issue
Block a user