[PATCH v2 1/2] mountmgr: Create devices and registry entries for serial ports.

Alex Henrie alexhenrie24 at gmail.com
Tue Apr 25 21:32:19 CDT 2017


2017-04-25 3:09 GMT-06:00 Alexandre Julliard <julliard at winehq.org>:
> Alex Henrie <alexhenrie24 at gmail.com> writes:
>
>> +    if (driver == serial_driver)
>> +    {
>> +        dos_name_format = comW;
>> +        nt_name_format = device_serialW;
>> +        reg_value_format = comW;
>> +    }
>> +    else
>> +    {
>> +        /* TODO: support parallel ports */
>> +    }
>
> Please avoid introducing dead code. You can add the if() in the second
> patch.

Okay.

>> +    /* remove old symlinks */
>> +    for (n = 1; n <= MAX_PORTS; n++)
>> +    {
>> +        sprintf( p, "%u", n );
>> +        if (unlink( dosdevices_path ) != 0 && !errno)
>> +            break;
>> +    }
>
> Why would errno ever be 0 here?

I mistakenly thought that unlink set the errno to 0 if the file does
not exist. In reality, errno is ENOENT in this case. Thanks for
catching that.

-Alex



More information about the wine-devel mailing list