commit 828005e43486131db419b5bf982e2bb58e317342
parent 2b7e0d40f941846a3c03ac46cf2319fc850ac4a4
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date: Tue, 7 Sep 2010 21:09:38 +0200
AUTOGEN: allob, chan
Diffstat:
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/9vx/a/AUTOGEN b/src/9vx/a/AUTOGEN
@@ -108,6 +108,11 @@ if [ $# -gt 1 ] && [ $1 == "-r" ]; then
shift 2
fi
+if [ ! -d $plan9/sys/src ]; then
+ echo "$0 error: $plan9/sys/src is not a directory" 1>&2
+ exit 1
+fi
+
case "$#" in
0)
;;
@@ -117,6 +122,7 @@ esac
for f in $autofiles
do
+ test -f $plan9/$f || echo "$0 error: $plan9/$f not found" 1>&2
ed=`echo $f | sed 's;.*/;;; s;\.[ch]$;;; s;$;.ed;'`
test -f $ed || ed=`echo $f | sed 's;.*/;;; s;$;.ed;'`
out=`echo $f | sed 's;.*/;;;'`
diff --git a/src/9vx/a/allocb.ed b/src/9vx/a/allocb.ed
@@ -1,7 +1,7 @@
-,s!Lock;!Lock lk;!
+,s!Lock;!Lock lk;!g
,s!lock(&ialloc)!lock(\&ialloc.lk)!g
-,s!msize(b)!sizeof(Block)+size+Hdrspc!
-,s/exit(0)/panic("iallocb")/
+,s!msize(b)!sizeof(Block)+size+Hdrspc!g
+,s!exit(0)!panic("iallocb")!g
/_xinc/d
/_xdec/s/ ||.*0//
,s/ref < 0/0/
diff --git a/src/9vx/a/chan.ed b/src/9vx/a/chan.ed
@@ -23,7 +23,7 @@ g/^cl/ s/(void\*)/(void *v)/
.
,s/(ulong)name < KZERO/isuaddr(name)/
/validaddr/d
-/ename = vmemchr(name, 0, (1<<16))/c
+/ename = memchr(name, 0, (1<<16))/c
char *p;
uint t;
p = name;