public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob 0153acca9e628c20a7927deecbeb14cb4d55daca 1510 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * iov.c - helpers for using (partial) iovecs.
 *
 * Copyrigh (c) 2024 Red Hat
 * Author: Laurent Vivier <lvivier@redhat.com>
 *
 * This file also contains code originally from QEMU include/qemu/iov.h
 * and licensed under the following terms:
 *
 * Copyright (C) 2010 Red Hat, Inc.
 *
 * Author(s):
 *  Amit Shah <amit.shah@redhat.com>
 *  Michael Tokarev <mjt@tls.msk.ru>
 *
 * This work is licensed under the terms of the GNU GPL, version 2.  See
 * the COPYING file in the top-level directory.
 *
 * Contributions after 2012-01-13 are licensed under the terms of the
 * GNU GPL, version 2 or (at your option) any later version.
 */

#ifndef IOVEC_H
#define IOVEC_H

#include <unistd.h>
#include <string.h>

size_t iov_fill_from_buf(const struct iovec *iov, unsigned int iov_cnt,
			 size_t offset, const void *buf, size_t bytes);
size_t iov_fill_to_buf(const struct iovec *iov, const unsigned int iov_cnt,
		       size_t offset, void *buf, size_t bytes);
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, unsigned int iov_cnt,
                  size_t offset, void *buf, size_t bytes);

size_t iov_size(const struct iovec *iov, const unsigned int iov_cnt);
unsigned iov_copy(struct iovec *dst_iov, unsigned int dst_iov_cnt,
		  const struct iovec *iov, unsigned int iov_cnt,
		  size_t offset, size_t bytes);
#endif /* IOVEC_H */

debug log:

solving 0153acca9e62 ...
found 0153acca9e62 in https://archives.passt.top/passt-dev/20240214085628.210783-2-lvivier@redhat.com/

applying [1/1] https://archives.passt.top/passt-dev/20240214085628.210783-2-lvivier@redhat.com/
diff --git a/iov.h b/iov.h
new file mode 100644
index 000000000000..0153acca9e62

Checking patch iov.h...
Applied patch iov.h cleanly.

index at:
100644 0153acca9e628c20a7927deecbeb14cb4d55daca	iov.h

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).