From owner-freebsd-stable Fri Aug 29 05:05:00 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA29416 for stable-outgoing; Fri, 29 Aug 1997 05:05:00 -0700 (PDT) Received: from rz114s1.rz.uni-karlsruhe.de (rz114s1.rz.uni-karlsruhe.de [129.13.92.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA29403 for ; Fri, 29 Aug 1997 05:04:54 -0700 (PDT) Received: (from un1i@localhost) by rz114s1.rz.uni-karlsruhe.de (8.7.1/8.7.1) id OAA27645 for freebsd-stable@freebsd.org; Fri, 29 Aug 1997 14:04:44 +0200 (CES) Message-Id: <199708291204.OAA27645@rz114s1.rz.uni-karlsruhe.de> Subject: MAKEDEV error To: freebsd-stable@freebsd.org Date: Fri, 29 Aug 1997 14:04:44 +0200 (CES) Reply-to: un1i@rz.uni-karlsruhe.de From: un1i@rz.uni-karlsruhe.de (Philipp Mergenthaler) X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello, [followup to a posting in c.u.b.f.m and mailed to freebsd-stable] serge@oneway.net wrote: > I buy a CD-R today and install on my FBSD box, after compiling > kernel and reboot, > > cd /dev/ > ./MAKEDEV worm0 > > result > > ./MAKEDEV: arith: syntax error: "" > > Help ....! I noticed the same error after cvsup'ing 2.2-RELENG (on 1997-08-25). The error occurs in expressions with the shift-left-operator, e.g.: # Control bit for SCSI scsictl=$((1 << 29)) When you remove one of the blanks surrounding the "<<", e.g.: scsictl=$((1 <<29)) the line is executed correctly! So just edit every occurance (there's another line where the operator occurs several times). At least, that worked for me...(I don't have a CD-R) This is really a strange error - it only happens, when -there are arbitrary (not totally sure) commands before the line with "<<" -the value to the right of the operator is 10 or higher (hm, is this because 1023 is some magic limit or because 10 is the first number with 2 digits?) - I should probably mention that I don't have SCSI. (BTW, what is scsictl? I didn't find a man page or other info.) (At least that's what I found out from playing with the above line. I didn't look much at the other occasion, which is this: dkminor() { echo $(($1 <<25 | ($2 / 32) <<21 | ($2 % 32) <<3 | $3 <<16 | $4)) } dkminor is called several times) The most minimalistic script where the error happens is: #!/bin/sh foo=1 export foo scsictl=$((1 << 10)) but it doesn't happen in: #!/bin/sh foo=1; export foo scsictl=$((1 << 10)) Now, what is the real error and what are merely preconditions? :-) Bye, Philipp -- P. Mergenthaler, un1i@rz.uni-karlsruhe.de | Tel.: 0721/694532 | Klosterweg 28 / I609, 76131 Karlsruhe | http://www.uni-karlsruhe.de/~un1i/ |