Date: Fri, 29 Aug 1997 14:04:44 +0200 (CES) From: un1i@rz.uni-karlsruhe.de (Philipp Mergenthaler) To: freebsd-stable@freebsd.org Subject: MAKEDEV error Message-ID: <199708291204.OAA27645@rz114s1.rz.uni-karlsruhe.de>
next in thread | raw e-mail | index | archive | help
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/ |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708291204.OAA27645>
