#include <sys/types.h>
#include <sys/stat.h>

#include <errno.h>
#include <fcntl.h>
#include <stdio.h>

int main(int argc, const char **argv)
{
	int fd;

	printf("Opening '%s'\n", argv[1]);
	fd = open(argv[1], O_RDWR);
	if (fd != -1)
	{
		printf("Passed.\n");
		close(fd);
	}
	else
	{
		perror("Failed");
	}

	return (0);
}
