﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	field_blocks	field_dependson	field_seealso
203	fwrite cannot handle more than 4095 chars.	Tomas Brambora		"fwrite sets ferror to 1 when attempting to write > 4095 chars. This should not be caused by reaching DATA_XFER_LIMIT as this is set to 64KB.

{{{
#include <stdio.h>
#include <errno.h>
#include <vfs/vfs.h>
#include <fcntl.h>

#define BUFSIZE 5000

int main(int argc, char **argv)
{
	int i;

	char buffer[BUFSIZE];
	for (i=0; i<BUFSIZE; ++i)
		buffer[i] = 'a';

	FILE *f = fopen(""/data/tmp"", ""w"");
	errno = 0;
	printf(""ferror: %i\n"", ferror(f));
	int cnt = fwrite(buffer, sizeof(char), BUFSIZE, f);
	printf(""cnt: %i, errno: %i, ferror: %i"", cnt, errno, ferror(f));
	fclose(f);

	return 0;
}
}}}
"	defect	closed	major	0.4.2	helenos/lib/c	mainline	worksforme					
