Searched hist:"9 dd6f7c2" (Results 1 – 2 of 2) sorted by relevance
/openbmc/qemu/include/qemu/ |
H A D | iov.h | 9dd6f7c2 Thu Sep 17 04:44:53 CDT 2020 Stefan Hajnoczi <stefanha@redhat.com> util/iov: add iov_discard_undo() The iov_discard_front/back() operations are useful for parsing iovecs but they modify the array elements. If the original array is needed after parsing finishes there is currently no way to restore it. Although g_memdup() can be used before performing destructive iov_discard_front/back() operations, this is inefficient. Introduce iov_discard_undo() to restore the array to the state prior to an iov_discard_front/back() operation. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Message-Id: <20200917094455.822379-2-stefanha@redhat.com>
|
/openbmc/qemu/util/ |
H A D | iov.c | 9dd6f7c2 Thu Sep 17 04:44:53 CDT 2020 Stefan Hajnoczi <stefanha@redhat.com> util/iov: add iov_discard_undo() The iov_discard_front/back() operations are useful for parsing iovecs but they modify the array elements. If the original array is needed after parsing finishes there is currently no way to restore it. Although g_memdup() can be used before performing destructive iov_discard_front/back() operations, this is inefficient. Introduce iov_discard_undo() to restore the array to the state prior to an iov_discard_front/back() operation. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Message-Id: <20200917094455.822379-2-stefanha@redhat.com>
|