[patch] applied: dumpvacroots-fix

3 views
Skip to first unread message

9cha...@cat-v.org

unread,
Apr 25, 2008, 3:41:25 PM4/25/08
to plan9c...@googlegroups.com
Created Apr 25 13:41 by stevesimon
Processed Apr 25 19:41 by geoff


The format of the data printed by printarenas has
changed between oventi and nventi, also changed the
port for venti's web server which is 8000 by default.

-Steve

--
/sys/src/cmd/venti/words/dumpvacroots
dumpvacroots.orig:4,19 - /n/sources/patch/applied/dumpvacroots-fix/dumpvacroots:4,21
# to the physical disks storing the archive!

ventihttp=`{echo $venti | sed 's/^[a-z]+!([0-9\.]+)![a-z0-9]+$/\1/
- s/^[a-z]+!([0-9\.]+)/\1/; s/$/:80/'
+ s/^[a-z]+!([0-9\.]+)/\1/; s/$/:8000/'
}

hget http://$ventihttp/index |
awk '
- /^index=/ { blockSize=0+substr($3, 11) }
- /^arena=/ { arena=substr($1, 7) }
- /^ arena=/ {
- start = (0+substr($5, 2))-blockSize
- printf("venti/printarena -o %.0f %s\n", start, $3 "")
- }' |
+ /^index=/ { blockSize=0+substr($3, 11) }
+ /^arena=/ { arena=substr($1, 7) }
+ /^ arena=/ {
+ start = (0+substr($5, 2))-blockSize
+ printf("venti/printarena -o %.0f %s\n", start, $3 "")
+ }
+ ' |
rc |
- sed -n 's/^(.*) 1$/vac:\1/p'
+ awk '$3==16 {printf("vac:%s\n", $2)}'
+

Reply all
Reply to author
Forward
0 new messages