Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/etc.i386 allow "sh MAKEDEV ttyNN", where NN is 00 to 99.
details: https://anonhg.NetBSD.org/src/rev/3b54723c9fe7
branches: trunk
changeset: 480300:3b54723c9fe7
user: itojun <itojun%NetBSD.org@localhost>
date: Sun Jan 09 02:37:06 2000 +0000
description:
allow "sh MAKEDEV ttyNN", where NN is 00 to 99.
single-digit "sh MAKEDEV ttyN" works in backward-compatible way.
XXX should bring it to other ports as well?
diffstat:
etc/etc.i386/MAKEDEV | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r e0790fb03a87 -r 3b54723c9fe7 etc/etc.i386/MAKEDEV
--- a/etc/etc.i386/MAKEDEV Sun Jan 09 02:23:21 2000 +0000
+++ b/etc/etc.i386/MAKEDEV Sun Jan 09 02:37:06 2000 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: MAKEDEV,v 1.98 1999/12/18 03:09:47 tsutsui Exp $
+# $NetBSD: MAKEDEV,v 1.99 2000/01/09 02:37:06 itojun Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -388,11 +388,18 @@
;;
com*|tty*) # (XXX -- com should die)
- unit=${i#???}
- rm -f com$unit tty0$unit dty0$unit
- mknod tty0$unit c 8 $(($unit + $dialin ))
- mknod dty0$unit c 8 $(($unit + $dialout))
- chown uucp.wheel tty0$unit dty0$unit
+ ounit=${i#???}
+ ounit=$(($ounit + 0))
+ if [ $ounit -lt 10 ]; then
+ unit=0$ounit
+ rm -f com$ounit
+ else
+ unit=$ounit
+ fi
+ rm -f tty$unit dty$unit
+ mknod tty$unit c 8 $(($ounit + $dialin ))
+ mknod dty$unit c 8 $(($ounit + $dialout))
+ chown uucp.wheel tty$unit dty$unit
;;
pty*)
Home |
Main Index |
Thread Index |
Old Index