From e4d5639dbb6181ebbfdb554f2594721b2d63882b Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Tue, 27 Apr 2010 18:04:05 +0530 Subject: iov: Introduce a new file for helpers around iovs, add iov_from_buf() The virtio-net code uses iov_fill() which fills an iov from a linear buffer. The virtio-serial-bus code does something similar in an open-coded function. Create a new iov.c file that has iov_from_buf(). Convert virtio-net and virtio-serial-bus over to use this functionality. virtio-net used ints to hold sizes, the new function is going to use size_t types. Later commits will add the opposite functionality -- going from an iov to a linear buffer. Signed-off-by: Amit Shah Signed-off-by: Anthony Liguori --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a404fda..18e7368 100644 --- a/Makefile +++ b/Makefile @@ -124,6 +124,8 @@ curses.o: curses.c keymaps.h curses_keys.h bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) +iov.o: iov.c iov.h + ###################################################################### qemu-img.o: qemu-img-cmds.h -- cgit v1.1