Logger Pro expects this field to be set on HID PnP devices.
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 6d8513ffa35..948253608ae 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1631,6 +1631,15 @@ static void test_pnp_devices(void) if (ret) ok(GetLastError() == ERROR_INVALID_DATA, "got error %#lx\n", GetLastError());
+ ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS, + &type, (BYTE *)&dword, sizeof(dword), NULL); + todo_wine ok(ret, "got error %#lx\n", GetLastError()); + if (ret) + { + ok(!dword, "got flags %#lx\n", dword); + ok(type == REG_DWORD, "got type %lu\n", type); + } + ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DEVTYPE, &type, (BYTE *)&dword, sizeof(dword), NULL); ok(!ret, "expected failure\n"); @@ -1740,6 +1749,7 @@ static void test_pnp_driver(struct testsign_context *ctx) SC_HANDLE manager, service; BOOL ret, need_reboot; HANDLE catalog, file; + DWORD dword, type; unsigned int i; HDEVINFO set; FILE *f; @@ -1798,11 +1808,25 @@ static void test_pnp_driver(struct testsign_context *ctx) ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device); ok(ret, "failed to register device, error %#lx\n", GetLastError());
+ ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS, + &type, (BYTE *)&dword, sizeof(dword), NULL); + ok(!ret, "expected failure\n"); + ok(GetLastError() == ERROR_INVALID_DATA, "got error %#lx\n", GetLastError()); + GetFullPathNameA("winetest.inf", sizeof(path), path, NULL); ret = UpdateDriverForPlugAndPlayDevicesA(NULL, hardware_id, path, INSTALLFLAG_FORCE, &need_reboot); ok(ret, "failed to install device, error %#lx\n", GetLastError()); ok(!need_reboot, "expected no reboot necessary\n");
+ ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS, + &type, (BYTE *)&dword, sizeof(dword), NULL); + todo_wine ok(ret, "got error %#lx\n", GetLastError()); + if (ret) + { + ok(!dword, "got flags %#lx\n", dword); + ok(type == REG_DWORD, "got type %lu\n", type); + } + /* Tests. */
test_pnp_devices();
From: Zebediah Figura zfigura@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53387 --- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 9 +++------ dlls/setupapi/devinst.c | 5 +++++ 2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 948253608ae..d2e02c7c130 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1820,12 +1820,9 @@ static void test_pnp_driver(struct testsign_context *ctx)
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS, &type, (BYTE *)&dword, sizeof(dword), NULL); - todo_wine ok(ret, "got error %#lx\n", GetLastError()); - if (ret) - { - ok(!dword, "got flags %#lx\n", dword); - ok(type == REG_DWORD, "got type %lu\n", type); - } + ok(ret, "got error %#lx\n", GetLastError()); + ok(!dword, "got flags %#lx\n", dword); + ok(type == REG_DWORD, "got type %lu\n", type);
/* Tests. */
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 901af4650c8..de29e64a564 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -5159,6 +5159,7 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) static const WCHAR addserviceW[] = {'A','d','d','S','e','r','v','i','c','e',0}; static const WCHAR rootW[] = {'r','o','o','t','\',0}; WCHAR section_ext[LINE_LEN], subsection[LINE_LEN], inf_path[MAX_PATH], *extptr, *filepart; + static const DWORD config_flags = 0; UINT install_flags = SPINST_ALL; HKEY driver_key, device_key; SC_HANDLE manager, service; @@ -5206,6 +5207,10 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) return FALSE; }
+ if (!SETUPDI_SetDeviceRegistryPropertyW(device, SPDRP_CONFIGFLAGS, + (BYTE *)&config_flags, sizeof(config_flags))) + ERR("Failed to set config flags, error %#lx.\n", GetLastError()); + if (device->params.Flags & DI_NOFILECOPY) install_flags &= ~SPINST_FILES;
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/ntoskrnl.exe/pnp.c | 9 +++++++++ dlls/ntoskrnl.exe/tests/ntoskrnl.c | 9 +++------ 2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index a70190db7ce..7c77a9a7145 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -256,6 +256,7 @@ static BOOL install_device_driver( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVIN DIF_INSTALLDEVICE, DIF_NEWDEVICEWIZARD_FINISHINSTALL, }; + static const DWORD config_flags = 0;
NTSTATUS status; unsigned int i; @@ -281,6 +282,14 @@ static BOOL install_device_driver( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVIN sizeof_multiszW( ids ) * sizeof(WCHAR) ); ExFreePool( ids );
+ /* Set the config flags. setupapi won't do this for us if we couldn't find + * a driver to install, but raw devices should still have this key + * populated. */ + + if (!SetupDiSetDeviceRegistryPropertyW( set, sp_device, SPDRP_CONFIGFLAGS, + (BYTE *)&config_flags, sizeof(config_flags) )) + ERR("Failed to set config flags, error %#lx.\n", GetLastError()); + if (!SetupDiBuildDriverInfoList( set, sp_device, SPDIT_COMPATDRIVER )) { ERR("Failed to build compatible driver list, error %#lx.\n", GetLastError()); diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index d2e02c7c130..02af7ca230b 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1633,12 +1633,9 @@ static void test_pnp_devices(void)
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS, &type, (BYTE *)&dword, sizeof(dword), NULL); - todo_wine ok(ret, "got error %#lx\n", GetLastError()); - if (ret) - { - ok(!dword, "got flags %#lx\n", dword); - ok(type == REG_DWORD, "got type %lu\n", type); - } + ok(ret, "got error %#lx\n", GetLastError()); + ok(!dword, "got flags %#lx\n", dword); + ok(type == REG_DWORD, "got type %lu\n", type);
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DEVTYPE, &type, (BYTE *)&dword, sizeof(dword), NULL);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=126261
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1637: Test failed: got flags 0x400
=== w7u_el (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1637: Test failed: got flags 0x400