summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-11-13 04:06:41 +0000
committerChristopher Faylor <me@cgf.cx>2000-11-13 04:06:41 +0000
commit70a11195b9bf3617e3dbe4b9de034b3792c65621 (patch)
tree3d65dd15dc384556623d9735b5f56d7811701ff5 /winsup/cygwin/path.cc
parent49421cd9c5d29b29b4da341a75855b00fbab9b3d (diff)
downloadcygnal-70a11195b9bf3617e3dbe4b9de034b3792c65621.tar.gz
cygnal-70a11195b9bf3617e3dbe4b9de034b3792c65621.tar.bz2
cygnal-70a11195b9bf3617e3dbe4b9de034b3792c65621.zip
* path.cc (get_device_number): Allow /dev/ttySn to designate a com port.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 34a2b983b..1b487ceca 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -534,6 +534,8 @@ get_device_number (const char *name, int &unit, BOOL from_conv)
}
else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0)
devn = FH_SERIAL;
+ else if (deveqn ("ttyS", 4) && (unit = digits (name + 4)) >= 0)
+ devn = FH_SERIAL;
else if (deveq ("pipe") || deveq ("piper") || deveq ("pipew"))
devn = FH_PIPE;
else if (deveq ("tcp") || deveq ("udp") || deveq ("streamsocket")
@@ -547,6 +549,8 @@ get_device_number (const char *name, int &unit, BOOL from_conv)
}
else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0)
devn = FH_SERIAL;
+ else if (deveqn ("ttyS", 4) && (unit = digits (name + 4)) >= 0)
+ devn = FH_SERIAL;
return devn;
}