Subject: Re: MAKEDEV is not portable
To: None <port-sparc@netbsd.org>
From: Robert Evans <r.evans@ic.ac.uk>
List: port-sparc
Date: 01/06/1999 23:11:43
> mkdisk_arith() {
>   mknod $1 b $2 $(($3 * 16 + $4))
> }
> mkdisk_expr() {
>   mknod $1 b $2 `expr $3 * 16 + $4`
> }

This works fine if you pass it to ksh under Solaris, which can handle
the arithmetic, but if you are using a shell where you have to use the
mknod_expr() version (e.g. SunOS /bin/sh), then I think the shell is
going to barf parsing mkdisk_arith(), and so you are no further
forward...  :-(

This is probably why pk has to do the extra eval in his version.

Cheers,
Rob