summaryrefslogtreecommitdiff
path: root/sys/src/cmd/fcp.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-07-14 20:44:34 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-07-14 20:44:34 +0200
commitea7bca1829c6ba924599a2c8bc8e0c18404db6a1 (patch)
treeb49ef0f40c84d01be8c5bc74c12ce683f7426338 /sys/src/cmd/fcp.c
parent2aa2f9f359a84b25c0a2ed488c4d0319c9ea8c55 (diff)
fcp: fix wrong write pointer offset when read returns less than DEFB bytes
Diffstat (limited to 'sys/src/cmd/fcp.c')
-rw-r--r--sys/src/cmd/fcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/fcp.c b/sys/src/cmd/fcp.c
index 79bbc1258..aacab8466 100644
--- a/sys/src/cmd/fcp.c
+++ b/sys/src/cmd/fcp.c
@@ -204,7 +204,7 @@ worker(int fdf, int fdt, char *from, char *to)
fprint(2, "reading %s at %lld: %r\n", from, o);
_exits("bad");
}
- if(pwrite(fdt, buf, n, o) != n){
+ if(pwrite(fdt, bp, n, o) != n){
fprint(2, "writing %s: %r\n", to);
_exits("bad");
}