예제 #1
0
파일: node.c 프로젝트: ChrisChung/sheepdog
size_t node_list_get_size(const char *path)
{
	struct strbuf *buf;
	size_t len;
	char cmd[COMMAND_LEN];

	sprintf(cmd, "collie node list -a %s -p %d", sdhost, sdport);
	buf = sheepfs_run_cmd(cmd);
	if (!buf)
		return 0;

	len = shadow_file_write(path, buf->buf, buf->len);
	strbuf_release(buf);
	return len;
}
예제 #2
0
파일: http.c 프로젝트: Abioy/sheepdog
int http_address_write(const char *path, const char *buf, size_t size,
		       off_t ignore)
{
	return shadow_file_write(path, buf, size);
}