Re: [PATCH v2 1/2] mountmgr: Create devices and registry entries for serial ports.
Alex Henrie <alexhenrie24(a)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.
+ /* 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? -- Alexandre Julliard julliard(a)winehq.org
2017-04-25 3:09 GMT-06:00 Alexandre Julliard <julliard(a)winehq.org>:
Alex Henrie <alexhenrie24(a)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
participants (2)
-
Alex Henrie -
Alexandre Julliard