https://git.reactos.org/?p=reactos.git;a=commitdiff;h=80e11516b12b19530b56b…
commit 80e11516b12b19530b56be7539ecc6af2039ed7b
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Wed Aug 15 16:35:05 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Wed Aug 15 16:35:05 2018 +0200
[BTRFS] Allow driver to start at first stage when no hive is present.
Contrary to upstream, we will ignore failure when opening registry
and will keep going.
CORE-13769
---
drivers/filesystems/btrfs/btrfs.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/filesystems/btrfs/btrfs.c b/drivers/filesystems/btrfs/btrfs.c
index 236184eafa..27a1572db8 100644
--- a/drivers/filesystems/btrfs/btrfs.c
+++ b/drivers/filesystems/btrfs/btrfs.c
@@ -5563,12 +5563,19 @@ NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_
PUNICODE_STRING Regi
InitializeObjectAttributes(&oa, RegistryPath, OBJ_CASE_INSENSITIVE |
OBJ_KERNEL_HANDLE, NULL, NULL);
Status = ZwCreateKey(®h, KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS |
KEY_NOTIFY, &oa, 0, NULL, REG_OPTION_NON_VOLATILE, &dispos);
+ /* ReactOS specific hack: allow BtrFS driver to start in 1st stage with no hive */
+#ifndef __REACTOS__
if (!NT_SUCCESS(Status)) {
ERR("ZwCreateKey returned %08x\n", Status);
return Status;
}
watch_registry(regh);
+#else
+ if (NT_SUCCESS(Status)) {
+ watch_registry(regh);
+ }
+#endif
Status = IoReportDetectedDevice(drvobj, InterfaceTypeUndefined, 0xFFFFFFFF,
0xFFFFFFFF,
NULL, NULL, 0, &cde->buspdo);