X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fbasic-test%2Fyaffsnewcfg.c;h=5add1e686dd9c249e83a524a4f01628520dbcfe7;hp=a3548ef94e8f1bdfcbe131d69bf64e4e132133b1;hb=137f935f6d622bffdef2fece0c5194e85f5174e9;hpb=e33554a67753729f6b74677473cf0ec3b8d35a7e diff --git a/direct/basic-test/yaffsnewcfg.c b/direct/basic-test/yaffsnewcfg.c index a3548ef..5add1e6 100644 --- a/direct/basic-test/yaffsnewcfg.c +++ b/direct/basic-test/yaffsnewcfg.c @@ -37,61 +37,6 @@ unsigned yaffs_trace_mask = 0; -static int yaffsfs_lastError; - -void yaffsfs_SetError(int err) -{ - //Do whatever to set error - yaffsfs_lastError = err; -} - - -int yaffsfs_GetLastError(void) -{ - return yaffsfs_lastError; -} - -void yaffsfs_Lock(void) -{ -} - -void yaffsfs_Unlock(void) -{ -} - -__u32 yaffsfs_CurrentTime(void) -{ - return 0; -} - - -static int yaffs_kill_alloc = 0; -static size_t total_malloced = 0; -static size_t malloc_limit = 0 & 6000000; - -void *yaffs_malloc(size_t size) -{ - void * this; - if(yaffs_kill_alloc) - return NULL; - if(malloc_limit && malloc_limit <(total_malloced + size) ) - return NULL; - - this = malloc(size); - if(this) - total_malloced += size; - return this; -} - -void yaffs_free(void *ptr) -{ - free(ptr); -} - -void yaffsfs_LocalInitialisation(void) -{ - // Define locking semaphore. -} // Configuration @@ -100,7 +45,7 @@ int yaffs_start_up(void) { // Stuff to configure YAFFS // Stuff to initialise anything special (eg lock semaphore). - yaffsfs_LocalInitialisation(); + yaffsfs_OSInitialisation(); yramsim_CreateRamSim("yaffs2",1,1000,0,0); yramsim_CreateRamSim("p0",0,0x400,1,0xff); yramsim_CreateRamSim("p1",0,0x400,1,0);