- Added support for including other .inf files while building the standard hives.
svn path=/trunk/; revision=9551
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: binhive.c,v 1.10 2004/05/09 14:50:09 ekohl Exp $
+/* $Id: binhive.c,v 1.11 2004/05/29 21:15:58 navaraf Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS hive maker
* FILE: tools/mkhive/binhive.c
}
memset (Hive, 0, sizeof(REGISTRY_HIVE));
- DPRINT("Hive %x\n", Hive);
+ DPRINT("Hive %p\n", Hive);
/* Create hive beader (aka 'base block') */
Hive->HiveHeader = (PHIVE_HEADER) malloc (REG_BLOCK_SIZE);
Bin = Hive->BlockList[i];
DPRINT ("Bin[%lu]: Offset 0x%lx Size 0x%lx\n",
- i, Bin->BlockOffset, Bin->BlockSize);
+ i, Bin->BinOffset, Bin->BinSize);
free (Bin);
}
PHBIN Bin;
ULONG i;
- DPRINT("CmiMergeFree(Block %lx Offset %lx Size %lx) called\n",
+ DPRINT("CmiMergeFree(Block %p Offset %lx Size %lx) called\n",
FreeBlock, FreeOffset, FreeBlock->CellSize);
CmiGetCell (RegistryHive,
assert(RegistryHive);
assert(FreeBlock);
- DPRINT("FreeBlock %.08lx FreeOffset %.08lx\n",
+ DPRINT("FreeBlock %p FreeOffset %.08lx\n",
FreeBlock, FreeOffset);
/* Merge free blocks */
Bin = Hive->BlockList[i];
DPRINT ("Bin[%lu]: Offset 0x%lx Size 0x%lx\n",
- i, Bin->BlockOffset, Bin->BlockSize);
+ i, Bin->BinOffset, Bin->BinSize);
fwrite (Bin, Bin->BinSize, 1, File);
}
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: mkhive.c,v 1.3 2003/11/14 17:13:36 weiden Exp $
+/* $Id: mkhive.c,v 1.4 2004/05/29 21:15:58 navaraf Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS hive maker
* FILE: tools/mkhive/mkhive.c
void usage (void)
{
- printf ("Usage: mkhive <srcdir> <dstdir>\n\n");
+ printf ("Usage: mkhive <srcdir> <dstdir> <addinf>\n\n");
printf (" srcdir - inf files are read from this directory\n");
printf (" dstdir - binary hive files are created in this directory\n");
+ printf (" addinf - additional inf files with full path\n");
}
void convert_path(char *dst, char *src)
int main (int argc, char *argv[])
{
char FileName[PATH_MAX];
+ int Param;
printf ("Binary hive maker\n");
strcat (FileName, "hivedef.inf");
ImportRegistryFile (FileName, "AddReg", FALSE);
+ for (Param = 3; Param < argc; Param++)
+ {
+ convert_path (FileName, argv[Param]);
+ ImportRegistryFile (FileName, "AddReg", FALSE);
+ }
+
convert_path (FileName, argv[2]);
strcat (FileName, DIR_SEPARATOR_STRING);
strcat (FileName, "system");
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: registry.c,v 1.8 2003/11/14 17:13:36 weiden Exp $
+/* $Id: registry.c,v 1.9 2004/05/29 21:15:58 navaraf Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS hive maker
* FILE: tools/mkhive/registry.c
Ptr = CurrentKey->SubKeyList.Flink;
while (Ptr != &CurrentKey->SubKeyList)
{
- DPRINT ("Ptr 0x%x\n", Ptr);
+ DPRINT ("Ptr 0x%p\n", Ptr);
SearchKey = CONTAINING_RECORD(Ptr,
KEY,
KeyList);
- DPRINT ("SearchKey 0x%x\n", SearchKey);
+ DPRINT ("SearchKey 0x%p\n", SearchKey);
DPRINT ("Searching '%s'\n", SearchKey->Name);
if (strncasecmp (SearchKey->Name, name, subkeyLength) == 0)
break;
memcpy(NewKey->Name, name, subkeyLength);
NewKey->Name[subkeyLength] = 0;
- DPRINT ("NewKey 0x%x\n", NewKey);
- DPRINT ("NewKey '%s' Length %d\n", NewKey->Name, NewKey->NameSize);
+ DPRINT ("NewKey 0x%p\n", NewKey);
+ DPRINT ("NewKey '%s' Length %ld\n", NewKey->Name, NewKey->NameSize);
CurrentKey = NewKey;
}
KEY,
KeyList);
- DPRINT ("Name '%s' Length %d\n", SearchKey->Name, SearchKey->NameSize);
+ DPRINT ("Name '%s' Length %ld\n", SearchKey->Name, SearchKey->NameSize);
Size = min(SearchKey->NameSize, *NameSize);
*NameSize = Size;
Ptr = CurrentKey->SubKeyList.Flink;
while (Ptr != &CurrentKey->SubKeyList)
{
- DPRINT ("Ptr 0x%x\n", Ptr);
+ DPRINT ("Ptr 0x%p\n", Ptr);
SearchKey = CONTAINING_RECORD(Ptr,
KEY,
KeyList);
- DPRINT ("SearchKey 0x%x\n", SearchKey);
+ DPRINT ("SearchKey 0x%p\n", SearchKey);
DPRINT ("Searching '%s'\n", SearchKey->Name);
if (strncasecmp(SearchKey->Name, name, subkeyLength) == 0)