cmogstored.git  about / heads / tags
alternative mogstored implementation for MogileFS
blob 00fc2c00562ecad447ab9a54fff60c7a88453ea8 388 bytes (raw)
$ git show v1.4.2: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-2015 all contributors <cmogstored-public@bogomips.org>
 * License: GPLv3 or later (see COPYING for details)
 */
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