* fhandler.h (fhandler_serial::fhandler_serial): Change to only accept unit

argument.
* fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto.
(fhandler_serial::open): Avoid else when previous clause is a return().
* path.cc (get_devn): Alias /dev/ttyS0 -> /dev/com1, etc.
(get_device_number): Reallow standalone "com1" as a valid name for /dev/com1.
This commit is contained in:
Christopher Faylor
2001-10-29 05:28:24 +00:00
parent aa9d50a1c1
commit 711ded6d28
7 changed files with 34 additions and 15 deletions

View File

@@ -24,8 +24,8 @@ details. */
/**********************************************************************/
/* fhandler_serial */
fhandler_serial::fhandler_serial (DWORD devtype, int unit)
: fhandler_base (devtype, unit), vmin_ (0), vtime_ (0), pgrp_ (myself->pgid)
fhandler_serial::fhandler_serial (int unit)
: fhandler_base (FH_SERIAL, unit), vmin_ (0), vtime_ (0), pgrp_ (myself->pgid)
{
set_need_fork_fixup ();
}
@@ -219,8 +219,8 @@ fhandler_serial::open (path_conv *, int flags, mode_t mode)
if (!(res = this->fhandler_base::open (NULL, flags, mode)))
return 0;
else
res = 1;
res = 1;
(void) SetCommMask (get_handle (), EV_RXCHAR);