http://bugs.winehq.org/show_bug.cgi?id=29877
Bug #: 29877 Summary: NtOpenFile can't handle \Device\Cdrom0 Product: Wine Version: 1.4-rc2 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com Classification: Unclassified
The following function succeeds on win7, but on wine, it fails and complains
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 335140 (device=33 access=1 func=450 method=0)
static DWORD openDrive(HANDLE *phdevice) { IO_STATUS_BLOCK io; OBJECT_ATTRIBUTES attr; UNICODE_STRING nt_name; BOOL bRet; static WCHAR szSourceDevice[] = { '\', 'D', 'e', 'v', 'i', 'c', 'e', '\', 'C', 'd', 'r', 'o', 'm', '0', 0 };
pRtlInitUnicodeString(&nt_name, szSourceDevice);
attr.Length = sizeof(attr); attr.RootDirectory = 0; attr.Attributes = OBJ_CASE_INSENSITIVE; attr.ObjectName = &nt_name; attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL;
return pNtOpenFile(phdevice, FILE_GENERIC_READ, &attr, &io, FILE_SHARE_READ, FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); }
I don't know of any real world apps that need this; I ran into it while writing conformance tests.
http://bugs.winehq.org/show_bug.cgi?id=29877
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID
--- Comment #1 from Dan Kegel dank@kegel.com 2012-02-12 19:16:06 CST --- This looks fishy, please ignore.
http://bugs.winehq.org/show_bug.cgi?id=29877
--- Comment #2 from Dan Kegel dank@kegel.com 2012-02-12 23:09:28 CST --- Created attachment 38849 --> http://bugs.winehq.org/attachment.cgi?id=38849 conformance test with one fork that works on both wine and windows, and one that only works on windows
For what it's worth, here's the full program. It seems to trigger two wine bugs; I haven't looked closely yet.
http://bugs.winehq.org/show_bug.cgi?id=29877
--- Comment #3 from Vitaliy Margolen vitaliy-bugzilla@kievinfo.com 2012-02-13 08:49:55 CST --- There are many symlinks in Windows' object manager that Wine doesn't have. Or ntdll/kernel32 doesn't know how to open. Replicating all of them is a waste of time IMO. Unless we want to put name resolution into wineserver.
http://bugs.winehq.org/show_bug.cgi?id=29877
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2012-02-13 08:57:05 CST --- We do have the symlinks, and open works just fine. However if you want to do ioctls against the real Unix device you also need a Unix symlink in dosdevices.
http://bugs.winehq.org/show_bug.cgi?id=29877
--- Comment #5 from Dan Kegel dank@kegel.com 2012-02-13 11:47:53 CST --- tracing through the code, it looks like wine_nt_to_unix_file_name() would have to change. Right now \device\cdrom0 doesn't get mapped to a unix filename at all.
http://bugs.winehq.org/show_bug.cgi?id=29877
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | Summary|NtOpenFile can't handle |Can't do DeviceIoControl on |\Device\Cdrom0 |handles opened via | |\Device\Cdrom0 Severity|normal |enhancement
--- Comment #6 from Dan Kegel dank@kegel.com 2012-02-13 11:53:14 CST --- Leaving open as an enhancement request even though I don't know of any real apps that need it yet.
https://bugs.winehq.org/show_bug.cgi?id=29877
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |INVALID
--- Comment #7 from Austin English austinenglish@gmail.com --- No real app depends on this.
https://bugs.winehq.org/show_bug.cgi?id=29877
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Austin English austinenglish@gmail.com --- Closing.