Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc Add support for many more (930 or 992) ptys than the cur...
details: https://anonhg.NetBSD.org/src/rev/2566cab37b4e
branches: trunk
changeset: 521615:2566cab37b4e
user: tls <tls%NetBSD.org@localhost>
date: Sat Feb 02 07:04:44 2002 +0000
description:
Add support for many more (930 or 992) ptys than the current 256.
Changes taken from the i386 MAKEDEV. Note that the unusual use of 'dd'
to index an array was chosen because 'dd' is on all ports' install media.
This form of this change comes from Andrew Brown; the original idea to
bump the number of ptys this way comes from Brian Marcotte at Panix.
diffstat:
etc/etc.acorn32/MAKEDEV | 78 ++++++++++++++++++++++-------------------
etc/etc.alpha/MAKEDEV | 79 +++++++++++++++++++++++------------------
etc/etc.amiga/MAKEDEV | 79 +++++++++++++++++++++++------------------
etc/etc.arc/MAKEDEV | 80 +++++++++++++++++++++++-------------------
etc/etc.arm26/MAKEDEV | 79 +++++++++++++++++++++++------------------
etc/etc.arm32/MAKEDEV | 77 ++++++++++++++++++++++-------------------
etc/etc.atari/MAKEDEV | 79 +++++++++++++++++++++++------------------
etc/etc.bebox/MAKEDEV | 78 ++++++++++++++++++++++-------------------
etc/etc.cobalt/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.dreamcast/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.evbarm/MAKEDEV | 77 ++++++++++++++++++++++------------------
etc/etc.evbsh3/MAKEDEV | 79 +++++++++++++++++++++++------------------
etc/etc.hp300/MAKEDEV | 76 ++++++++++++++++++++++------------------
etc/etc.hpcmips/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.hpcsh/MAKEDEV | 76 ++++++++++++++++++++++------------------
etc/etc.luna68k/MAKEDEV | 76 ++++++++++++++++++++++------------------
etc/etc.mac68k/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.macppc/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.mipsco/MAKEDEV | 80 +++++++++++++++++++++++-------------------
etc/etc.mmeye/MAKEDEV | 82 ++++++++++++++++++++++++-------------------
etc/etc.mvme68k/MAKEDEV | 76 ++++++++++++++++++++++------------------
etc/etc.netwinder/MAKEDEV | 78 ++++++++++++++++++++++-------------------
etc/etc.news68k/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.newsmips/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.next68k/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.pc532/MAKEDEV | 82 ++++++++++++++++++++++++-------------------
etc/etc.playstation2/MAKEDEV | 76 ++++++++++++++++++++++------------------
etc/etc.pmax/MAKEDEV | 68 ++++++++++++++++++++----------------
etc/etc.prep/MAKEDEV | 82 +++++++++++++++++++++++--------------------
etc/etc.sandpoint/MAKEDEV | 82 ++++++++++++++++++++++++-------------------
etc/etc.sgimips/MAKEDEV | 80 +++++++++++++++++++++++-------------------
etc/etc.sparc/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.sparc64/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.sun2/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.sun3/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.vax/MAKEDEV | 78 +++++++++++++++++++++++------------------
etc/etc.walnut/MAKEDEV | 80 +++++++++++++++++++++++-------------------
etc/etc.x68k/MAKEDEV | 77 ++++++++++++++++++++++------------------
38 files changed, 1633 insertions(+), 1337 deletions(-)
diffs (truncated from 4651 to 300 lines):
diff -r 50156146f556 -r 2566cab37b4e etc/etc.acorn32/MAKEDEV
--- a/etc/etc.acorn32/MAKEDEV Sat Feb 02 06:17:56 2002 +0000
+++ b/etc/etc.acorn32/MAKEDEV Sat Feb 02 07:04:44 2002 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: MAKEDEV,v 1.7 2002/01/21 16:19:17 abs Exp $
+# $NetBSD: MAKEDEV,v 1.8 2002/02/02 07:04:44 tls Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -70,7 +70,8 @@
# fcom DC21285 COM port
#
# Pseudo terminals:
-# pty* set of 16 master and slave pseudo terminals
+# pty* set of 62 master and slave pseudo terminals
+# opty first 16 ptys, to save inodes on install media
#
# Printers:
# lpt* stock lp
@@ -127,7 +128,7 @@
all)
sh $0 std wscons fd fd0 fd1 wd0 wd1 wd2 wd3 md0 md1 sd0 sd1 sd2 sd3
- sh $0 tty0 tty1 pty0 pty1 pty2 pty3 st0 st1 ch0 cd0 cd1 vnd0 vnd1
+ sh $0 tty0 tty1 pty0 pty1 st0 st1 ch0 cd0 cd1 vnd0 vnd1
sh $0 ccd0 ccd1 uk0 uk1 ss0
sh $0 raid0 raid1 raid2 raid3 raid4 raid5 raid6 raid7
sh $0 ttyv0
@@ -143,7 +144,7 @@
ramdisk|floppy)
sh $0 std fd0 fd1 wd0 wd1 wd2 wd3 md0 md1 sd0 sd1 sd2 sd3
- sh $0 tty0 tty1 pty0 ttyv0
+ sh $0 tty0 tty1 opty ttyv0
sh $0 st0 st1 cd0 cd1
;;
@@ -368,48 +369,53 @@
chmod 600 $fcom
;;
+
+opty)
+ rm -f ttyp[0-9a-f] ptyp[0-9a-f]
+ for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
+ do
+ case $j in
+ [0-9]) jn=$j ;;
+ a) jn=10 ;;
+ b) jn=11 ;;
+ c) jn=12 ;;
+ d) jn=13 ;;
+ e) jn=14 ;;
+ f) jn=15 ;;
+ esac
+ mknod ttyp$j c 7 $jn
+ mknod ptyp$j c 6 $jn
+ done
+ chgrp wheel ttyp[0-9a-f] ptyp[0-9a-f]
+ chmod 666 ttyp[0-9a-f] ptyp[0-9a-f]
+ ;;
+
pty*)
class=${i#pty}
- case $class in
- 0) name=p;;
- 1) name=q;;
- 2) name=r;;
- 3) name=s;;
- 4) name=t;;
- 5) name=u;;
- 6) name=v
- echo "$0: $i: pty unit conflicts with console ttyv* devices."
+ name=`echo pqrstuvwxyzPQRST | dd bs=1 count=1 skip=$class 2>/dev/null`
+ case $name in
+ v) echo "$0: $i: pty unit conflicts with console ttyv0 device."
continue;;
- 7) name=w;;
- 8) name=x;;
- 9) name=y;;
- 10) name=z;;
- 11) name=P;;
- 12) name=Q;;
- 13) name=R;;
- 14) name=S;;
- 15) name=T;;
+ ?) ;;
*) echo "$0: $i: pty unit must be between 0 and 15"
continue ;;
esac
- rm -f tty$name[0-9a-f] pty$name[0-9a-f]
- for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
+ rm -f tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z]
+ jn=0
+ while [ $jn -lt 62 ]
do
- case $j in
- [0-9]) jn=$j ;;
- a) jn=10 ;;
- b) jn=11 ;;
- c) jn=12 ;;
- d) jn=13 ;;
- e) jn=14 ;;
- f) jn=15 ;;
- esac
- unit=$(($class * 16 + $jn))
+ j=`echo 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ | dd bs=1 count=1 skip=$jn 2>/dev/null`
+ skip=0
+ if [ $jn -ge 16 ]; then
+ skip=$(($class * 30 + 256 - 16))
+ fi
+ unit=$(($class * 62 + $jn + $skip))
mknod tty$name$j c 7 $unit
mknod pty$name$j c 6 $unit
+ jn=$(($jn + 1))
done
- chgrp wheel tty$name? pty$name?
- chmod 666 tty$name? pty$name?
+ chgrp wheel tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z]
+ chmod 666 tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z]
;;
st*)
diff -r 50156146f556 -r 2566cab37b4e etc/etc.alpha/MAKEDEV
--- a/etc/etc.alpha/MAKEDEV Sat Feb 02 06:17:56 2002 +0000
+++ b/etc/etc.alpha/MAKEDEV Sat Feb 02 07:04:44 2002 +0000
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $NetBSD: MAKEDEV,v 1.85 2002/01/21 16:19:18 abs Exp $
+# $NetBSD: MAKEDEV,v 1.86 2002/02/02 07:04:45 tls Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -75,7 +75,8 @@
# 32 ports.
#
# Pseudo terminals:
-# pty* set of 16 master and slave pseudo terminals
+# pty* set of 62 master and slave pseudo terminals
+# opty first 16 ptys, to save inodes on install media
#
# Printers:
# lpt* PC parallel port driver ("lpt") units
@@ -133,7 +134,7 @@
case $i in
all)
- sh $0 std wscons fd sd0 sd1 sd2 sd3 sd4 pty0 pty1 pty2 pty3
+ sh $0 std wscons fd sd0 sd1 sd2 sd3 sd4 pty0 pty1
sh $0 st0 st1 ch0 cd0 cd1 vnd0 vnd1 vnd2 vnd3
sh $0 ccd0 ccd1 ccd2 ccd3 md0 md1 ss0 ss1 uk0 uk1
sh $0 raid0 raid1 raid2 raid3 raid4 raid5 raid6 raid7
@@ -156,7 +157,7 @@
minimal)
sh $0 std
- sh $0 sd0 sd1 sd2 sd3 pty0 st0 st1 ch0 cd0 cd1 ccd0 ccd1 md0
+ sh $0 sd0 sd1 sd2 sd3 opty st0 st1 ch0 cd0 cd1 ccd0 ccd1 md0
sh $0 wd0 wd1 fd0 fd1
sh $0 ttyB0 ttyB1 ttyC0 ttyC1 ttyE0 ttyE1 wsmouse0 wskbd0 ttyEcfg
;;
@@ -436,46 +437,54 @@
chown uucp.wheel ttyC$unit dtyC$unit
;;
+
+opty)
+ rm -f ttyp[0-9a-f] ptyp[0-9a-f]
+ for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
+ do
+ case $j in
+ [0-9]) jn=$j ;;
+ a) jn=10 ;;
+ b) jn=11 ;;
+ c) jn=12 ;;
+ d) jn=13 ;;
+ e) jn=14 ;;
+ f) jn=15 ;;
+ esac
+ mknod ttyp$j c 4 $jn
+ mknod ptyp$j c 5 $jn
+ done
+ chgrp wheel ttyp[0-9a-f] ptyp[0-9a-f]
+ chmod 666 ttyp[0-9a-f] ptyp[0-9a-f]
+ ;;
+
+
pty*)
class=${i#pty}
- case $class in
- 0) name=p;;
- 1) name=q;;
- 2) name=r;;
- 3) name=s;;
- 4) name=t;;
- 5) name=u;;
- 6) name=v;;
- 7) name=w;;
- 8) name=x;;
- 9) name=y;;
- 10) name=z;;
- 11) name=P;;
- 12) name=Q;;
- 13) name=R;;
- 14) name=S;;
- 15) name=T;;
+ name=`echo pqrstuvwxyzPQRST | dd bs=1 count=1 skip=$class 2>/dev/null`
+ case $name in
+ v) echo "$0: $i: pty unit conflicts with console ttyv0 device."
+ continue;;
+ ?) ;;
*) echo "$0: $i: pty unit must be between 0 and 15"
continue ;;
esac
- rm -f tty$name[0-9a-f] pty$name[0-9a-f]
- for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
+ rm -f tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z]
+ jn=0
+ while [ $jn -lt 62 ]
do
- case $j in
- [0-9]) jn=$j ;;
- a) jn=10 ;;
- b) jn=11 ;;
- c) jn=12 ;;
- d) jn=13 ;;
- e) jn=14 ;;
- f) jn=15 ;;
- esac
- unit=$(($class * 16 + $jn))
+ j=`echo 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ | dd bs=1 count=1 skip=$jn 2>/dev/null`
+ skip=0
+ if [ $jn -ge 16 ]; then
+ skip=$(($class * 30 + 256 - 16))
+ fi
+ unit=$(($class * 62 + $jn + $skip))
mknod tty$name$j c 4 $unit
mknod pty$name$j c 5 $unit
+ jn=$(($jn + 1))
done
- chgrp wheel tty$name? pty$name?
- chmod 666 tty$name? pty$name?
+ chgrp wheel tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z]
+ chmod 666 tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z]
;;
st*)
diff -r 50156146f556 -r 2566cab37b4e etc/etc.amiga/MAKEDEV
--- a/etc/etc.amiga/MAKEDEV Sat Feb 02 06:17:56 2002 +0000
+++ b/etc/etc.amiga/MAKEDEV Sat Feb 02 07:04:44 2002 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: MAKEDEV,v 1.67 2002/01/21 16:19:19 abs Exp $
+# $NetBSD: MAKEDEV,v 1.68 2002/02/02 07:04:45 tls Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -82,7 +82,8 @@
# "mouse" ports, if configured.
#
# Pseudo terminals:
-# pty* set of 16 master and slave pseudo terminals
+# pty* set of 62 master and slave pseudo terminals
+# opty first 16 ptys, to save inodes on install media
#
# Printers:
# par0 Amiga motherboard parallel port
@@ -133,7 +134,7 @@
sh $0 tty00 ttyA0 ttyA1
sh $0 ttyB0 ttyB1 ttyB2 ttyB3 ttyB4 ttyB5 ttyB6 ttyB7
sh $0 ttyC0 ttyC1 ttyC2 ttyC3 ttyC4 ttyC5 ttyC6 ttyC7
- sh $0 view00 view01 view02 view03 view04 view05 pty0 pty1 pty2 pty3
+ sh $0 view00 view01 view02 view03 view04 view05 pty0 pty1
sh $0 sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7 sd8 sd9 cd0 st0 wd0 wd1
sh $0 ss0 ch0 uk0 uk1 ccd0 ccd1 ccd2 ccd3 md0 md1
sh $0 raid0 raid1 raid2 raid3 raid4 raid5 raid6 raid7
@@ -146,7 +147,7 @@
;;
floppy)
- sh $0 std fd0 fd1 fd2 fd3 kbd pty0 tun0 tun1
+ sh $0 std fd0 fd1 fd2 fd3 kbd opty tun0 tun1
sh $0 ttye0 ttye1 ttye2 ttye3 ttye4 ttye5 ttye6 ttye7
sh $0 grf0 grf1 grf2 grf3 grf4 grf5 grf6 grf7
sh $0 tty00 ttyA0 ttyB0 ttyC0
@@ -492,46 +493,54 @@
chmod 600 $wskbd
;;
+
+opty)
+ rm -f ttyp[0-9a-f] ptyp[0-9a-f]
+ for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
+ do
+ case $j in
+ [0-9]) jn=$j ;;
+ a) jn=10 ;;
Home |
Main Index |
Thread Index |
Old Index