From owner-freebsd-bugs Tue Sep 19 1:40: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5356C37B423 for ; Tue, 19 Sep 2000 01:40:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id BAA65723; Tue, 19 Sep 2000 01:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from fun.ee.lbl.gov (fun.ee.lbl.gov [131.243.1.81]) by hub.freebsd.org (Postfix) with ESMTP id ACF8237B423 for ; Tue, 19 Sep 2000 01:31:49 -0700 (PDT) Received: (from leres@localhost) by fun.ee.lbl.gov (8.11.0/8.11.0) id e8J8Vn824409; Tue, 19 Sep 2000 01:31:49 -0700 (PDT) Message-Id: <200009190831.e8J8Vn824409@fun.ee.lbl.gov> Date: Tue, 19 Sep 2000 01:31:49 PDT From: Craig Leres To: FreeBSD-gnats-submit@freebsd.org Cc: leres@ee.lbl.gov (Craig Leres) X-Send-Pr-Version: 3.2 Subject: bin/21394: [PATCH] MAKEDEV creates rocketport specials in /dev (instead of cwd) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 21394 >Category: bin >Synopsis: [PATCH] MAKEDEV creates rocketport specials in /dev (instead of cwd) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Sep 19 01:40:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Craig Leres >Release: FreeBSD 4.1-RELEASE i386 >Organization: Lawrence Berkeley National Laboratory >Environment: >Description: The rocketport devices (ttyR and cuaR) are the only MAKEDEV targets that don't create the specials in the current working directory. (Also, it's kind of lame to read the number of rocketport ports from dmesg. If the system has been up very long, the autoconf messages are long gone; using /var/run/dmesg.boot would be slightly better. But it would probably be best to just create N specials, thus allowing one to configure a filesystem in advance.) >How-To-Repeat: # cd /mnt/dev # ./MAKEDEV ttyR0 cuaR0 Then notice that the new specials end up in /dev, not /mnt/dev. (Or especially how the specials that were in /dev now have default permissions!) >Fix: Appended is a context diff to etc/MAKEDEV. It remove the /dev prefixes. (My patch does not address the dmesg issue.) =================================================================== RCS file: RCS/MAKEDEV,v retrieving revision 1.1 diff -c -r1.1 MAKEDEV *** MAKEDEV 2000/09/18 22:03:18 1.1 --- MAKEDEV 2000/09/18 22:03:51 *************** *** 1196,1202 **** esac done ) ! rm -f /dev/ttyR* /dev/ttyiR* /dev/ttylR* for i in $controllers; do ndevices=$( dmesg | while read first bar ports rest; do --- 1196,1202 ---- esac done ) ! rm -f ttyR* ttyiR* ttylR* for i in $controllers; do ndevices=$( dmesg | while read first bar ports rest; do *************** *** 1210,1218 **** echo -n "Creating $ndevices devices for $i: " dev=0 while [ $dev -lt $ndevices ]; do ! mknod /dev/ttyR$Rnum c $major $MINOR ! mknod /dev/ttyiR$Rnum c $major $(($MINOR + 32)) ! mknod /dev/ttylR$Rnum c $major $(($MINOR + 64)) Rnum=$(($Rnum + 1)) MINOR=$(($MINOR + 1)) dev=$(($dev + 1)) --- 1210,1218 ---- echo -n "Creating $ndevices devices for $i: " dev=0 while [ $dev -lt $ndevices ]; do ! mknod ttyR$Rnum c $major $MINOR ! mknod ttyiR$Rnum c $major $(($MINOR + 32)) ! mknod ttylR$Rnum c $major $(($MINOR + 64)) Rnum=$(($Rnum + 1)) MINOR=$(($MINOR + 1)) dev=$(($dev + 1)) *************** *** 1236,1242 **** esac done ) ! rm -f /dev/cuaR* /dev/cuaiR* /dev/cualR* for i in $controllers; do ndevices=$( dmesg | while read first bar ports rest; do --- 1236,1242 ---- esac done ) ! rm -f cuaR* cuaiR* cualR* for i in $controllers; do ndevices=$( dmesg | while read first bar ports rest; do *************** *** 1250,1259 **** echo -n "Creating $ndevices devices for $i: " dev=0 while [ $dev -lt $ndevices ]; do ! mknod /dev/cuaR$Rnum c $major $(($MINOR + 128)) uucp:dialer ! mknod /dev/cuaiR$Rnum c $major $(($MINOR + 128 + 32)) \ uucp:dialer ! mknod /dev/cualR$Rnum c $major $(($MINOR + 128 + 64)) \ uucp:dialer Rnum=$(($Rnum + 1)) MINOR=$(($MINOR + 1)) --- 1250,1259 ---- echo -n "Creating $ndevices devices for $i: " dev=0 while [ $dev -lt $ndevices ]; do ! mknod cuaR$Rnum c $major $(($MINOR + 128)) uucp:dialer ! mknod cuaiR$Rnum c $major $(($MINOR + 128 + 32)) \ uucp:dialer ! mknod cualR$Rnum c $major $(($MINOR + 128 + 64)) \ uucp:dialer Rnum=$(($Rnum + 1)) MINOR=$(($MINOR + 1)) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message