Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc Revert to decemal numbering. From talking w/ Jason, we r...
details: https://anonhg.NetBSD.org/src/rev/2f26ceb2fec9
branches: trunk
changeset: 487604:2f26ceb2fec9
user: wrstuden <wrstuden%NetBSD.org@localhost>
date: Fri Jun 09 17:58:29 2000 +0000
description:
Revert to decemal numbering. From talking w/ Jason, we really should
support more than 256 ports. That would mean 3 digits in hex, and I
don't want to write the script for that..
diffstat:
etc/etc.i386/MAKEDEV | 40 +++++++++++++++-------------------------
etc/etc.macppc/MAKEDEV | 39 +++++++++++++++------------------------
2 files changed, 30 insertions(+), 49 deletions(-)
diffs (137 lines):
diff -r 1098d6167e17 -r 2f26ceb2fec9 etc/etc.i386/MAKEDEV
--- a/etc/etc.i386/MAKEDEV Fri Jun 09 17:14:06 2000 +0000
+++ b/etc/etc.i386/MAKEDEV Fri Jun 09 17:58:29 2000 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: MAKEDEV,v 1.116 2000/06/09 16:59:03 wrstuden Exp $
+# $NetBSD: MAKEDEV,v 1.117 2000/06/09 17:58:29 wrstuden Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -73,7 +73,7 @@
# com* standard PC COM ports (XXX)
# tty* alias for PC COM ports, this is what the system really wants
# ttyCZ* Cyclades-Z multiport serial boards. Each "unit"
-# makes 16 ports.
+# makes 64 ports.
#
# Pseudo terminals:
# pty* set of 16 master and slave pseudo terminals
@@ -417,35 +417,25 @@
ttyCZ*)
unit=${i#ttyCZ}
- case $unit in
- [0-9]) un=$unit ;;
- a) un=10 ;;
- b) un=11 ;;
- c) un=12 ;;
- d) un=13 ;;
- e) un=14 ;;
- f) un=15 ;;
- esac
major=73
- 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
- minor=$(($un * 16 + $jn))
- nminor=$unit$j
-#
+ minor=$(($unit * 64))
+ eminor=$(($minor + 64))
+ while [ $minor -lt $eminor ]; do
+ if [ $minor -lt 10 ]; then
+ nminor=000$minor
+ elif [ $minor -lt 100 ]; then
+ nminor=00$minor
+ elif [ $minor -lt 1000 ]; then
+ nminor=0$minor
+ else
+ nminor=$minor
+ fi
rm -f ttyCZ$nminor dtyCZ$nminor
mknod ttyCZ$nminor c $major $(($minor + $dialin ))
mknod dtyCZ$nminor c $major $(($minor + $dialout ))
chown uucp.wheel ttyCZ$nminor dtyCZ$nminor
chmod 600 ttyCZ$nminor dtyCZ$nminor
+ minor=$(($minor + 1))
done
;;
diff -r 1098d6167e17 -r 2f26ceb2fec9 etc/etc.macppc/MAKEDEV
--- a/etc/etc.macppc/MAKEDEV Fri Jun 09 17:14:06 2000 +0000
+++ b/etc/etc.macppc/MAKEDEV Fri Jun 09 17:58:29 2000 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: MAKEDEV,v 1.27 2000/06/09 16:59:05 wrstuden Exp $
+# $NetBSD: MAKEDEV,v 1.28 2000/06/09 17:58:31 wrstuden Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -63,7 +63,7 @@
# Terminal ports:
# tty* standard built-in serial ports
# ttyCZ* Cyclades-Z multiport serial boards. Each "unit"
-# makes 16 ports.
+# makes 64 ports.
#
# Pseudo terminals:
# pty* set of 16 master and slave pseudo terminals
@@ -257,34 +257,25 @@
ttyCZ*)
unit=${i#ttyCZ}
- case $unit in
- [0-9]) un=$unit ;;
- a) un=10 ;;
- b) un=11 ;;
- c) un=12 ;;
- d) un=13 ;;
- e) un=14 ;;
- f) un=15 ;;
- esac
major=46
- 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
- minor=$(($un * 16 + $jn))
- nminor=$unit$j
+ minor=$(($unit * 64))
+ eminor=$(($minor + 64))
+ while [ $minor -lt $eminor ]; do
+ if [ $minor -lt 10 ]; then
+ nminor=000$minor
+ elif [ $minor -lt 100 ]; then
+ nminor=00$minor
+ elif [ $minor -lt 1000 ]; then
+ nminor=0$minor
+ else
+ nminor=$minor
+ fi
rm -f ttyCZ$nminor dtyCZ$nminor
mknod ttyCZ$nminor c $major $(($minor + $dialin ))
mknod dtyCZ$nminor c $major $(($minor + $dialout ))
chown uucp.wheel ttyCZ$nminor dtyCZ$nminor
chmod 600 ttyCZ$nminor dtyCZ$nminor
+ minor=$(($minor + 1))
done
;;
Home |
Main Index |
Thread Index |
Old Index