X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=send-stream.c;h=78f2571ae40be82cbce1b7eb40e80c5293acd6c8;hb=8d6c4447823fa73e928e43f3c2f90f1da0ad5a47;hp=920c7420bdfdf58279749c8d780119e2b409b813;hpb=bb2c0e23d891416b724dd0e72f83aa0d035849c3;p=platform%2Fupstream%2Fbtrfs-progs.git diff --git a/send-stream.c b/send-stream.c index 920c742..78f2571 100644 --- a/send-stream.c +++ b/send-stream.c @@ -74,7 +74,7 @@ static int read_buf(struct btrfs_send_stream *sctx, char *buf, size_t len) ret = 0; out_eof: - if (pos < len) { + if (0 < pos && pos < len) { error("short read from stream: expected %zu read %zu", len, pos); ret = -EIO; } else { @@ -492,7 +492,7 @@ int btrfs_read_and_process_send_stream(int fd, if (ret < 0) goto out; if (ret) { - ret = 1; + ret = -ENODATA; goto out; }