diff options
author | Zach Brown <zab@redhat.com> | 2013-01-17 16:36:48 -0800 |
---|---|---|
committer | Zach Brown <zab@redhat.com> | 2013-02-05 16:09:38 -0800 |
commit | ba4791fde3495c04648038c7376f21bd7b3298a6 (patch) | |
tree | 55e393dbb627eef7e13e581bdf6fa85c92e0a42b | |
parent | d86394da233c4305fb72daf72914cbb193373e1d (diff) |
btrfs-progs: fix copy-n-paste error checking
copy_one_inline() meant to test the return of pwrite() with ram_size.
Presumably the comparison with len was copied from the test earlier in
the function.
Signed-off-by: Zach Brown <zab@redhat.com>
-rw-r--r-- | restore.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -173,7 +173,7 @@ static int copy_one_inline(int fd, struct btrfs_path *path, u64 pos) done = pwrite(fd, outbuf, ram_size, pos); free(outbuf); - if (done < len) { + if (done < ram_size) { fprintf(stderr, "Short compressed inline write, wanted %d, " "did %zd: %d\n", ram_size, done, errno); return -1; |