Commit 1f41be7d authored by David Disseldorp's avatar David Disseldorp Committed by Jens Axboe

lib/scatterlist: use consistent sg_copy_buffer() return type

sg_copy_buffer() returns a size_t with the number of bytes copied.
Return 0 instead of false if the copy is skipped.
Signed-off-by: default avatarDavid Disseldorp <ddiss@suse.de>
Reviewed-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 24bb45fd
...@@ -933,7 +933,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, ...@@ -933,7 +933,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
sg_miter_start(&miter, sgl, nents, sg_flags); sg_miter_start(&miter, sgl, nents, sg_flags);
if (!sg_miter_skip(&miter, skip)) if (!sg_miter_skip(&miter, skip))
return false; return 0;
while ((offset < buflen) && sg_miter_next(&miter)) { while ((offset < buflen) && sg_miter_next(&miter)) {
unsigned int len; unsigned int len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment