X-Git-Url: https://yaffs.net/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftest-framework%2Ftimothy_tests%2Fyaffs_and_linux_mirror_tests%2Fyaffs_test_open.c;fp=direct%2Ftest-framework%2Ftimothy_tests%2Fyaffs_and_linux_mirror_tests%2Fyaffs_test_open.c;h=0000000000000000000000000000000000000000;hp=7f9619086a594721a289951d1777f6da020275e3;hb=e12e51da5815d80399ec8f5b0da69c7cd7a0f42e;hpb=ebc54da9e29be1de79d77c72c0d8eb91833c641b diff --git a/direct/test-framework/timothy_tests/yaffs_and_linux_mirror_tests/yaffs_test_open.c b/direct/test-framework/timothy_tests/yaffs_and_linux_mirror_tests/yaffs_test_open.c deleted file mode 100644 index 7f96190..0000000 --- a/direct/test-framework/timothy_tests/yaffs_and_linux_mirror_tests/yaffs_test_open.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * YAFFS: Yet another FFS. A NAND-flash specific file system. - * - * Copyright (C) 2002-2018 Aleph One Ltd. - * - * Created by Timothy Manning - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include "yaffs_test_open.h" - -int yaffs_test_open(arg_temp *args_struct) -{ - char path[200]; - char message[100]; - int output=0; - join_paths(yaffs_struct.root_path,args_struct->string1, path ); - sprintf(message,"file path: %s\n",path); - print_message(3,message); - - output=yaffs_open(path,args_struct->char1 &(O_TRUNC|O_EXCL|O_CREAT|O_APPEND),args_struct->char2&(S_IREAD|S_IWRITE)); - if (output>=0){ - output= yaffs_close(output); - if (output<0) { - print_message(3,"failed to close handle\n"); - return -1; - } else { - return 1; - } - } else { - print_message(3,"failed to open file\n"); - return -1; - } -}