From owner-freebsd-questions Wed Dec 20 16:58:35 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA27199 for questions-outgoing; Wed, 20 Dec 1995 16:58:35 -0800 (PST) Received: from hub.org (hub.org [199.166.238.138]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id QAA27188 for ; Wed, 20 Dec 1995 16:58:27 -0800 (PST) Received: (from scrappy@localhost) by hub.org (8.7.3/8.7.3) id TAA15702; Wed, 20 Dec 1995 19:57:34 -0500 (EST) Date: Wed, 20 Dec 1995 19:57:28 -0500 (EST) From: "Marc G. Fournier" To: steve hovey cc: freebsd-questions@FreeBSD.org Subject: Re: Making more pty's In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.org Precedence: bulk On Wed, 20 Dec 1995, steve hovey wrote: > > I know Im pushing my luck today - but. > > If I want more than 32 pty's, what do I name them? > > I assume I keep the major number of the other ptyp and ttyp's and just > keep incrementing the minor - > > But what of the names? They currently end at ttypv - would I go > ttypw,x,y,z then ttyq0??? > Take a look at /dev/MAKEDEV, in particular, the following section. MAKEDEV pty1 should give you ptyq*: pty*) class=`expr $i : 'pty\(.*\)'` case $class in 0) offset=0 name=p;; 1) offset=32 name=q;; 2) offset=64 name=r;; 3) offset=96 name=s;; # Note that xterm (at least) only look at p-s. 4) offset=128 name=P;; 5) offset=160 name=Q;; 6) offset=192 name=R;; 7) offset=224 name=S;; # This still leaves [tuTU]. *) echo bad unit for pty in: $i;; esac case $class in 0|1|2|3|4|5|6|7) umask 0 eval `echo $offset $name | awk ' { b=$1; n=$2 } END { \ for (i = 0; i < 32; i++) { c = substr("0123456789abcdefghijklmnopqrstuv", i + 1, 1); \ printf("rm -f tty%s%s pty%s%s; \ mknod tty%s%s c 5 %d; \ mknod pty%s%s c 6 %d; \ chown root.wheel tty%s%s pty%s%s;", \ n, c, n, c, \ n, c, b+i, \ n, c, b+i, \ n, c, n, c); \ } \ }'` umask 77 ;; esac ;; Marc G. Fournier | POP Mail Telnet Acct DNS Hosting scrappy@hub.org | WWW Services Database Services | Knowledge, soon to be: | | Information and scrappy@ki.net | WWW: http://hub.org | Communications, Inc