aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/venti
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2009-02-04 21:55:03 -0800
committerRuss Cox <rsc@swtch.com>2009-02-04 21:55:03 -0800
commitfd0a0b2a6216ae9b1773da719c3c0e53ff2e87c8 (patch)
tree417d5d72d374bbad94e55474cdbcc58cae80667c /src/cmd/venti
parentee85defda48d1d6b7c18b9fab7140c6598d2f658 (diff)
downloadplan9port-fd0a0b2a6216ae9b1773da719c3c0e53ff2e87c8.tar.gz
plan9port-fd0a0b2a6216ae9b1773da719c3c0e53ff2e87c8.tar.bz2
plan9port-fd0a0b2a6216ae9b1773da719c3c0e53ff2e87c8.zip
venti/copy: no rewriting unless rewrite flag is set (Nathaniel W Filardo)
Diffstat (limited to 'src/cmd/venti')
-rw-r--r--src/cmd/venti/copy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/venti/copy.c b/src/cmd/venti/copy.c
index 3c3996c9..7e03b56c 100644
--- a/src/cmd/venti/copy.c
+++ b/src/cmd/venti/copy.c
@@ -55,7 +55,8 @@ walk(uchar score[VtScoreSize], uint type, int base)
}
walk(root.score, VtDirType, 0);
walk(root.prev, VtRootType, 0);
- vtrootpack(&root, buf); /* walk might have changed score */
+ if(rewrite)
+ vtrootpack(&root, buf); /* walk might have changed score */
break;
case VtDirType:
@@ -67,7 +68,8 @@ walk(uchar score[VtScoreSize], uint type, int base)
if(!(e.flags & VtEntryActive))
continue;
walk(e.score, e.type, e.type&VtTypeBaseMask);
- vtentrypack(&e, buf, i);
+ if(rewrite)
+ vtentrypack(&e, buf, i);
}
break;