File:  [Net/2] / Net2 / tests / fstests / write_8192.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:03:56 2018 UTC (8 years, 3 months ago) by root
Branches: MAIN, CSRG
CVS tags: Net2, HEAD
Net/2

#define	BUFSIZ 8192

main(argc, argv)
	int argc;
	char *argv[];
{
	char buf[BUFSIZ];
	int i, j;

	if (argc < 2) {
		printf("Usage: write_8192 file\n");
		exit(1);
	}
	j = creat(argv[1], 0666);
	if (j < 0) {
		perror(argv[1]);
		exit(2);
	}
	for (i = 0; i < 1024; i++)
		write(j, buf, BUFSIZ);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.