CoreFW  Diff

Differences From Artifact [4ca19651ff]:

To Artifact [1f3d504a05]:


42
43
44
45
46
47
48

49
50
51
52
53



54
55
56
57
58
59
60
	cfw_stream_close(ptr);
}

ssize_t
cfw_stream_read(void *ptr, void *buf, size_t len)
{
	CFWStream *stream = ptr;


	if (stream == NULL || stream->ops == NULL)
		return -1;

	return stream->ops->read(stream, buf, len);



}

bool
cfw_stream_write(void *ptr, const void *buf, size_t len)
{
	CFWStream *stream = ptr;








>




|
>
>
>







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
	cfw_stream_close(ptr);
}

ssize_t
cfw_stream_read(void *ptr, void *buf, size_t len)
{
	CFWStream *stream = ptr;
	ssize_t ret;

	if (stream == NULL || stream->ops == NULL)
		return -1;

	if ((ret = stream->ops->read(stream, buf, len)) < -1)
		ret = -1;

	return ret;
}

bool
cfw_stream_write(void *ptr, const void *buf, size_t len)
{
	CFWStream *stream = ptr;