wineboot: Create serial comm registry keys

Sebastian Lackner sebastian at fds-team.de
Fri Feb 12 14:26:47 CST 2016


On 12.02.2016 20:15, André Hentschel wrote:
> Am 12.02.2016 um 09:46 schrieb Sebastian Lackner:
>> On 12.02.2016 00:32, André Hentschel wrote:
>>> Signed-off-by: André Hentschel <nerv at dawncrow.de>
>>> ---
>>>
>>> For https://bugs.winehq.org/show_bug.cgi?id=11811
>>>
>>>
>>>  programs/wineboot/wineboot.c | 39 +++++++++++++++++++++++++++++++++++++++
>>>  1 file changed, 39 insertions(+)
>>>
>>
>> Are you sure there are no keys for com ports >= 10? In general, such serial ports are
>> also possible.
> 
> In other places the symlink method seems to be limited from 1 to 9 (e.g. QueryDosDeviceW)
> 
>> Nevertheless, more important: If I don't miss anything, the user still has to manually
>> create a symlink in dosdevices/, otherwise this method will not work. Accessing serial
>> ports on the other hand doesn't require any manual configuration when
>> get_default_com_device() recognizes them (and the user has access). What is the benefit
>> when it still requires manual user interaction?
> 
> I think get_default_com_device() isn't a normal way to use com ports in Wine.
> For example, I have /dev/ttyS0 to 31, most likely announced by my laptop motherboard, but would never intend to use those ports, which are not wired out.
> Normal usecase would be to plug in a USB-Serial-Adapter and make a symlink to e.g. /dev/ttyUSB0
> 
> 

Well, but this depends on the exact use-case. I guess the forwarding of /dev/ttyS* was not
added just for fun, but because its useful for at least some people. What about adding an
explicit test which uses kernel32/ntdll functions, so that all serial ports are added to the
registry? To do that, it would be necessary to make the /dev/ttyS* detection a bit more strict,
like Alex Henrie tried to do with one of his patches:

https://github.com/wine-compholio/wine-staging/blob/master/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch




More information about the wine-devel mailing list