mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 04:42:00 +00:00
[BOOTLIB]:
- Fix a regression - Add a few more flags - Don't look for BCD in "Microsoft" directory svn path=/trunk/; revision=69451
This commit is contained in:
parent
b25523b5e3
commit
10dbbf573b
|
@ -196,7 +196,7 @@ BmFwInitializeBootDirectoryPath (
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save the boot directory */
|
/* Save the boot directory */
|
||||||
BootDirectory = L"\\EFI\\Microsoft\\Boot";
|
BootDirectory = L"\\EFI\\Boot"; /* Should be EFI\\ReactOS\\Boot */
|
||||||
|
|
||||||
Quickie:
|
Quickie:
|
||||||
/* Free all the allocations we made */
|
/* Free all the allocations we made */
|
||||||
|
@ -560,7 +560,6 @@ BmOpenDataStore (
|
||||||
|
|
||||||
/* Otherwise, compute the hardcoded path of the BCD */
|
/* Otherwise, compute the hardcoded path of the BCD */
|
||||||
Status = BmpFwGetFullPath(L"\\BCD", &FullPath);
|
Status = BmpFwGetFullPath(L"\\BCD", &FullPath);
|
||||||
EfiPrintf(L"Status: %lx %s\r\n", Status, FullPath);
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* User the raw path */
|
/* User the raw path */
|
||||||
|
@ -686,7 +685,7 @@ BmMain (
|
||||||
PBL_RETURN_ARGUMENTS ReturnArguments;
|
PBL_RETURN_ARGUMENTS ReturnArguments;
|
||||||
BOOLEAN RebootOnError;
|
BOOLEAN RebootOnError;
|
||||||
PGUID AppIdentifier;
|
PGUID AppIdentifier;
|
||||||
HANDLE BcdHandle;
|
// HANDLE BcdHandle;
|
||||||
|
|
||||||
EfiPrintf(L"ReactOS UEFI Boot Manager Initializing...\n");
|
EfiPrintf(L"ReactOS UEFI Boot Manager Initializing...\n");
|
||||||
|
|
||||||
|
@ -734,8 +733,8 @@ BmMain (
|
||||||
BmFwInitializeBootDirectoryPath();
|
BmFwInitializeBootDirectoryPath();
|
||||||
|
|
||||||
/* Load and initialize the boot configuration database (BCD) */
|
/* Load and initialize the boot configuration database (BCD) */
|
||||||
Status = BmOpenDataStore(&BcdHandle);
|
//Status = BmOpenDataStore(&BcdHandle);
|
||||||
EfiPrintf(L"BCD Open: %lx\r\n", Status);
|
//EfiPrintf(L"BCD Open: %lx\r\n", Status);
|
||||||
|
|
||||||
/* do more stuff!! */
|
/* do more stuff!! */
|
||||||
EfiPrintf(L"We are A-OK!\r\n");
|
EfiPrintf(L"We are A-OK!\r\n");
|
||||||
|
|
|
@ -94,6 +94,9 @@
|
||||||
#define BL_DIRECTORY_ACCESS 0x04
|
#define BL_DIRECTORY_ACCESS 0x04
|
||||||
#define BL_UNKNOWN_ACCESS 0x10
|
#define BL_UNKNOWN_ACCESS 0x10
|
||||||
|
|
||||||
|
#define BL_DEVICE_READ_ACCESS 0x01
|
||||||
|
#define BL_DEVICE_WRITE_ACCESS 0x02
|
||||||
|
|
||||||
#define BL_DEVICE_ENTRY_OPENED 0x01
|
#define BL_DEVICE_ENTRY_OPENED 0x01
|
||||||
#define BL_DEVICE_ENTRY_READ_ACCESS 0x02
|
#define BL_DEVICE_ENTRY_READ_ACCESS 0x02
|
||||||
#define BL_DEVICE_ENTRY_WRITE_ACCESS 0x04
|
#define BL_DEVICE_ENTRY_WRITE_ACCESS 0x04
|
||||||
|
@ -226,6 +229,7 @@ typedef enum _BL_MEMORY_TYPE
|
||||||
BlLoaderReferencePage = 0xD0000007,
|
BlLoaderReferencePage = 0xD0000007,
|
||||||
BlLoaderRamDisk = 0xD0000008,
|
BlLoaderRamDisk = 0xD0000008,
|
||||||
BlLoaderData = 0xD000000A,
|
BlLoaderData = 0xD000000A,
|
||||||
|
BlLoaderRegistry = 0xD000000B,
|
||||||
BlLoaderBlockMemory = 0xD000000C,
|
BlLoaderBlockMemory = 0xD000000C,
|
||||||
BlLoaderSelfMap = 0xD000000F,
|
BlLoaderSelfMap = 0xD000000F,
|
||||||
|
|
||||||
|
@ -1639,6 +1643,21 @@ BlDeviceReadAtOffset (
|
||||||
_Out_ PULONG BytesRead
|
_Out_ PULONG BytesRead
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* IMAGE ROUTINES ************************************************************/
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
BlImgLoadImageWithProgress2 (
|
||||||
|
_In_ ULONG DeviceId,
|
||||||
|
_In_ BL_MEMORY_TYPE MemoryType,
|
||||||
|
_In_ PWCHAR FileName,
|
||||||
|
_Inout_ PVOID* MappedBase,
|
||||||
|
_Inout_ PULONG MappedSize,
|
||||||
|
_In_ ULONG ImageFlags,
|
||||||
|
_In_ BOOLEAN ShowProgress,
|
||||||
|
_Out_opt_ PUCHAR* HashBuffer,
|
||||||
|
_Out_opt_ PULONG HashSize
|
||||||
|
);
|
||||||
|
|
||||||
/* FILE I/O ROUTINES *********************************************************/
|
/* FILE I/O ROUTINES *********************************************************/
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
|
|
@ -1914,8 +1914,8 @@ BlpDeviceOpen (
|
||||||
goto Quickie;
|
goto Quickie;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for unsupported flags */
|
/* Make sure both read and write access are set */
|
||||||
if (!(Flags & 3))
|
if (!(Flags & (BL_DEVICE_READ_ACCESS | BL_DEVICE_WRITE_ACCESS)))
|
||||||
{
|
{
|
||||||
/* Bail out */
|
/* Bail out */
|
||||||
Status = STATUS_INVALID_PARAMETER;
|
Status = STATUS_INVALID_PARAMETER;
|
||||||
|
@ -1982,7 +1982,9 @@ BlpDeviceOpen (
|
||||||
/* Fill it out */
|
/* Fill it out */
|
||||||
RtlZeroMemory(DeviceEntry, sizeof(*DeviceEntry));
|
RtlZeroMemory(DeviceEntry, sizeof(*DeviceEntry));
|
||||||
DeviceEntry->ReferenceCount = 1;
|
DeviceEntry->ReferenceCount = 1;
|
||||||
DeviceEntry->Flags |= 7;
|
DeviceEntry->Flags |= (BL_DEVICE_ENTRY_OPENED |
|
||||||
|
BL_DEVICE_ENTRY_READ_ACCESS |
|
||||||
|
BL_DEVICE_ENTRY_WRITE_ACCESS);
|
||||||
DeviceEntry->Unknown = Unknown;
|
DeviceEntry->Unknown = Unknown;
|
||||||
|
|
||||||
/* Save flag 8 if needed */
|
/* Save flag 8 if needed */
|
||||||
|
|
|
@ -797,7 +797,6 @@ EtfsMount (
|
||||||
EtfsFile->Offset = EtfsDevice->RootDirOffset;
|
EtfsFile->Offset = EtfsDevice->RootDirOffset;
|
||||||
EtfsFile->DirOffset = 0;
|
EtfsFile->DirOffset = 0;
|
||||||
EtfsFile->Size = EtfsDevice->RootDirSize;
|
EtfsFile->Size = EtfsDevice->RootDirSize;
|
||||||
EfiPrintf(L"Root offset: %I64x Size: %I64x\r\n", EtfsFile->Offset, EtfsFile->Size);
|
|
||||||
EtfsFile->FsName = L"cdfs";
|
EtfsFile->FsName = L"cdfs";
|
||||||
*FileEntry = RootEntry;
|
*FileEntry = RootEntry;
|
||||||
|
|
||||||
|
|
|
@ -345,7 +345,7 @@ FileIoOpen (
|
||||||
Unknown,
|
Unknown,
|
||||||
FileTableCompareWithSubsetAttributes,
|
FileTableCompareWithSubsetAttributes,
|
||||||
&DirectoryEntry);
|
&DirectoryEntry);
|
||||||
if (NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
goto Quickie;
|
goto Quickie;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue