X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=direct%2Fyaffs_test.c;fp=direct%2Fyaffs_test.c;h=381df44052c13b8766491f41e2cbd191fbb9471a;hb=49942b13d7cfbdba72c18de0f37d16d81b4372a8;hp=0000000000000000000000000000000000000000;hpb=9f0dab8f26ae946761792c1b2de425b3232ee6e1;p=yaffs2.git diff --git a/direct/yaffs_test.c b/direct/yaffs_test.c new file mode 100644 index 0000000..381df44 --- /dev/null +++ b/direct/yaffs_test.c @@ -0,0 +1,51 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * + * Copyright (C) 2002 Aleph One Ltd. + * for Toby Churchill Ltd and Brightstar Engineering + * + * Created by Charles 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 +#include +#include +#include + +#include "yaffsfs.h" + +#include "nor_stress.h" + + + +void BadUsage(void) +{ + printf("usage root_dir test_id\n"); + printf(" test_id: fw_update fw_update_init\n"); + exit(2); +} +int main(int argc, const char *argv[]) +{ + yaffs_StartUp(); + if(argc == 3) { + if(!strcmp(argv[2],"fw_update_init")){ + NorStressTestInitialise(argv[1]); + } + else if(!strcmp(argv[2],"fw_update")){ + NorStressTestRun(argv[1]); + } + else + BadUsage(); + } + else + BadUsage(); + return 0; +}