https://bugs.winehq.org/show_bug.cgi?id=49615
--- Comment #11 from jswinebz@kanargh.org.uk --- Created attachment 73917 --> https://bugs.winehq.org/attachment.cgi?id=73917 don't try to read() from empty cdrom drives
...and it's a bit easier than that even. Turns out that we already use an ioctl during the enumeration which does return ENOMEDIUM(123). That gets translated by ntdll to STATUS_NO_MEDIA_IN_DEVICE (0xc0000013), which is translated to userspace as ERROR_NOT_READY (21).
But then that gets ignored during the enumeration which just assumes that any error reading the TOC must mean it's a harddrive instead - or at least that it's allowed to try reading the superblock to find out.
This patch catches that case and results in a blissfully silent wine startup - at least as far as the kernel log goes.