cmogstored.git  about / heads / tags
alternative mogstored implementation for MogileFS
blob e392563c58fbd758af8a9c56ee7868f432d20ed0 395 bytes (raw)
$ git show HEAD:iov_str.h	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 
/*
 * Copyright (C) 2012-2020 all contributors <cmogstored-public@yhbt.net>
 * License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 */
static void iov_str(struct iovec *iov, const char *str, size_t len)
{
	union { const char *in; char *out; } deconst;

	deconst.in = str;
	iov->iov_base = deconst.out;
	iov->iov_len = len;
}

#define IOV_STR(iov,str) iov_str((iov),(str),sizeof(str)-1)

git clone https://yhbt.net/cmogstored.git