#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>

int main(int argc, char **argv)
{
	const char *path;
	char buf[4];
	int fd, rc;

	if (argc < 2) {
		fprintf(stderr, "usage: %s <path>\n", argv[0]);
		return EXIT_FAILURE;
	}

	path = argv[1];

	/* create a test variable */
	fd = open(path, O_RDWR | O_CREAT, 0600);
	if (fd < 0) {
		perror("open(O_WRONLY)");
		return EXIT_FAILURE;
	}

	rc = read(fd, buf, sizeof(buf));
	if (rc != 0) {
		fprintf(stderr, "Reading a new var should return EOF\n");
		return EXIT_FAILURE;
	}

	return EXIT_SUCCESS;
}
><a href='/cgit.cgi/'><img src='/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/cgit.cgi/'>index</a> : <a href='/cgit.cgi/linux/net-next.git/'>net-next.git</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='5524ddd4c1f1624a7a96e6078a5ed81f493e7398'/><select name='h' onchange='this.form.submit();'>
<option value='emaclite-cleanup'>emaclite-cleanup</option>
<option value='master'>master</option>
<option value='nds-private-remove' selected='selected'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/?h=nds-private-remove'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?h=nds-private-remove&amp;id=5524ddd4c1f1624a7a96e6078a5ed81f493e7398'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/sound/firewire/tascam/amdtp-tascam.c?h=nds-private-remove'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/sound/firewire/tascam/amdtp-tascam.c?h=nds-private-remove&amp;id=5524ddd4c1f1624a7a96e6078a5ed81f493e7398'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/sound/firewire/tascam/amdtp-tascam.c?h=nds-private-remove&amp;id=5524ddd4c1f1624a7a96e6078a5ed81f493e7398'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/sound/firewire/tascam/amdtp-tascam.c?h=nds-private-remove&amp;id=5524ddd4c1f1624a7a96e6078a5ed81f493e7398'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/sound/firewire/tascam/amdtp-tascam.c'>
<input type='hidden' name='h' value='nds-private-remove'/><input type='hidden' name='id' value='5524ddd4c1f1624a7a96e6078a5ed81f493e7398'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?h=nds-private-remove&amp;id=5524ddd4c1f1624a7a96e6078a5ed81f493e7398'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound?h=nds-private-remove&amp;id=5524ddd4c1f1624a7a96e6078a5ed81f493e7398'>sound</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound/firewire?h=nds-private-remove&amp;id=5524ddd4c1f1624a7a96e6078a5ed81f493e7398'>firewire</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound/firewire/tascam?h=nds-private-remove&amp;id=5524ddd4c1f1624a7a96e6078a5ed81f493e7398'>tascam</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound/firewire/tascam/amdtp-tascam.c?h=nds-private-remove&amp;id=5524ddd4c1f1624a7a96e6078a5ed81f493e7398'>amdtp-tascam.c</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/sound/firewire/tascam/amdtp-tascam.c?h=nds-private-remove&amp;id=5524ddd4c1f1624a7a96e6078a5ed81f493e7398&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>