Remove some debug messages

scsiport.c: Do not try to open Device subkey if we don't have a service key
cmhardwr.c: Write BIOS information only if we succeeded to open the key

svn path=/trunk/; revision=28217
This commit is contained in:
Hervé Poussineau 2007-08-07 11:45:30 +00:00
parent 9f62e7d5b8
commit ebb26326a5
13 changed files with 65 additions and 51 deletions

View file

@ -1826,7 +1826,7 @@ InstallFatBootcodeToPartition(PUNICODE_STRING SystemRootPath,
NTSTATUS Status; NTSTATUS Status;
/* FAT or FAT32 partition */ /* FAT or FAT32 partition */
DPRINT1("System path: '%wZ'\n", SystemRootPath); DPRINT("System path: '%wZ'\n", SystemRootPath);
if (DoesFileExist(SystemRootPath->Buffer, L"ntldr") == TRUE || if (DoesFileExist(SystemRootPath->Buffer, L"ntldr") == TRUE ||
DoesFileExist(SystemRootPath->Buffer, L"boot.ini") == TRUE) DoesFileExist(SystemRootPath->Buffer, L"boot.ini") == TRUE)
@ -2040,7 +2040,7 @@ InstallFatBootcodeToPartition(PUNICODE_STRING SystemRootPath,
wcscpy(DstPath, SystemRootPath->Buffer); wcscpy(DstPath, SystemRootPath->Buffer);
wcscat(DstPath, L"\\freeldr.sys"); wcscat(DstPath, L"\\freeldr.sys");
DPRINT1("Copy: %S ==> %S\n", SrcPath, DstPath); DPRINT("Copy: %S ==> %S\n", SrcPath, DstPath);
Status = SetupCopyFile(SrcPath, DstPath); Status = SetupCopyFile(SrcPath, DstPath);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
@ -2055,7 +2055,7 @@ InstallFatBootcodeToPartition(PUNICODE_STRING SystemRootPath,
wcscpy(DstPath, SystemRootPath->Buffer); wcscpy(DstPath, SystemRootPath->Buffer);
wcscat(DstPath, L"\\freeldr.ini"); wcscat(DstPath, L"\\freeldr.ini");
DPRINT1("Copy: %S ==> %S\n", SrcPath, DstPath); DPRINT("Copy: %S ==> %S\n", SrcPath, DstPath);
Status = CreateFreeLoaderIniForReactos(DstPath, Status = CreateFreeLoaderIniForReactos(DstPath,
DestinationArcPath->Buffer); DestinationArcPath->Buffer);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
@ -2069,7 +2069,7 @@ InstallFatBootcodeToPartition(PUNICODE_STRING SystemRootPath,
wcscpy(DstPath, SystemRootPath->Buffer); wcscpy(DstPath, SystemRootPath->Buffer);
wcscat(DstPath, L"\\bootsect.old"); wcscat(DstPath, L"\\bootsect.old");
DPRINT1("Save bootsector: %S ==> %S\n", SrcPath, DstPath); DPRINT("Save bootsector: %S ==> %S\n", SrcPath, DstPath);
Status = SaveCurrentBootSector(SrcPath, Status = SaveCurrentBootSector(SrcPath,
DstPath); DstPath);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))

View file

@ -1032,7 +1032,7 @@ IniCacheSave(PINICACHE Cache,
} }
BufferSize++; /* Null-terminator */ BufferSize++; /* Null-terminator */
DPRINT1("BufferSize: %lu\n", BufferSize); DPRINT("BufferSize: %lu\n", BufferSize);
/* Allocate file buffer */ /* Allocate file buffer */
Buffer = (CHAR*) RtlAllocateHeap(ProcessHeap, Buffer = (CHAR*) RtlAllocateHeap(ProcessHeap,

View file

@ -481,10 +481,6 @@ for(;;);
/* Load keyboard driver */ /* Load keyboard driver */
#if 0
if (!LoadDriver(SourcePath, "keyboard.sys"))
return;
#endif
if (!LoadDriver(SourcePath, "i8042prt.sys")) if (!LoadDriver(SourcePath, "i8042prt.sys"))
return; return;
if (!LoadDriver(SourcePath, "kbdclass.sys")) if (!LoadDriver(SourcePath, "kbdclass.sys"))

View file

@ -1249,7 +1249,7 @@ CallWindowProcA(WNDPROC lpPrevWndFunc,
hWnd, Msg, wParam, lParam); hWnd, Msg, wParam, lParam);
else else
{ {
DPRINT("CallWindowProcA: can not dereference WndProcHandle\n"); WARN("CallWindowProcA: can not dereference WndProcHandle\n");
return 0; return 0;
} }
} }
@ -1282,7 +1282,7 @@ CallWindowProcW(WNDPROC lpPrevWndFunc,
hWnd, Msg, wParam, lParam); hWnd, Msg, wParam, lParam);
else else
{ {
DPRINT("CallWindowProcW: can not dereference WndProcHandle\n"); WARN("CallWindowProcW: can not dereference WndProcHandle\n");
return 0; return 0;
} }
} }

