plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit fd0a0b2a6216ae9b1773da719c3c0e53ff2e87c8
parent ee85defda48d1d6b7c18b9fab7140c6598d2f658
Author: Russ Cox <rsc@swtch.com>
Date:   Wed,  4 Feb 2009 21:55:03 -0800

venti/copy: no rewriting unless rewrite flag is set (Nathaniel W Filardo)

Diffstat:
Msrc/cmd/venti/copy.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 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;