Author: ekohl
Date: Sun Oct 5 12:25:05 2014
New Revision: 64541
URL:
http://svn.reactos.org/svn/reactos?rev=64541&view=rev
Log:
[DEVMGR]
Use a new debug channel 'devmgr' instead of DPRINTFs.
Modified:
trunk/reactos/dll/win32/devmgr/advprop.c
trunk/reactos/dll/win32/devmgr/devprblm.c
trunk/reactos/dll/win32/devmgr/hwpage.c
trunk/reactos/dll/win32/devmgr/hwresource.c
trunk/reactos/dll/win32/devmgr/misc.c
trunk/reactos/dll/win32/devmgr/precomp.h
trunk/reactos/dll/win32/devmgr/stubs.c
Modified: trunk/reactos/dll/win32/devmgr/advprop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/advprop.c…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/advprop.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/advprop.c [iso-8859-1] Sun Oct 5 12:25:05 2014
@@ -31,8 +31,6 @@
#include <winver.h>
-#define NDEBUG
-#include <debug.h>
static UINT WINAPI
EnumDeviceDriverFilesCallback(IN PVOID Context,
@@ -440,14 +438,14 @@
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken))
{
- DPRINT("OpenProcessToken failed\n");
+ ERR("OpenProcessToken failed\n");
return;
}
/* Get the LUID for the Shutdown privilege */
if (!LookupPrivilegeValueW(NULL, SE_SHUTDOWN_NAME,
&Privileges.Privileges[0].Luid))
{
- DPRINT("LookupPrivilegeValue failed\n");
+ ERR("LookupPrivilegeValue failed\n");
CloseHandle(hToken);
return;
}
@@ -458,7 +456,7 @@
if (!AdjustTokenPrivileges(hToken, FALSE, &Privileges, 0, NULL, NULL))
{
- DPRINT("AdjustTokenPrivileges failed\n");
+ ERR("AdjustTokenPrivileges failed\n");
CloseHandle(hToken);
return;
}
@@ -466,7 +464,7 @@
/* Finally shut down the system */
if (!ExitWindowsEx(EWX_REBOOT, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER |
SHTDN_REASON_FLAG_PLANNED))
{
- DPRINT("ExitWindowsEx failed\n");
+ ERR("ExitWindowsEx failed\n");
CloseHandle(hToken);
}
}
@@ -1587,8 +1585,8 @@
else
{
/* FIXME - display an error message */
- DPRINT1("Failed to enable/disable device! LastError: %d\n",
- GetLastError());
+ FIXME("Failed to enable/disable device! LastError: %d\n",
+ GetLastError());
}
}
else
@@ -2411,7 +2409,7 @@
0,
&DevIdSize))
{
- DPRINT1("SetupDiGetDeviceInstanceId unexpectedly returned
TRUE!\n");
+ ERR("SetupDiGetDeviceInstanceId unexpectedly returned TRUE!\n");
return -1;
}
@@ -2903,7 +2901,7 @@
if (dwFlags & ~(DPF_EXTENDED | DPF_DEVICE_STATUS_ACTION))
{
- DPRINT1("DevPropertiesExW: Invalid flags: 0x%x\n",
+ FIXME("DevPropertiesExW: Invalid flags: 0x%x\n",
dwFlags & ~(DPF_EXTENDED | DPF_DEVICE_STATUS_ACTION));
SetLastError(ERROR_INVALID_FLAGS);
return -1;
@@ -2911,7 +2909,7 @@
if (bShowDevMgr)
{
- DPRINT("DevPropertiesExW doesn't support bShowDevMgr!\n");
+ FIXME("DevPropertiesExW doesn't support bShowDevMgr!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
}
else
@@ -3132,7 +3130,7 @@
szDeviceID,
szMachineName))
{
- DPRINT1("DeviceProperties_RunDLLW DeviceID: %S, MachineName: %S\n",
szDeviceID, szMachineName);
+ ERR("DeviceProperties_RunDLLW DeviceID: %S, MachineName: %S\n",
szDeviceID, szMachineName);
return;
}
Modified: trunk/reactos/dll/win32/devmgr/devprblm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devprblm.…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devprblm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devprblm.c [iso-8859-1] Sun Oct 5 12:25:05 2014
@@ -27,8 +27,6 @@
#include "precomp.h"
-#define NDEBUG
-#include <debug.h>
BOOL
ShowDeviceProblemWizard(IN HWND hWndParent OPTIONAL,
Modified: trunk/reactos/dll/win32/devmgr/hwpage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/hwpage.c?…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/hwpage.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/hwpage.c [iso-8859-1] Sun Oct 5 12:25:05 2014
@@ -27,8 +27,6 @@
#include "precomp.h"
-#define NDEBUG
-#include <debug.h>
typedef struct _HWDEVINFO
{
@@ -314,8 +312,8 @@
}
else
{
- DPRINT1("Unable to allocate memory for %d SP_DEVINFO_DATA
structures!\n",
- ClassDevInfo->ItemCount + 1);
+ ERR("Unable to allocate memory for %d SP_DEVINFO_DATA
structures!\n",
+ ClassDevInfo->ItemCount + 1);
break;
}
}
@@ -326,7 +324,7 @@
sizeof(HWDEVINFO));
if (ClassDevInfo->HwDevInfo == NULL)
{
- DPRINT1("Unable to allocate memory for a SP_DEVINFO_DATA
structures!\n");
+ ERR("Unable to allocate memory for a SP_DEVINFO_DATA
structures!\n");
break;
}
}
Modified: trunk/reactos/dll/win32/devmgr/hwresource.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/hwresourc…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/hwresource.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/hwresource.c [iso-8859-1] Sun Oct 5 12:25:05 2014
@@ -9,8 +9,6 @@
#include "precomp.h"
-#define NDEBUG
-#include <debug.h>
typedef struct
{
Modified: trunk/reactos/dll/win32/devmgr/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/misc.c?re…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/misc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/misc.c [iso-8859-1] Sun Oct 5 12:25:05 2014
@@ -27,8 +27,6 @@
#include "precomp.h"
-#define NDEBUG
-#include <debug.h>
HINSTANCE hDllInstance = NULL;
@@ -954,7 +952,7 @@
DeviceInfoData,
&InstallParams))
{
- DPRINT1("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n",
GetLastError());
+ ERR("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n",
GetLastError());
goto Cleanup;
}
@@ -990,7 +988,7 @@
KEY_QUERY_VALUE);
if (hKey == INVALID_HANDLE_VALUE)
{
- DPRINT1("SetupDiOpenDevRegKey() failed with error 0x%lx\n",
GetLastError());
+ ERR("SetupDiOpenDevRegKey() failed with error 0x%lx\n",
GetLastError());
goto Cleanup;
}
@@ -1004,14 +1002,14 @@
&dwLength);
if (rc != ERROR_SUCCESS)
{
+ ERR("RegQueryValueEx() failed with error 0x%lx\n", GetLastError());
SetLastError(rc);
- DPRINT1("RegQueryValueEx() failed with error 0x%lx\n",
GetLastError());
goto Cleanup;
}
else if (dwType != REG_SZ)
{
+ ERR("Expected registry type REG_SZ (%lu), got %lu\n", REG_SZ, dwType);
SetLastError(ERROR_GEN_FAILURE);
- DPRINT1("Expected registry type REG_SZ (%lu), got %lu\n", REG_SZ,
dwType);
goto Cleanup;
}
InfPath[(dwLength / sizeof(WCHAR)) - 1] = L'\0';
@@ -1024,7 +1022,7 @@
DeviceInfoData,
&InstallParams))
{
- DPRINT1("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n",
GetLastError());
+ ERR("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n",
GetLastError());
goto Cleanup;
}
@@ -1033,7 +1031,7 @@
DeviceInfoData,
SPDIT_CLASSDRIVER))
{
- DPRINT1("SetupDiBuildDriverInfoList() failed with error 0x%lx\n",
GetLastError());
+ ERR("SetupDiBuildDriverInfoList() failed with error 0x%lx\n",
GetLastError());
goto Cleanup;
}
@@ -1047,14 +1045,14 @@
&dwLength);
if (rc != ERROR_SUCCESS)
{
+ ERR("RegQueryValueEx() failed with error 0x%lx\n", GetLastError());
SetLastError(rc);
- DPRINT1("RegQueryValueEx() failed with error 0x%lx\n",
GetLastError());
goto Cleanup;
}
else if (dwType != REG_SZ)
{
+ ERR("Expected registry type REG_SZ (%lu), got %lu\n", REG_SZ, dwType);
SetLastError(ERROR_GEN_FAILURE);
- DPRINT1("Expected registry type REG_SZ (%lu), got %lu\n", REG_SZ,
dwType);
goto Cleanup;
}
InfPath[(dwLength / sizeof(WCHAR)) - 1] = L'\0';
@@ -1077,7 +1075,7 @@
NULL) &&
GetLastError() != ERROR_INSUFFICIENT_BUFFER)
{
- DPRINT1("SetupDiGetDriverInfoDetail() failed with error 0x%lx\n",
GetLastError());
+ ERR("SetupDiGetDriverInfoDetail() failed with error 0x%lx\n",
GetLastError());
goto Cleanup;
}
if (!wcsicmp(DriverInfoDetailData.SectionName,
@@ -1092,7 +1090,7 @@
}
if (GetLastError() != ERROR_NO_MORE_ITEMS)
{
- DPRINT1("SetupDiEnumDriverInfo() failed with error 0x%lx\n",
GetLastError());
+ ERR("SetupDiEnumDriverInfo() failed with error 0x%lx\n",
GetLastError());
goto Cleanup;
}
Modified: trunk/reactos/dll/win32/devmgr/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/precomp.h…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/precomp.h [iso-8859-1] Sun Oct 5 12:25:05 2014
@@ -14,12 +14,13 @@
#include <setupapi.h>
#include <cfgmgr32.h>
#include <dll/devmgr/devmgr.h>
+#include <wine/debug.h>
#include "resource.h"
+WINE_DEFAULT_DEBUG_CHANNEL(devmgr);
+
extern HINSTANCE hDllInstance;
-
-ULONG DbgPrint(PCCH Format,...);
typedef INT_PTR (WINAPI *PPROPERTYSHEETW)(LPCPROPSHEETHEADERW);
typedef HPROPSHEETPAGE (WINAPI *PCREATEPROPERTYSHEETPAGEW)(LPCPROPSHEETPAGEW);
Modified: trunk/reactos/dll/win32/devmgr/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/stubs.c?r…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/stubs.c [iso-8859-1] Sun Oct 5 12:25:05 2014
@@ -18,8 +18,6 @@
#include <windef.h>
-#define NDEBUG
-#include <debug.h>
/***************************************************************************
* NAME EXPORTED