sg: fix short reads
authorJens Axboe <axboe@fb.com>
Wed, 30 Sep 2015 16:31:12 +0000 (18:31 +0200)
committerJens Axboe <axboe@fb.com>
Wed, 30 Sep 2015 16:31:12 +0000 (18:31 +0200)
commit14d0261ecd26020dfc114e1240c35e6dcca14cff
tree6949beefe97fb793a34eeb1b12f2a1688d5ef551
parent18dc4295f53c83af3feba6861b5bdbaf09d720fe
sg: fix short reads

We can't assume that if we read some data, we read all of it.
Check for this condition.

Don't error out if a read failed, but we already got valid
events.

Signed-off-by: Jens Axboe <axboe@fb.com>
engines/sg.c