lkml.org 
[lkml]   [1996]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: Bug in pty re-usage
Date
In linux.dev.kernel, article <Pine.LNX.3.95.960926093135.1220A-100000@deimos.ceddec.com>,
Tom Zerucha <root@deimos.ceddec.com> writes:
>
> Is there an updated MAKDEV script or program that will (re) create all the
> necessary devices with the correct values?
>
Index: kernel/makedev/MAKEDEV
diff -u kernel/makedev/MAKEDEV:1.1.1.1 kernel/makedev/MAKEDEV:1.3
--- kernel/makedev/MAKEDEV:1.1.1.1 Tue Jul 30 12:47:54 1996
+++ kernel/makedev/MAKEDEV Thu Sep 26 09:13:04 1996
@@ -204,5 +204,5 @@
$0 $opts xda xdb
$0 $opts sda sdb
- $0 $opts ptyp ptyq ptyr ptys
+ $0 $opts ptyp ptyq ptyr ptys ptyt ptyu ptyv ptyw ptyx ptyy ptyz ptya ptyb ptyc ptyd ptye
$0 $opts console
$0 $opts ttyS0 ttyS1 ttyS2 ttyS3
@@ -252,23 +263,23 @@
ttyS[0-9]|ttyS[1-5][0-9]|ttyS[6][0-3])
line=`suffix $arg ttyS`
minor=`math 64 + $line`
makedev ttyS$line c 4 $minor $tty
makedev cua$line c 5 $minor $dialout
;;
- pty[p-s])
- # Currently limited to 64 master/slave pairs.
+ pty[a-ep-z])
+ # Currently limited to 256 master/slave pairs.
bank=`suffix $arg pty`
- base=`index pqrs $bank`
+ base=`index pqrstuvwxyzabcde $bank`
base=`math $base \* 16`
for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do
j=`index 0123456789abcdef $i`
- makedev pty$bank$i c 4 `math 128 + $base + $j` $tty
- makedev tty$bank$i c 4 `math 192 + $base + $j` $tty
+ makedev pty$bank$i c 2 `math $base + $j` $public
+ makedev tty$bank$i c 3 `math $base + $j` $public
done
;;
cyclades)
major1=`Major ttyC` || continue
major2=`Major cub` || continue
for i in 0 1 2 3 4 5 6 7 # 8 9 10 11 12 13 14 15
do
--
I went fishing with a dotted line. I caught every other fish.
-- Steve Wright
--
Matthias Urlichs \ noris network GmbH / Xlink-POP Nürnberg
Schleiermacherstraße 12 \ Linux+Internet / EMail: urlichs@noris.de
90491 Nürnberg (Germany) \ Consulting+Programming+Networking+etc'ing
PGP: 1024/4F578875 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE
Click <A HREF="http://info.noris.de/~smurf/finger">here</A>. 42

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.040 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site