View file

@ -249,7 +249,7 @@ FindFile (
} }
else else
{ {
CHECKPOINT1; DPRINT1("File not found %wZ\n", &PathNameU);
Status = STATUS_UNSUCCESSFUL; Status = STATUS_UNSUCCESSFUL;
} }
vfatReleaseFCB(DeviceExt, rcFcb); vfatReleaseFCB(DeviceExt, rcFcb);

View file

@ -194,13 +194,13 @@ VOID STDCALL I8042ReadRegistry(PDRIVER_OBJECT DriverObject,
* set them manually anyway... * set them manually anyway...
*/ */
RTL_QUERY_REGISTRY_TABLE *Current = Parameters; RTL_QUERY_REGISTRY_TABLE *Current = Parameters;
DPRINT1 ("Can't read registry: %x\n", Status); DPRINT ("Can't read registry: %x\n", Status);
while (Current->Name) { while (Current->Name) {
*((PULONG)Current->EntryContext) = *((PULONG)Current->EntryContext) =
*((PULONG)Current->DefaultData); *((PULONG)Current->DefaultData);
Current++; Current++;
} }
DPRINT1 ("Manually set defaults\n"); DPRINT ("Manually set defaults\n");
} }

View file

@ -255,7 +255,7 @@ ScrAcquireOwnership(PDEVICE_EXTENSION DeviceExtension)
DeviceExtension->Rows = 30; DeviceExtension->Rows = 30;
#endif #endif
DPRINT1 ("%d Columns %d Rows %d Scanlines\n", DPRINT ("%d Columns %d Rows %d Scanlines\n",
DeviceExtension->Columns, DeviceExtension->Columns,
DeviceExtension->Rows, DeviceExtension->Rows,
DeviceExtension->ScanLines); DeviceExtension->ScanLines);

View file

