
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <dirent.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
//it tries lookup from open and fails
int
main(int argc, char *argv[])
{
	int fd;
	char n[512];

	strcpy(n, "./yfs1/f3");
	creat(n, 0666);
	fd = open(n,0);
	if(fd >= 0){
		fprintf(stderr, "test-lab-4-b: open(%s) succeeded for deleted file\n", n);
		exit(1);
	} else {
		printf("open failed as it should\n");
	}
	
}