#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/cmd/exportfs . # srcdir: /n/juke/plan_9/sys/src/cmd/exportfs # version: 905183967 # date: Mon Sep 7 11:59:27 EDT 1998 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 905183967 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/cmd/exportfs case 1 srcdir=$1 case * usage } if(! ~ $doextract yes){ echo This shell file contains a bundle of diffs representing changes echo to original source files in the Plan 9 distribution. It will run echo against the files in echo ' ' $srcdir echo '(unless overridden by the optional source directory argument)' echo and create a directory 905183967 containing the updated files. echo It will NOT automatically update the original files. echo echo Invoke with argument -X to perform the actual extraction. exit 0 } rm -rf 905183967 mkdir 905183967 target=905183967/exportfs.c echo -n '905183967/exportfs.c: ' if(! test -f $srcdir/exportfs.c || ! test -r $srcdir/exportfs.c){ echo $srcdir/exportfs.c unreadable exit unreadable } sum=`{sum < $srcdir/exportfs.c} if(! ~ ee6105706794 $sum(1)^$sum(2)){ echo $srcdir/exportfs.c is not the original distribution file exit original } cp $srcdir/exportfs.c 905183967/exportfs.c ed 905183967/exportfs.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM exportfs.c' 364c psmpt->qid.path = dir.qid.path; . 352c root->qid.path = dir.qid.path; . 334c f->parent = parent; f->childlist = parent->child; parent->child = f; f = f; } f->qid.vers = dir.qid.vers; f->qid.path = dir.qid.path; f->inval = 0; return f; . 330,332c if(f == nil){ f = malloc(sizeof(File)); if(f == 0) fatal("no memory"); memset(f, 0, sizeof(File)); strcpy(f->name, name); . 325,328c for(f = parent->child; f; f = f->childlist) if(strcmp(name, f->name) == 0) break; . 320,323d 313,316d 311c DEBUG(2, "\tfile: 0x%p %s name %s\n", parent, parent->name, name); . 309c File *f; . 164c DEBUG(2, "%F\n", &r->work); . wq //GO.SYSIN DD VADIM exportfs.c sum=`{sum < 905183967/exportfs.c} if(~ 4ab032e66764 $sum(1)^$sum(2)) echo if not{ echo 905183967/exportfs.c checksum error creating updated file exit checksum } target=905183967/exportfs.h echo -n '905183967/exportfs.h: ' if(! test -f $srcdir/exportfs.h || ! test -r $srcdir/exportfs.h){ echo $srcdir/exportfs.h unreadable exit unreadable } sum=`{sum < $srcdir/exportfs.h} if(! ~ c6a04df92150 $sum(1)^$sum(2)){ echo $srcdir/exportfs.h is not the original distribution file exit original } cp $srcdir/exportfs.h 905183967/exportfs.h ed 905183967/exportfs.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM exportfs.h' 79d 38a int inval; . wq //GO.SYSIN DD VADIM exportfs.h sum=`{sum < 905183967/exportfs.h} if(~ f298572b2146 $sum(1)^$sum(2)) echo if not{ echo 905183967/exportfs.h checksum error creating updated file exit checksum } target=905183967/exportsrv.c echo -n '905183967/exportsrv.c: ' if(! test -f $srcdir/exportsrv.c || ! test -r $srcdir/exportsrv.c){ echo $srcdir/exportsrv.c unreadable exit unreadable } sum=`{sum < $srcdir/exportsrv.c} if(! ~ abc5cbf211278 $sum(1)^$sum(2)){ echo $srcdir/exportsrv.c is not the original distribution file exit original } cp $srcdir/exportsrv.c 905183967/exportsrv.c ed 905183967/exportsrv.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM exportsrv.c' 336c /* * If the walk fails, there is an implicit clunk of newfid. * -- clwalk(5) */ if(XXwalk(r) < 0) { if(n->fid >= 0) close(n->fid); freefid(r->work.newfid); } . 274a f->f->inval = 1; . 158a Xwalk(Fsrpc *r) { XXwalk(r); } void . 155a return 0; . 149c return -1; . 141c return 0; . 135c return -1; . 128c return -1; . 116,117c int XXwalk(Fsrpc *r) . wq //GO.SYSIN DD VADIM exportsrv.c sum=`{sum < 905183967/exportsrv.c} if(~ 33d7cb6711524 $sum(1)^$sum(2)) echo if not{ echo 905183967/exportsrv.c checksum error creating updated file exit checksum }