diff options
Diffstat (limited to 'util/iov.c')
-rw-r--r-- | util/iov.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/iov.c b/util/iov.c index 9ac0261853..5059e10431 100644 --- a/util/iov.c +++ b/util/iov.c @@ -401,6 +401,16 @@ static struct iovec *qiov_slice(QEMUIOVector *qiov, return iov; } +int qemu_iovec_subvec_niov(QEMUIOVector *qiov, size_t offset, size_t len) +{ + size_t head, tail; + int niov; + + qiov_slice(qiov, offset, len, &head, &tail, &niov); + + return niov; +} + /* * Compile new iovec, combining @head_buf buffer, sub-qiov of @mid_qiov, * and @tail_buf buffer into new qiov. |