From: Michael S. Tsirkin Date: Mon, 24 Sep 2012 10:50:32 +0000 (+0200) Subject: iov: add const annotation X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=844b5cea8ea6cbe964670a26d1b34037067569df;p=qemu.git iov: add const annotation iov_from_buf does not change iov, make it const. Signed-off-by: Michael S. Tsirkin --- diff --git a/iov.c b/iov.c index 60705c73ab..c6a66f0afe 100644 --- a/iov.c +++ b/iov.c @@ -26,7 +26,7 @@ # include #endif -size_t iov_from_buf(struct iovec *iov, unsigned int iov_cnt, +size_t iov_from_buf(const struct iovec *iov, unsigned int iov_cnt, size_t offset, const void *buf, size_t bytes) { size_t done; diff --git a/iov.h b/iov.h index 381f37a546..a73569f94e 100644 --- a/iov.h +++ b/iov.h @@ -36,7 +36,7 @@ size_t iov_size(const struct iovec *iov, const unsigned int iov_cnt); * such "large" value is -1 (sinice size_t is unsigned), * so specifying `-1' as `bytes' means 'up to the end of iovec'. */ -size_t iov_from_buf(struct iovec *iov, unsigned int iov_cnt, +size_t iov_from_buf(const struct iovec *iov, unsigned int iov_cnt, size_t offset, const void *buf, size_t bytes); size_t iov_to_buf(const struct iovec *iov, const unsigned int iov_cnt, size_t offset, void *buf, size_t bytes);