@ -806,7 +806,7 @@ SpiInitOpenKeys(PCONFIGURATION_INFO ConfigInfo, PUNICODE_STRING RegistryPath)
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT1("Unable to open driver's registry key %wZ, status 0x%08x\n", RegistryPath, Status); DPRINT("Unable to open driver's registry key %wZ, status 0x%08x\n", RegistryPath, Status);
ConfigInfo->ServiceKey = NULL; ConfigInfo->ServiceKey = NULL;
} }
@ -835,6 +835,8 @@ SpiInitOpenKeys(PCONFIGURATION_INFO ConfigInfo, PUNICODE_STRING RegistryPath)
} }
} }
if (ConfigInfo->ServiceKey != NULL)
{
/* Open the Device key */ /* Open the Device key */
RtlInitUnicodeString(&KeyName, L"Device"); RtlInitUnicodeString(&KeyName, L"Device");
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
@ -848,6 +850,7 @@ SpiInitOpenKeys(PCONFIGURATION_INFO ConfigInfo, PUNICODE_STRING RegistryPath)
KEY_READ, KEY_READ,
&ObjectAttributes); &ObjectAttributes);
} }
}
/********************************************************************** /**********************************************************************

View file

@ -168,6 +168,12 @@ enum msidbComponentAttributes
msidbComponentAttributes64bit = 0x00000100 msidbComponentAttributes64bit = 0x00000100
}; };
enum msidbODBCDataSourceRegistration
{
msidbODBCDataSourceRegistrationPerMachine = 0x00000000,
msidbODBCDataSourceRegistrationPerUser = 0x00000001
};
enum msidbRegistryRoot enum msidbRegistryRoot
{ {
msidbRegistryRootClassesRoot = 0, msidbRegistryRootClassesRoot = 0,

View file

@ -304,7 +304,13 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc
NULL, NULL,
REG_OPTION_NON_VOLATILE, REG_OPTION_NON_VOLATILE,
&Disposition); &Disposition);
if (!NT_SUCCESS(Status) && !ExpInTextModeSetup) return Status; if (ExpInTextModeSetup)
{
if (!NT_SUCCESS(Status))
BiosHandle = NULL;
}
else if (!NT_SUCCESS(Status))
return Status;
/* Create the CPU Key, and check if it already existed */ /* Create the CPU Key, and check if it already existed */
RtlInitUnicodeString(&KeyName, L"CentralProcessor"); RtlInitUnicodeString(&KeyName, L"CentralProcessor");
@ -623,6 +629,8 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc
/* Free the string */ /* Free the string */
RtlFreeUnicodeString(&Data); RtlFreeUnicodeString(&Data);
if (BiosHandle)
{
/* Get the BIOS Date Identifier */ /* Get the BIOS Date Identifier */
RtlCopyMemory(Buffer, (PCHAR)BaseAddress + (16*PAGE_SIZE - 11), 8); RtlCopyMemory(Buffer, (PCHAR)BaseAddress + (16*PAGE_SIZE - 11), 8);
Buffer[8] = ANSI_NULL; Buffer[8] = ANSI_NULL;
@ -647,6 +655,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc
/* Close the bios information handle */ /* Close the bios information handle */
NtClose(BiosHandle); NtClose(BiosHandle);
} }
}
/* Get the BIOS Version */ /* Get the BIOS Version */
if (CmpGetBiosVersion(BaseAddress, 16* PAGE_SIZE, Buffer)) if (CmpGetBiosVersion(BaseAddress, 16* PAGE_SIZE, Buffer))

View file

@ -461,7 +461,7 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
hKey = NULL; hKey = NULL;
DPRINT1("ZwCreateKey failed for %wZ, status=%x\n", &UnicodeString1, Status); DPRINT("ZwCreateKey failed for %wZ, status=%x\n", &UnicodeString1, Status);
} }
/* Create PhysicalDrive links */ /* Create PhysicalDrive links */

View file

@ -787,7 +787,6 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
IopFreeDeviceNode(DeviceNode); IopFreeDeviceNode(DeviceNode);
CPRINT("Driver '%wZ' load failed, status (%x)\n", ModuleName, Status);
return Status; return Status;
} }
@ -1253,6 +1252,7 @@ try_again:
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* If it didn't work, then kill the object */ /* If it didn't work, then kill the object */
DPRINT1("'%wZ' initialization failed, status (0x%08lx)\n", DriverName, Status);
ObMakeTemporaryObject(DriverObject); ObMakeTemporaryObject(DriverObject);
ObDereferenceObject(DriverObject); ObDereferenceObject(DriverObject);
} }

View file

@ -698,7 +698,7 @@ IoReportResourceUsage(PUNICODE_STRING DriverClassName,
* a conflict is detected with another driver. * a conflict is detected with another driver.
*/ */
{ {
DPRINT1("IoReportResourceUsage is unimplemented\n"); UNIMPLEMENTED;
*ConflictDetected = FALSE; *ConflictDetected = FALSE;
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }