mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
uio: make import_iovec()/compat_import_iovec() return bytes on success
Currently these functions return < 0 on error, and 0 for success. Change that so that we return < 0 on error, but number of bytes for success. Some callers already treat the return value that way, others need a slight tweak. Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
61939b12dc
commit
87e5e6dab6
7 changed files with 31 additions and 27 deletions
|
|
@ -80,9 +80,10 @@ int get_compat_msghdr(struct msghdr *kmsg,
|
|||
|
||||
kmsg->msg_iocb = NULL;
|
||||
|
||||
return compat_import_iovec(save_addr ? READ : WRITE,
|
||||
err = compat_import_iovec(save_addr ? READ : WRITE,
|
||||
compat_ptr(msg.msg_iov), msg.msg_iovlen,
|
||||
UIO_FASTIOV, iov, &kmsg->msg_iter);
|
||||
return err < 0 ? err : 0;
|
||||
}
|
||||
|
||||
/* Bleech... */
|
||||
|
|
|
|||
Loading…
Reference in a new issue