Author: ion
Date: Mon Oct  5 07:22:11 2015
New Revision: 69453

URL: http://svn.reactos.org/svn/reactos?rev=69453&view=rev
Log:
[HIVEBCD]:
- The Objects key is in the root, not under Description.
[MKHIVE]:
- Make it *actually* build a BCD hive. It was doing nothing before, because it 
turns out that irrespective of what appear to be dynamic, command-line driven 
behavior modes, all of mkhive's logic is deeply tied together through C-level 
changes and knowledge. (for example, that's why calling it with a single .inf, 
it still wants to build 6 hives for you). There were also some copy/pasta bugs 
in the BCD handling code, now fixed.

Modified:
    trunk/reactos/boot/bootdata/hivebcd.inf
    trunk/reactos/tools/mkhive/mkhive.c
    trunk/reactos/tools/mkhive/reginf.c
    trunk/reactos/tools/mkhive/registry.c
    trunk/reactos/tools/mkhive/registry.h

Modified: trunk/reactos/boot/bootdata/hivebcd.inf
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivebcd.inf?rev=69453&r1=69452&r2=69453&view=diff
==============================================================================
--- trunk/reactos/boot/bootdata/hivebcd.inf     [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/hivebcd.inf     [iso-8859-1] Mon Oct  5 
07:22:11 2015
@@ -3,9 +3,9 @@
 
 [AddReg]
 
-HKLM,"BCD00000000\Description\Control","System",0x00010003,1
-HKLM,"BCD00000000\Description\Control","TreatAtSystem",0x00010003,1
-HKLM,"BCD00000000\Description\Control","KeyName",2,"BCD00000000"
-HKLM,"BCD00000000\Description\Objects",,0x00000012
+BCD,"BCD00000000\Description\Control","System",0x00010003,1
+BCD,"BCD00000000\Description\Control","TreatAtSystem",0x00010003,1
+BCD,"BCD00000000\Description\Control","KeyName",2,"BCD00000000"
+BCD,"BCD00000000\Objects",,0x00000012
 
 ; EOF

Modified: trunk/reactos/tools/mkhive/mkhive.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/mkhive.c?rev=69453&r1=69452&r2=69453&view=diff
==============================================================================
--- trunk/reactos/tools/mkhive/mkhive.c [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/mkhive.c [iso-8859-1] Mon Oct  5 07:22:11 2015
@@ -146,7 +146,7 @@
     convert_path (FileName, argv[1]);
     strcat (FileName, DIR_SEPARATOR_STRING);
     strcat (FileName, "BCD");
-    if (!ExportBinaryHive (FileName, &SystemHive))
+    if (!ExportBinaryHive (FileName, &BcdHive))
     {
         return 1;
     }

Modified: trunk/reactos/tools/mkhive/reginf.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/reginf.c?rev=69453&r1=69452&r2=69453&view=diff
==============================================================================
--- trunk/reactos/tools/mkhive/reginf.c [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/reginf.c [iso-8859-1] Mon Oct  5 07:22:11 2015
@@ -53,11 +53,13 @@
 static const WCHAR HKLM[] = {'H','K','L','M',0};
 static const WCHAR HKU[] = {'H','K','U',0};
 static const WCHAR HKR[] = {'H','K','R',0};
+static const WCHAR BCD[] = {'B','C','D',0};
 
 static const WCHAR HKCRPath[] = 
{'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\','S','O','F','T','W','A','R','E','\\','C','l','a','s','s','e','s','\\',0};
 static const WCHAR HKCUPath[] = 
{'\\','R','e','g','i','s','t','r','y','\\','U','s','e','r','\\','.','D','E','F','A','U','L','T','\\',0};
 static const WCHAR HKLMPath[] = 
{'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\',0};
 static const WCHAR HKUPath[] = 
{'\\','R','e','g','i','s','t','r','y','\\','U','s','e','r','\\',0};
+static const WCHAR BCDPath[] = 
{'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\',0};
 
 static const WCHAR AddReg[] = {'A','d','d','R','e','g',0};
 static const WCHAR DelReg[] = {'D','e','l','R','e','g',0};
@@ -88,6 +90,12 @@
     if (!strcmpiW (Name, HKU))
     {
         strcpyW (Name, HKUPath);
+        return TRUE;
+    }
+
+    if (!strcmpiW (Name, BCD))
+    {
+        strcpyW (Name, BCDPath);
         return TRUE;
     }
 

Modified: trunk/reactos/tools/mkhive/registry.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/registry.c?rev=69453&r1=69452&r2=69453&view=diff
==============================================================================
--- trunk/reactos/tools/mkhive/registry.c       [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/registry.c       [iso-8859-1] Mon Oct  5 
07:22:11 2015
@@ -47,6 +47,7 @@
 CMHIVE SecurityHive; /* \Registry\Machine\SECURITY */
 CMHIVE SoftwareHive; /* \Registry\Machine\SOFTWARE */
 CMHIVE SystemHive;   /* \Registry\Machine\SYSTEM */
+CMHIVE BcdHive;      /* \Registry\Machine\BCD00000000 */
 
 static PMEMKEY
 CreateInMemoryStructure(
@@ -552,6 +553,11 @@
                     &SoftwareHive,
                     L"Registry\\Machine\\SOFTWARE");
 
+    /* Create BCD key */
+    ConnectRegistry(NULL,
+                    &BcdHive,
+                    L"Registry\\Machine\\BCD00000000");
+
     /* Create SYSTEM key */
     ConnectRegistry(NULL,
                     &SystemHive,

Modified: trunk/reactos/tools/mkhive/registry.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/registry.h?rev=69453&r1=69452&r2=69453&view=diff
==============================================================================
--- trunk/reactos/tools/mkhive/registry.h       [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/registry.h       [iso-8859-1] Mon Oct  5 
07:22:11 2015
@@ -30,6 +30,7 @@
 extern CMHIVE SecurityHive; /* \Registry\Machine\SECURITY */
 extern CMHIVE SoftwareHive; /* \Registry\Machine\SOFTWARE */
 extern CMHIVE SystemHive;   /* \Registry\Machine\SYSTEM */
+extern CMHIVE BcdHive;      /* \Registry\Machine\BCD00000000 */
 
 #define ERROR_SUCCESS                    0L
 #define ERROR_UNSUCCESSFUL               1L


Reply via email to