https://bugs.winehq.org/show_bug.cgi?id=49615
--- Comment #9 from jswinebz@kanargh.org.uk --- On bug 54340 you said:
Duplicate of bug 49615, but it's still not clear to me that Wine is actually doing anything wrong here.
How is it not clear from the demo code attached above that there is a clear expectation from the Linux kernel about how applications should behave and Wine is violating that?
An application should either open the drive device special file in the normal way, in which case it will get an immediate error without any kernel logging in the case where no disc is inserted.
*Or* it can open the device O_NONBLOCK if it wants to query device capabilities even in the absence of a disc. In that case it is specifically expected to query whether a disc is in fact inserted *before* proceeding to a data read call, if it wants to do so. If it makes that query, and there is a disc inserted, and it then does a read, the read will succeed, again without kernel logging.
Only if it doesn't make that query, or ignores the return value, and attempts the read anyway without a disc inserted, will the kernel log the attempt. That distinction should be a very clear indication that that is *NOT* what applications are expected to do.
And the disc-present query is utterly trivial to do - the code is right there in that attachment - I really don't understand how you could have any objection to incorporating it.
(And thus clear a whole bunch of obnoxious spam from the kernel logs which get in the way of diagnosing other issues.)