Commit a5811228 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

win32u: Downgrade the NtOpenFile ERR to a WARN in add_device().

This may fail for multiple legitimate reasons. Most commonly, the device may not actually be present on the machine (it will appear in the registry regardless). Less commonly, the device may have been removed between the call to NtEnumerateKey and here. We can get around the former by checking the Linked subkey value, but there is not much point; failing to open the file gives us just as much information. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53300
parent 5075c31e
...@@ -249,7 +249,7 @@ static struct device *add_device( HKEY key, DWORD type ) ...@@ -249,7 +249,7 @@ static struct device *add_device( HKEY key, DWORD type )
if ((status = NtOpenFile( &file, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, if ((status = NtOpenFile( &file, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io,
FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT ))) FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT )))
{ {
ERR( "Failed to open device file %s, status %#x.\n", debugstr_w(path), status ); WARN( "Failed to open device file %s, status %#x.\n", debugstr_w(path), status );
return NULL; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment