yaffs First round of name changes
authorCharles Manning <cdhmanning@gmail.com>
Mon, 4 Oct 2010 21:13:50 +0000 (10:13 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Wed, 6 Oct 2010 22:14:38 +0000 (11:14 +1300)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
59 files changed:
direct/basic-test/dtest.c
direct/basic-test/yaffs_fileem2k.c
direct/basic-test/yaffs_ramdisk.c
direct/basic-test/yaffs_ramem2k.c
direct/basic-test/yaffscfg.c
direct/basic-test/yaffscfg2k.c
direct/basic-test/yaffsnewcfg.c
direct/basic-test/yramsim.c
direct/fsx_test/yaffs_fsx.c
direct/python/examples.py
direct/python/yaffs_python_helper.c
direct/python/yaffsfs.py
direct/tests/yaffs_test.c
direct/yaffs_flashif.c
direct/yaffs_nandif.c
direct/yaffs_nandif.h
direct/yaffsfs.c
direct/yaffsfs.h
direct/ydirectenv.h
patches/yaffs_mtdif2.c
utils/mkyaffs2image.c
utils/mkyaffsimage.c
yaffs_allocator.c
yaffs_allocator.h
yaffs_bitmap.c
yaffs_bitmap.h
yaffs_checkptrw.c
yaffs_checkptrw.h
yaffs_ecc.c
yaffs_ecc.h
yaffs_getblockinfo.h
yaffs_guts.c
yaffs_guts.h
yaffs_linux.h
yaffs_linux_allocator.c
yaffs_mtdif.c
yaffs_mtdif1.c
yaffs_mtdif2.c
yaffs_nand.c
yaffs_nand.h
yaffs_packedtags1.c
yaffs_packedtags1.h
yaffs_packedtags2.c
yaffs_packedtags2.h
yaffs_tagscompat.c
yaffs_tagscompat.h
yaffs_tagsvalidity.c
yaffs_tagsvalidity.h
yaffs_trace.h
yaffs_verify.c
yaffs_verify.h
yaffs_vfs.c
yaffs_vfs_multi.c
yaffs_yaffs1.c
yaffs_yaffs1.h
yaffs_yaffs2.c
yaffs_yaffs2.h
yaffsinterface.h
yportenv.h

index c56e5b2..f272f0c 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "yaffs_guts.h" /* Only for dumping device innards */
 
-extern int yaffs_traceMask;
+extern int yaffs_trace_mask;
 
 void dumpDir(const char *dname);
 
@@ -278,7 +278,7 @@ void yaffs_backward_scan_test(const char *path)
 {
        char fn[100];
        
-       yaffs_StartUp();        
+       yaffs_start_up();       
        
        yaffs_mount(path);
        
@@ -299,7 +299,7 @@ void null_name_test(const char *path)
 {
        char fn[100];
        int h;
-       yaffs_StartUp();
+       yaffs_start_up();
 
        yaffs_mount(path);
 
@@ -320,7 +320,7 @@ void yaffs_device_flush_test(const char *path)
        int h;
        int i;
        
-       yaffs_StartUp();        
+       yaffs_start_up();       
        
        yaffs_mount(path);
        
@@ -349,7 +349,7 @@ void short_scan_test(const char *path, int fsize, int niterations)
        
        sprintf(fn,"%s/%s",path,"f1");
        
-       yaffs_StartUp();
+       yaffs_start_up();
        for(i = 0; i < niterations; i++)
        {
                printf("\n*****************\nIteration %d\n",i);
@@ -374,7 +374,7 @@ void scan_pattern_test(const char *path, int fsize, int niterations)
        sprintf(fn[1],"%s/%s",path,"f1");
        sprintf(fn[2],"%s/%s",path,"f2");
        
-       yaffs_StartUp();
+       yaffs_start_up();
        
        for(i = 0; i < niterations; i++)
        {
@@ -656,7 +656,7 @@ int long_test(int argc, char *argv[])
        mode_t temp_mode;
        struct yaffs_stat ystat;
        
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount("/boot");
        yaffs_mount("/data");
@@ -866,11 +866,11 @@ int long_test(int argc, char *argv[])
        yaffs_unlink("/boot/zlf");
        
        
-       yaffs_DumpDevStruct("/boot");
+       yaffs_dump_dev("/boot");
        
        fill_disk_and_delete("/boot",20,20);
        
-       yaffs_DumpDevStruct("/boot");
+       yaffs_dump_dev("/boot");
        
        fill_files("/boot",1,10000,0);
        fill_files("/boot",1,10000,5000);
@@ -884,8 +884,8 @@ int long_test(int argc, char *argv[])
        leave_unlinked_file("/data",20000,5000);
        leave_unlinked_file("/data",20000,5000);
        
-       yaffs_DumpDevStruct("/boot");
-       yaffs_DumpDevStruct("/data");
+       yaffs_dump_dev("/boot");
+       yaffs_dump_dev("/data");
        
                
                
@@ -909,7 +909,7 @@ int huge_directory_test_on_path(char *path)
        char str[100];
 
        
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount(path);
        
@@ -967,7 +967,7 @@ void rename_over_test(const char *mountpt)
        sprintf(b,"%s/b",mountpt);
        sprintf(c,"%s/c",mountpt);
        
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount(mountpt);
        
@@ -1004,7 +1004,7 @@ int resize_stress_test(const char *path)
    char abuffer[1000];
    char bbuffer[1000];
    
-   yaffs_StartUp();
+   yaffs_start_up();
    
    yaffs_mount(path);
    
@@ -1065,7 +1065,7 @@ int overwrite_test(const char *path)
    int j;   
    int a;
    int b;
-   yaffs_StartUp();
+   yaffs_start_up();
    
    yaffs_mount(path);
    
@@ -1090,7 +1090,7 @@ int root_perm_remount(const char *path)
 {
    struct yaffs_stat s;
    
-   yaffs_StartUp();
+   yaffs_start_up();
    
    yaffs_mount(path);
    
@@ -1121,7 +1121,7 @@ int resize_stress_test_no_grow_complex(const char *path,int iters)
    char bbuffer[1000];
 
    
-   yaffs_StartUp();
+   yaffs_start_up();
    
    yaffs_mount(path);
    
@@ -1195,7 +1195,7 @@ int resize_stress_test_no_grow(const char *path,int iters)
    char abuffer[1000];
    char bbuffer[1000];
    
-   yaffs_StartUp();
+   yaffs_start_up();
    
    yaffs_mount(path);
    
@@ -1260,7 +1260,7 @@ int resize_stress_test_no_grow(const char *path,int iters)
 int directory_rename_test(void)
 {
        int r;
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount("/ram");
        yaffs_mkdir("/ram/a",0);
@@ -1300,7 +1300,7 @@ int cache_read_test(void)
        int sizeOfFiles = 500000;
        char buffer[100];
        
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount("/boot");
        
@@ -1339,7 +1339,7 @@ int cache_bypass_bug_test(void)
        memset(buffer1,0,sizeof(buffer1));
        memset(buffer2,0,sizeof(buffer2));
                
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount("/boot");
        
@@ -1379,7 +1379,7 @@ int free_space_check(void)
 {
        int f;
        
-               yaffs_StartUp();
+               yaffs_start_up();
                yaffs_mount("/boot");
            fill_disk("/boot/",2);
            f = yaffs_freespace("/boot");
@@ -1397,7 +1397,7 @@ int truncate_test(void)
 
        char y[10];
 
-       yaffs_StartUp();
+       yaffs_start_up();
        yaffs_mount("/boot");
 
        yaffs_unlink("/boot/trunctest");
@@ -1435,7 +1435,7 @@ int truncate_test(void)
 void fill_disk_test(const char *mountpt)
 {
        int i;
-       yaffs_StartUp();
+       yaffs_start_up();
        
        for(i = 0; i < 5; i++)
        {
@@ -1450,7 +1450,7 @@ void fill_disk_test(const char *mountpt)
 void fill_files_test(const char *mountpt)
 {
        int i;
-       yaffs_StartUp();
+       yaffs_start_up();
        
        for(i = 0; i < 5; i++)
        {
@@ -1464,7 +1464,7 @@ void fill_files_test(const char *mountpt)
 void fill_empty_files_test(const char *mountpt)
 {
        int i;
-       yaffs_StartUp();
+       yaffs_start_up();
        char name[100];
        int result = 0;
        
@@ -1493,7 +1493,7 @@ void fill_empty_files_test(const char *mountpt)
 void long_name_test(const char *mountpt)
 {
        int i;
-       yaffs_StartUp();
+       yaffs_start_up();
        char fullName[1000];
        char name[300];
        int result = 0;
@@ -1548,7 +1548,7 @@ void lookup_test(const char *mountpt)
        yaffs_DIR *d;
        yaffs_dirent *de;
 
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount(mountpt);
                                
@@ -1607,7 +1607,7 @@ void link_test0(const char *mountpt)
        int result = 0;
        
 
-       yaffs_StartUp();
+       yaffs_start_up();
        yaffs_mount(mountpt);
        
                
@@ -1656,7 +1656,7 @@ void link_test1(const char *mountpt)
        sprintf(b,"%s/bbb",mountpt);
        sprintf(c,"%s/ccc",mountpt);
        
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount(mountpt);
        
@@ -1691,7 +1691,7 @@ void handle_test(const char *mountpt)
 
        sprintf(a,"%s/aaa",mountpt);
        
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount(mountpt);
 
@@ -1725,7 +1725,7 @@ void freespace_test(const char *mountpt)
        int f3;
        sprintf(a,"%s/aaa",mountpt);
        
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount(mountpt);
        
@@ -1766,7 +1766,7 @@ void simple_rw_test(const char *mountpt)
 
        sprintf(a,"%s/aaa",mountpt);
        
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount(mountpt);
        
@@ -1819,7 +1819,7 @@ void scan_deleted_files_test(const char *mountpt)
        int h;
        
        sprintf(sub,"%s/sdir",mountpt);
-       yaffs_StartUp();
+       yaffs_start_up();
        
        for(j = 0; j < 10; j++)
        {
@@ -1952,7 +1952,7 @@ void check_resize_gc_bug(const char *mountpt)
 
        
        
-       yaffs_StartUp();
+       yaffs_start_up();
        yaffs_mount(mountpt);
        yaffs_unlink(a);
        yaffs_unlink(b);
@@ -1982,7 +1982,7 @@ void multi_mount_test(const char *mountpt,int nmounts)
        
        sprintf(a,"%s/a",mountpt);
 
-       yaffs_StartUp();
+       yaffs_start_up();
        
        for(i = 0; i < nmounts; i++){
                int h0;
@@ -2059,7 +2059,7 @@ void small_mount_test(const char *mountpt,int nmounts)
        
        sprintf(a,"%s/a",mountpt);
 
-       yaffs_StartUp();
+       yaffs_start_up();
        
        
        
@@ -2131,7 +2131,7 @@ void small_overwrite_test(const char *mountpt,int nmounts)
        
        sprintf(a,"%s/a",mountpt);
 
-       yaffs_StartUp();
+       yaffs_start_up();
        
        
        
@@ -2186,7 +2186,7 @@ void seek_overwrite_test(const char *mountpt,int nmounts)
        
        sprintf(a,"%s/f",mountpt);
 
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount(mountpt);
        
@@ -2232,7 +2232,7 @@ void checkpoint_fill_test(const char *mountpt,int nmounts)
 
        
        
-       yaffs_StartUp();
+       yaffs_start_up();
        
        for(i = 0; i < nmounts; i++){
                printf("############### Iteration %d   Start\n",i);
@@ -2306,7 +2306,7 @@ void checkpoint_upgrade_test(const char *mountpt,int nmounts)
        
        
        printf("Create start condition\n");
-       yaffs_StartUp();
+       yaffs_start_up();
        yaffs_mount(mountpt);
        yaffs_mkdir(a,0);
        sprintf(b,"%s/zz",a);
@@ -2361,7 +2361,7 @@ void huge_array_test(const char *mountpt,int n)
        
 
        
-       yaffs_StartUp();
+       yaffs_start_up();
 
        yaffs_mount(mountpt);
        
@@ -2436,7 +2436,7 @@ void random_small_file_test(const char *mountpt,int iterations)
        int r;
        
        
-       yaffs_StartUp();
+       yaffs_start_up();
 
        yaffs_mount(mountpt);
        
@@ -2495,7 +2495,7 @@ void random_small_file_test(const char *mountpt,int iterations)
 void rmdir_test(const char *mountpt)
 {
        char name[100];
-       yaffs_StartUp();
+       yaffs_start_up();
        
        yaffs_mount(mountpt);
        
@@ -2556,7 +2556,7 @@ void basic_xattr_test(const char *mountpt)
        int result;
        int val1;
 
-       yaffs_StartUp();
+       yaffs_start_up();
 
        yaffs_mount(mountpt);
 
@@ -2606,7 +2606,7 @@ void big_xattr_test(const char *mountpt)
        int result;
        char val[1000];
 
-       yaffs_StartUp();
+       yaffs_start_up();
 
        yaffs_mount(mountpt);
 
@@ -2660,9 +2660,9 @@ void test_flash_traffic(const char *mountpt)
        int i;
        yaffs_Device *dev;
 
-       yaffs_traceMask = 0;
+       yaffs_trace_mask = 0;
 
-       yaffs_StartUp();
+       yaffs_start_up();
 
        yaffs_mount(mountpt);
        
index 84b7eb8..a939e26 100644 (file)
@@ -62,7 +62,7 @@ typedef struct
 
 static yflash_Device filedisk;
 
-int yaffs_testPartialWrite = 0;
+int yaffs_test_partial_write = 0;
 
 extern int random_seed;
 extern int simulate_power_failure;
@@ -198,7 +198,7 @@ int yflash2_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u
                written = write(h,data,dev->param.totalBytesPerChunk);
 
                
-               if(yaffs_testPartialWrite){
+               if(yaffs_test_partial_write){
                        close(h);
                        exit(1);
                }
@@ -235,7 +235,7 @@ int yflash2_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u
                        lseek(h,pos,SEEK_SET);
                        written = write(h,localBuffer,dev->nDataBytesPerChunk);
                
-                       if(yaffs_testPartialWrite){
+                       if(yaffs_test_partial_write){
                                close(h);
                                exit(1);
                        }
@@ -314,7 +314,7 @@ int yflash2_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u
                        lseek(h,pos,SEEK_SET);
                        written = write(h,localBuffer,dev->nDataBytesPerChunk);
                
-                       if(yaffs_testPartialWrite){
+                       if(yaffs_test_partial_write){
                                close(h);
                                exit(1);
                        }
@@ -371,7 +371,7 @@ int yflash2_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u
 
 }
 
-int yaffs_CheckAllFF(const __u8 *ptr, int n)
+int yaffs_check_all_ff(const __u8 *ptr, int n)
 {
        while(n)
        {
@@ -408,7 +408,7 @@ int yflash2_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *d
                /* Got to suck the tags out of the data area */
                if(!data) {
                        localData=1;
-                       data = yaffs_GetTempBuffer(dev,__LINE__);
+                       data = yaffs_get_temp_buffer(dev,__LINE__);
                }
 
                
@@ -423,13 +423,13 @@ int yflash2_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *d
 
                nRead = read(h, data,dev->param.totalBytesPerChunk);
 
-               yaffs_UnpackTags2TagsPart(tags,pt2tp);
+               yaffs_unpack_tags2tags_part(tags,pt2tp);
                
                if(nread != dev->param.totalBytesPerChunk)
                        retval = YAFFS_FAIL;
                        
                if(localData)
-                       yaffs_ReleaseTempBuffer(dev,data,__LINE__);
+                       yaffs_release_temp_buffer(dev,data,__LINE__);
 
 
 
@@ -461,9 +461,9 @@ int yflash2_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *d
                                nread= read(h,tags,sizeof(yaffs_ExtendedTags));
                                if(nread != sizeof(yaffs_ExtendedTags))
                                         retval =  YAFFS_FAIL;
-                               if(yaffs_CheckAllFF((__u8 *)tags,sizeof(yaffs_ExtendedTags)))
+                               if(yaffs_check_all_ff((__u8 *)tags,sizeof(yaffs_ExtendedTags)))
                                {
-                                       yaffs_InitialiseTags(tags);
+                                       yaffs_init_tags(tags);
                                }
                                else
                                {
@@ -474,7 +474,7 @@ int yflash2_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *d
                        {
                                yaffs_PackedTags2 pt;
                                nread= read(h,&pt,sizeof(pt));
-                               yaffs_UnpackTags2(tags,&pt, !dev->param.noTagsECC);
+                               yaffs_unpack_tags2(tags,&pt, !dev->param.noTagsECC);
 #ifdef SIMULATE_FAILURES
                                if((chunkInNAND >> 6) == 100) {
                                        if(fail300 && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR){
index d44c3da..0b47adf 100644 (file)
@@ -173,7 +173,7 @@ int yramdisk_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *
                yaffs_PackedTags1 pt;
                
                memcpy(&pt,&ramdisk.block[blk]->page[pg].data[512],sizeof(pt));
-               yaffs_UnpackTags1(tags,&pt);
+               yaffs_unpack_tags1(tags,&pt);
                
        }
 
index b3a8724..f0b7c71 100644 (file)
@@ -257,7 +257,7 @@ int nandemul2k_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8
        {
                x = &ned.block[blk]->page[pg]->data[PAGE_DATA_SIZE];
                
-               yaffs_UnpackTags2(tags,(yaffs_PackedTags2 *)x, !dev->param.noTagsECC);
+               yaffs_unpack_tags2(tags,(yaffs_PackedTags2 *)x, !dev->param.noTagsECC);
        }
 
        return YAFFS_OK;
index a235bb2..7d510b2 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "yramsim.h"
 
-unsigned yaffs_traceMask = 0xFFFFFFFF;
+unsigned yaffs_trace_mask = 0xFFFFFFFF;
 
 
 void yaffsfs_SetError(int err)
@@ -87,7 +87,7 @@ static yaffsfs_DeviceConfiguration yaffsfs_config[] = {
 };
 
 
-int yaffs_StartUp(void)
+int yaffs_start_up(void)
 {
        // Stuff to configure YAFFS
        // Stuff to initialise anything special (eg lock semaphore).
index bfd502e..4aa97a3 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <errno.h>
 
-unsigned yaffs_traceMask = 
+unsigned yaffs_trace_mask = 
 
        YAFFS_TRACE_SCAN |  
        YAFFS_TRACE_GC |
@@ -110,7 +110,7 @@ struct yaffs_DeviceStruct ram1Dev;
 struct yaffs_DeviceStruct flashDev;
 struct yaffs_DeviceStruct m18_1Dev;
 
-int yaffs_StartUp(void)
+int yaffs_start_up(void)
 {
        // Stuff to configure YAFFS
        // Stuff to initialise anything special (eg lock semaphore).
@@ -133,7 +133,7 @@ int yaffs_StartUp(void)
        ram1Dev.param.eraseBlockInNAND = yramdisk_EraseBlockInNAND;
        ram1Dev.param.initialiseNAND = yramdisk_InitialiseNAND;
        
-       yaffs_AddDevice(&ram1Dev);
+       yaffs_add_device(&ram1Dev);
 
        // /M18-1 yaffs1 on M18 nor sim
        memset(&m18_1Dev,0,sizeof(m18_1Dev));
@@ -154,7 +154,7 @@ int yaffs_StartUp(void)
 
 //     m18_1Dev.param.disableSoftDelete = 1;
 
-       yaffs_AddDevice(&m18_1Dev);
+       yaffs_add_device(&m18_1Dev);
 
        // /yaffs2  yaffs2 file emulation
        // 2kpage/64chunk per block
@@ -181,7 +181,7 @@ int yaffs_StartUp(void)
        flashDev.param.queryNANDBlock = yflash2_QueryNANDBlock;
        flashDev.param.enableXattr = 1;
 
-       yaffs_AddDevice(&flashDev);
+       yaffs_add_device(&flashDev);
 
 // todo        yaffs_initialise(yaffsfs_config);
        
index fa99342..a3548ef 100644 (file)
@@ -23,7 +23,7 @@
 #include "yaffs_trace.h"
 #include "yramsim.h"
 
-unsigned yaffs_traceMask = 
+unsigned yaffs_trace_mask = 
 
        YAFFS_TRACE_SCAN |  
        YAFFS_TRACE_GC |
@@ -96,7 +96,7 @@ void yaffsfs_LocalInitialisation(void)
 // Configuration
 
 
-int yaffs_StartUp(void)
+int yaffs_start_up(void)
 {
        // Stuff to configure YAFFS
        // Stuff to initialise anything special (eg lock semaphore).
index caa1aac..9a7a72b 100644 (file)
@@ -276,5 +276,5 @@ struct yaffs_DeviceStruct *yramsim_CreateRamSim(const YCHAR *name,
        g->markBlockBad = yramsim_MarkBlockBad,
        g->privateData = (void *)sim;
 
-       return yaffs_AddDeviceFromGeometry(name,g);
+       return yaffs_add_dev_from_geometry(name,g);
 }
index 484241b..d3d3149 100644 (file)
@@ -919,7 +919,7 @@ main(int argc, char **argv)
        argc -= optind;
        argv += optind;
 
-       yaffs_StartUp();
+       yaffs_start_up();
        yaffs_mount(BASE_NAME);
        
        fname = BASE_NAME "/fsxdata";
index 6b0c045..0f42c17 100644 (file)
@@ -73,7 +73,7 @@ def yaffs_o_excl_test(dir):
     
 root = "/yaffs2"
 
-yaffs_StartUp()
+yaffs_start_up()
 yaffs_mount(root)
 
 yaffs_mkdir(root+"/dd",0666)
index 425bcda..01eb357 100644 (file)
@@ -45,5 +45,5 @@ int yaffs_O_WRONLY(void) { return O_WRONLY;}
 int yaffs_O_RDWR(void) { return O_RDWR;}
 int yaffs_O_TRUNC(void) { return O_TRUNC;}
 
-int yaffs_set_trace(unsigned int tm) { return yaffs_traceMask=tm; }
-int yaffs_get_trace(void) { return yaffs_traceMask; }
+int yaffs_set_trace(unsigned int tm) { return yaffs_trace_mask=tm; }
+int yaffs_get_trace(void) { return yaffs_trace_mask; }
index 4d0e5db..48d4129 100644 (file)
@@ -240,8 +240,8 @@ yaffs_n_handles = ylib.yaffs_n_handles
 yaffs_n_handles.argtypes = [c_char_p]
 yaffs_n_handles.restype = c_int
 
-#int yaffs_StartUp(void)
-yaffs_StartUp = ylib.yaffs_StartUp
-yaffs_StartUp.argtypes = []
-yaffs_StartUp.restype = c_int
+#int yaffs_start_up(void)
+yaffs_start_up = ylib.yaffs_start_up
+yaffs_start_up.argtypes = []
+yaffs_start_up.restype = c_int
 
index 825cf18..b35c750 100644 (file)
@@ -45,7 +45,7 @@ int n_cycles = -1;
 int fuzz_test=0;
 
 
-int yaffs_test_maxMallocs;
+int yaffs_test_max_mallocs;
 
 extern int ops_multiplier;
 
@@ -227,7 +227,7 @@ int main(int argc, char **argv)
                        n_cycles = atoi(optarg);
                        break;
                case 't':
-                       yaffs_traceMask = strtol(optarg,NULL,0);
+                       yaffs_trace_mask = strtol(optarg,NULL,0);
                        break;
                case 'z':fuzz_test=1;
                        break;
@@ -239,7 +239,7 @@ int main(int argc, char **argv)
        argv += optind;
        
        if(random_mallocs){
-               yaffs_test_maxMallocs = 0xFFF & random_seed;
+               yaffs_test_max_mallocs = 0xFFF & random_seed;
        }
        
        if(argc == 1) {
@@ -257,7 +257,7 @@ int main(int argc, char **argv)
                        simulate_power_failure ? "power_fail" : "",
                        random_seed, n_cycles);
 
-               yaffs_StartUp();
+               yaffs_start_up();
                result = yaffs_mount(mount_point);
                if(result < 0){
                        printf("Mount of %s failed\n",mount_point);
index 0a46739..b7ee482 100644 (file)
@@ -160,7 +160,7 @@ int yflash_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *da
        {
                yaffs_PackedTags pt;
                memcpy(&pt,&ramdisk.block[blk]->page[pg].data[512],sizeof(yaffs_PackedTags));
-               yaffs_UnpackTags(tags,&pt);
+               yaffs_unpack_tags(tags,&pt);
        }
 
        return YAFFS_OK;
index 26d4f69..b0c9bd8 100644 (file)
@@ -93,7 +93,7 @@ int ynandif_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND,
                
                if(!data) {
                        localData = 1;
-                       data = yaffs_GetTempBuffer(dev,__LINE__);
+                       data = yaffs_get_temp_buffer(dev,__LINE__);
                }
                spare = NULL;
                spareSize = 0;
@@ -113,12 +113,12 @@ int ynandif_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND,
                if(tags){
                        yaffs_PackedTags2TagsPart * pt2tp;
                        pt2tp = (yaffs_PackedTags2TagsPart *)&data[dev->nDataBytesPerChunk];    
-                       yaffs_UnpackTags2TagsPart(tags,pt2tp);
+                       yaffs_unpack_tags2tags_part(tags,pt2tp);
                }
        }
        else {
                if (tags){
-                       yaffs_UnpackTags2(tags, &pt,!dev->param.noTagsECC);
+                       yaffs_unpack_tags2(tags, &pt,!dev->param.noTagsECC);
                }
        }
 
@@ -134,7 +134,7 @@ int ynandif_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND,
        }
 
        if(localData)
-               yaffs_ReleaseTempBuffer(dev,data,__LINE__);
+               yaffs_release_temp_buffer(dev,data,__LINE__);
        
        return retval;
 }
@@ -213,7 +213,7 @@ int ynandif_DeinitialiseNAND(yaffs_Device *dev)
 
 
 struct yaffs_DeviceStruct * 
-       yaffs_AddDeviceFromGeometry(const YCHAR *name,
+       yaffs_add_dev_from_geometry(const YCHAR *name,
                                        const ynandif_Geometry *geometry)
 {
        YCHAR *clonedName = YMALLOC(sizeof(YCHAR) * (yaffs_strnlen(name,YAFFS_MAX_NAME_LENGTH)+1));
@@ -242,7 +242,7 @@ struct yaffs_DeviceStruct *
                dev->param.nReservedBlocks                 = 5;
                dev->driverContext                         = (void *)geometry;
 
-               yaffs_AddDevice(dev);
+               yaffs_add_device(dev);
 
                return dev;
        }
index cf4562c..9009b62 100644 (file)
@@ -55,7 +55,7 @@ typedef struct {
 } ynandif_Geometry;
 
 struct yaffs_DeviceStruct * 
-       yaffs_AddDeviceFromGeometry(const YCHAR *name,
+       yaffs_add_dev_from_geometry(const YCHAR *name,
                                        const ynandif_Geometry *geometry);
 
 #if 0
index d87bc80..7a53aa7 100644 (file)
@@ -123,7 +123,7 @@ static int yaffsfs_FindInodeIdForObject(yaffs_Object *obj)
        int ret = -1;
        
        if(obj)
-               obj = yaffs_GetEquivalentObject(obj);
+               obj = yaffs_get_equivalent_obj(obj);
 
        /* Look for it in open inode table*/
        for(i = 0; i < YAFFSFS_N_HANDLES && ret < 0; i++){
@@ -144,7 +144,7 @@ static int yaffsfs_GetInodeIdForObject(yaffs_Object *obj)
        yaffsfs_Inode *in = NULL;
        
        if(obj)
-               obj = yaffs_GetEquivalentObject(obj);
+               obj = yaffs_get_equivalent_obj(obj);
 
         ret = yaffsfs_FindInodeIdForObject(obj);
 
@@ -183,7 +183,7 @@ static void yaffsfs_ReleaseInode(yaffsfs_Inode *in)
        obj = in->iObj;
 
        if(obj->unlinked)
-               yaffs_DeleteObject(obj);
+               yaffs_del_obj(obj);
        
        obj->myInode = NULL;
        in->iObj = NULL;
@@ -227,7 +227,7 @@ static int yaffsfs_GetNewHandle(void)
 }
 
 /*
- * yaffs_GetHandle
+ * yaffs_get_handle
  * Increase use of handle when reading/writing a file
  */
 static int yaffsfs_GetHandle(int handle)
@@ -241,7 +241,7 @@ static int yaffsfs_GetHandle(int handle)
 }
 
 /*
- * yaffs_PutHandle
+ * yaffs_put_handle
  * Let go of a handle when closing a file or aborting an open or
  * ending a read or write.
  */
@@ -498,7 +498,7 @@ static yaffs_Object *yaffsfs_DoFindDirectory(yaffs_Object *startDir,
                        else if(yaffs_strcmp(str,_Y("..")) == 0)
                                dir = dir->parent;
                        else{
-                               dir = yaffs_FindObjectByName(dir,str);
+                               dir = yaffs_find_by_name(dir,str);
 
                                while(dir && dir->variantType == YAFFS_OBJECT_TYPE_SYMLINK)
                                        dir = yaffsfs_FollowLink(dir,symDepth);
@@ -530,7 +530,7 @@ static yaffs_Object *yaffsfs_FindObject(yaffs_Object *relativeDirectory, const Y
        dir = yaffsfs_FindDirectory(relativeDirectory,path,&name,symDepth);
 
        if(dir && *name)
-               return yaffs_FindObjectByName(dir,name);
+               return yaffs_find_by_name(dir,name);
 
        return dir;
 }
@@ -609,7 +609,7 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
                        obj = yaffsfs_FollowLink(obj,symDepth++);
 
                if(obj)
-                       obj = yaffs_GetEquivalentObject(obj);
+                       obj = yaffs_get_equivalent_obj(obj);
 
                if(obj &&
                        obj->variantType != YAFFS_OBJECT_TYPE_FILE &&
@@ -693,7 +693,7 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
                                yaffsfs_SetError(-EINVAL);
                                errorReported = 1;
                        } else if(dir)
-                               obj = yaffs_MknodFile(dir,name,mode,0,0);
+                               obj = yaffs_create_file(dir,name,mode,0,0);
                        else {
                                yaffsfs_SetError(-ENOTDIR);
                                errorReported = 1;
@@ -722,7 +722,7 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
                         obj->myInode = (void*) &yaffsfs_inode[inodeId];
 
                         if((oflag & O_TRUNC) && h->writing)
-                                yaffs_ResizeFile(obj,0);
+                                yaffs_resize_file(obj,0);
                } else {
                        yaffsfs_PutHandle(handle);
                        if(!errorReported) {
@@ -754,7 +754,7 @@ int yaffs_Dofsync(int fd,int datasync)
 
        if(h && h->useCount > 0)
                /* flush the file */
-               yaffs_FlushFile(yaffsfs_inode[h->inodeId].iObj,1,datasync);
+               yaffs_flush_file(yaffsfs_inode[h->inodeId].iObj,1,datasync);
        else {
                /* bad handle */
                yaffsfs_SetError(-EBADF);
@@ -792,7 +792,7 @@ int yaffs_close(int fd)
 
        if(h && h->useCount > 0) {
                /* clean up */
-               yaffs_FlushFile(yaffsfs_inode[h->inodeId].iObj,1,0);
+               yaffs_flush_file(yaffsfs_inode[h->inodeId].iObj,1,0);
                yaffsfs_PutHandle(fd);
                retVal = 0;
        } else {
@@ -836,8 +836,8 @@ int yaffsfs_do_read(int fd, void *vbuf, unsigned int nbyte, int isPread, int off
 
                pos = startPos;
                                        
-               if(yaffs_GetObjectFileLength(obj) > pos)
-                       maxRead = yaffs_GetObjectFileLength(obj) - pos;
+               if(yaffs_get_obj_length(obj) > pos)
+                       maxRead = yaffs_get_obj_length(obj) - pos;
                else
                        maxRead = 0;
 
@@ -851,7 +851,7 @@ int yaffsfs_do_read(int fd, void *vbuf, unsigned int nbyte, int isPread, int off
                        nToRead = YAFFSFS_RW_SIZE - (pos & (YAFFSFS_RW_SIZE -1));
                        if(nToRead > nbyte)
                                nToRead = nbyte;
-                       nRead = yaffs_ReadDataFromFile(obj,buf,pos,nToRead);
+                       nRead = yaffs_file_rd(obj,buf,pos,nToRead);
 
                        if(nRead > 0){
                                totalRead += nRead;
@@ -925,7 +925,7 @@ int yaffsfs_do_write(int fd, const void *vbuf, unsigned int nbyte, int isPwrite,
                totalWritten=-1;
        } else if( h && obj){
                if(h->append)
-                       startPos = yaffs_GetObjectFileLength(obj);
+                       startPos = yaffs_get_obj_length(obj);
                else if(isPwrite)
                        startPos = offset;
                else
@@ -938,7 +938,7 @@ int yaffsfs_do_write(int fd, const void *vbuf, unsigned int nbyte, int isPwrite,
                        if(nToWrite > nbyte)
                                nToWrite = nbyte;
 
-                       nWritten = yaffs_WriteDataToFile(obj,buf,pos,nToWrite,writeThrough);
+                       nWritten = yaffs_wr_file(obj,buf,pos,nToWrite,writeThrough);
                        if(nWritten > 0){
                                totalWritten += nWritten;
                                pos += nWritten;
@@ -997,7 +997,7 @@ int yaffs_truncate(const YCHAR *path,off_t newSize)
 
        obj = yaffsfs_FindObject(NULL,path,0);
        if(obj)
-               obj = yaffs_GetEquivalentObject(obj);
+               obj = yaffs_get_equivalent_obj(obj);
 
        if(!obj)
                yaffsfs_SetError(-ENOENT);
@@ -1006,7 +1006,7 @@ int yaffs_truncate(const YCHAR *path,off_t newSize)
        else if(obj->myDev->readOnly)
                yaffsfs_SetError(-EINVAL);
        else
-               result = yaffs_ResizeFile(obj,newSize);
+               result = yaffs_resize_file(obj,newSize);
 
        yaffsfs_Unlock();
 
@@ -1031,7 +1031,7 @@ int yaffs_ftruncate(int fd, off_t newSize)
                yaffsfs_SetError(-EINVAL);
        else
                /* resize the file */
-               result = yaffs_ResizeFile(obj,newSize);
+               result = yaffs_resize_file(obj,newSize);
        yaffsfs_Unlock();
 
 
@@ -1062,7 +1062,7 @@ off_t yaffs_lseek(int fd, off_t offset, int whence)
                        pos = (h->position + offset);
        }
        else if(whence == SEEK_END) {
-               fSize = yaffs_GetObjectFileLength(obj);
+               fSize = yaffs_get_obj_length(obj);
                if(fSize >= 0 && (fSize + offset) >= 0)
                        pos = fSize + offset;
        }
@@ -1173,7 +1173,7 @@ int yaffs_rename(const YCHAR *oldPath, const YCHAR *newPath)
        }
 
        if(renameAllowed)
-               result = yaffs_RenameObject(olddir,oldname,newdir,newname);
+               result = yaffs_rename_obj(olddir,oldname,newdir,newname);
 
        yaffsfs_Unlock();
 
@@ -1186,7 +1186,7 @@ static int yaffsfs_DoStat(yaffs_Object *obj,struct yaffs_stat *buf)
        int retVal = -1;
 
        if(obj)
-               obj = yaffs_GetEquivalentObject(obj);
+               obj = yaffs_get_equivalent_obj(obj);
 
        if(obj && buf){
                buf->st_dev = (int)obj->myDev->osContext;
@@ -1200,11 +1200,11 @@ static int yaffsfs_DoStat(yaffs_Object *obj,struct yaffs_stat *buf)
                else if(obj->variantType == YAFFS_OBJECT_TYPE_FILE)
                        buf->st_mode |= S_IFREG;
 
-               buf->st_nlink = yaffs_GetObjectLinkCount(obj);
+               buf->st_nlink = yaffs_get_obj_link_count(obj);
                buf->st_uid = 0;
                buf->st_gid = 0;;
                buf->st_rdev = obj->yst_rdev;
-               buf->st_size = yaffs_GetObjectFileLength(obj);
+               buf->st_size = yaffs_get_obj_length(obj);
                buf->st_blksize = obj->myDev->nDataBytesPerChunk;
                buf->st_blocks = (buf->st_size + buf->st_blksize -1)/buf->st_blksize;
 #if CONFIG_YAFFS_WINCE
@@ -1295,7 +1295,7 @@ static int yaffs_do_setxattr(const YCHAR *path, const char *name, const void *da
                obj = yaffsfs_FollowLink(obj,0);
 
        if(obj) {
-               retVal = yaffs_SetXAttribute(obj,name,data,size,flags);
+               retVal = yaffs_set_xattrib(obj,name,data,size,flags);
                if(retVal< 0){
                        yaffsfs_SetError(retVal);
                        retVal = -1;
@@ -1332,7 +1332,7 @@ int yaffs_fsetxattr(int fd, const char *name, const void *data, int size, int fl
        obj = yaffsfs_GetHandleObject(fd);
 
        if(obj) {
-               retVal = yaffs_SetXAttribute(obj,name,data,size,flags);
+               retVal = yaffs_set_xattrib(obj,name,data,size,flags);
                if(retVal< 0){
                        yaffsfs_SetError(retVal);
                        retVal = -1;
@@ -1359,7 +1359,7 @@ static int yaffs_do_getxattr(const YCHAR *path, const char *name, void *data, in
                obj = yaffsfs_FollowLink(obj,0);
 
        if(obj) {
-               retVal = yaffs_GetXAttribute(obj,name,data,size);
+               retVal = yaffs_get_xattrib(obj,name,data,size);
                if(retVal< 0){
                        yaffsfs_SetError(retVal);
                        retVal = -1;
@@ -1395,7 +1395,7 @@ int yaffs_fgetxattr(int fd, const char *name, void *data, int size)
        obj = yaffsfs_GetHandleObject(fd);
 
        if(obj) {
-               retVal = yaffs_GetXAttribute(obj,name,data,size);
+               retVal = yaffs_get_xattrib(obj,name,data,size);
                if(retVal< 0){
                        yaffsfs_SetError(retVal);
                        retVal = -1;
@@ -1422,7 +1422,7 @@ static int yaffs_do_listxattr(const YCHAR *path, char *data, int size, int follo
                obj = yaffsfs_FollowLink(obj,0);
 
        if(obj) {
-               retVal = yaffs_ListXAttributes(obj, data,size);
+               retVal = yaffs_list_xattrib(obj, data,size);
                if(retVal< 0){
                        yaffsfs_SetError(retVal);
                        retVal = -1;
@@ -1457,7 +1457,7 @@ int yaffs_flistxattr(int fd, char *data, int size)
        obj = yaffsfs_GetHandleObject(fd);
 
        if(obj) {
-               retVal = yaffs_ListXAttributes(obj,data,size);
+               retVal = yaffs_list_xattrib(obj,data,size);
                if(retVal< 0){
                        yaffsfs_SetError(retVal);
                        retVal = -1;
@@ -1484,7 +1484,7 @@ static int yaffs_do_removexattr(const YCHAR *path, const char *name, int follow)
                obj = yaffsfs_FollowLink(obj,0);
 
        if(obj) {
-               retVal = yaffs_RemoveXAttribute(obj,name);
+               retVal = yaffs_remove_xattrib(obj,name);
                if(retVal< 0){
                        yaffsfs_SetError(retVal);
                        retVal = -1;
@@ -1519,7 +1519,7 @@ int yaffs_fremovexattr(int fd, const char *name)
        obj = yaffsfs_GetHandleObject(fd);
 
        if(obj){
-               retVal = yaffs_RemoveXAttribute(obj,name);
+               retVal = yaffs_remove_xattrib(obj,name);
                if(retVal< 0){
                        yaffsfs_SetError(retVal);
                        retVal = -1;
@@ -1599,7 +1599,7 @@ int yaffs_set_wince_times(int fd,
                 }
 
                 obj->dirty = 1;
-                result = yaffs_FlushFile(obj,0,0);
+                result = yaffs_flush_file(obj,0,0);
                 retVal = 0;
         } else
                /* bad handle */
@@ -1618,12 +1618,12 @@ static int yaffsfs_DoChMod(yaffs_Object *obj,mode_t mode)
        int result = -1;
 
        if(obj)
-               obj = yaffs_GetEquivalentObject(obj);
+               obj = yaffs_get_equivalent_obj(obj);
 
        if(obj) {
                obj->yst_mode = mode;
                obj->dirty = 1;
-               result = yaffs_FlushFile(obj,0,0);
+               result = yaffs_flush_file(obj,0,0);
        }
 
        return result == YAFFS_OK ? 0 : -1;
@@ -1727,13 +1727,13 @@ int yaffs_mkdir(const YCHAR *path, mode_t mode)
                yaffsfs_SetError(-EINVAL);
        } else {
                if(parent)
-                       dir = yaffs_MknodDirectory(parent,name,mode,0,0);
+                       dir = yaffs_create_dir(parent,name,mode,0,0);
                if(dir)
                        retVal = 0;
                else {
                        if(!parent)
                                yaffsfs_SetError(-ENOENT); /* missing path */
-                       else if (yaffs_FindObjectByName(parent,name))
+                       else if (yaffs_find_by_name(parent,name))
                                yaffsfs_SetError(-EEXIST); /* the name already exists */
                        else
                                yaffsfs_SetError(-ENOSPC); /* just assume no space */
@@ -1771,7 +1771,7 @@ int yaffs_mount2(const YCHAR *path,int readOnly)
        if(dev){
                if(!dev->isMounted){
                        dev->readOnly = readOnly ? 1 : 0;
-                       result = yaffs_GutsInitialise(dev);
+                       result = yaffs_guts_initialise(dev);
                        if(result == YAFFS_FAIL)
                                /* todo error - mount failed */
                                yaffsfs_SetError(-ENOMEM);
@@ -1806,8 +1806,8 @@ int yaffs_sync(const YCHAR *path)
         if(dev){
                 if(dev->isMounted){
                         
-                        yaffs_FlushEntireDeviceCache(dev);
-                        yaffs_CheckpointSave(dev);
+                        yaffs_flush_whole_cache(dev);
+                        yaffs_checkpoint_save(dev);
                         retVal = 0;
                         
                 } else
@@ -1836,7 +1836,7 @@ int yaffs_remount(const YCHAR *path, int force, int readOnly)
                        int i;
                        int inUse;
 
-                       yaffs_FlushEntireDeviceCache(dev);
+                       yaffs_flush_whole_cache(dev);
 
                        for(i = inUse = 0; i < YAFFSFS_N_HANDLES && !inUse && !force; i++){
                                if(yaffsfs_handle[i].useCount>0 && yaffsfs_inode[yaffsfs_handle[i].inodeId].iObj->myDev == dev)
@@ -1845,7 +1845,7 @@ int yaffs_remount(const YCHAR *path, int force, int readOnly)
 
                        if(!inUse || force){
                                if(readOnly)
-                                       yaffs_CheckpointSave(dev);
+                                       yaffs_checkpoint_save(dev);
                                dev->readOnly =  readOnly ? 1 : 0;
                                retVal = 0;
                        } else
@@ -1876,8 +1876,8 @@ int yaffs_unmount2(const YCHAR *path, int force)
                        int i;
                        int inUse;
 
-                       yaffs_FlushEntireDeviceCache(dev);
-                       yaffs_CheckpointSave(dev);
+                       yaffs_flush_whole_cache(dev);
+                       yaffs_checkpoint_save(dev);
 
                        for(i = inUse = 0; i < YAFFSFS_N_HANDLES && !inUse; i++){
                                if(yaffsfs_handle[i].useCount > 0 && yaffsfs_inode[yaffsfs_handle[i].inodeId].iObj->myDev == dev)
@@ -1885,7 +1885,7 @@ int yaffs_unmount2(const YCHAR *path, int force)
                        }
 
                        if(!inUse || force){
-                               yaffs_Deinitialise(dev);
+                               yaffs_deinitialise(dev);
 
                                retVal = 0;
                        } else
@@ -1920,7 +1920,7 @@ loff_t yaffs_freespace(const YCHAR *path)
        yaffsfs_Lock();
        dev = yaffsfs_FindDevice(path,&dummy);
        if(dev  && dev->isMounted){
-               retVal = yaffs_GetNumberOfFreeChunks(dev);
+               retVal = yaffs_get_n_free_chunks(dev);
                retVal *= dev->nDataBytesPerChunk;
 
        } else
@@ -1972,7 +1972,7 @@ int yaffs_inodecount(const YCHAR *path)
 }
 
 
-void yaffs_AddDevice(yaffs_Device *dev)
+void yaffs_add_device(yaffs_Device *dev)
 {
        dev->isMounted = 0;
        dev->param.removeObjectCallback = yaffsfs_RemoveObjectCallback;
@@ -1983,7 +1983,7 @@ void yaffs_AddDevice(yaffs_Device *dev)
        ylist_add(&dev->devList,&yaffsfs_deviceList);
 }
 
-void yaffs_RemoveDevice(yaffs_Device *dev)
+void yaffs_remove_device(yaffs_Device *dev)
 {
        ylist_del_init(&dev->devList);
 }
@@ -2126,10 +2126,10 @@ struct yaffs_dirent *yaffs_readdir(yaffs_DIR *dirp)
        if(dsc && dsc->magic == YAFFS_MAGIC){
                yaffsfs_SetError(0);
                if(dsc->nextReturn){
-                       dsc->de.d_ino = yaffs_GetEquivalentObject(dsc->nextReturn)->objectId;
+                       dsc->de.d_ino = yaffs_get_equivalent_obj(dsc->nextReturn)->objectId;
                        dsc->de.d_dont_use = (unsigned)dsc->nextReturn;
                        dsc->de.d_off = dsc->offset++;
-                       yaffs_GetObjectName(dsc->nextReturn,dsc->de.d_name,NAME_MAX);
+                       yaffs_get_obj_name(dsc->nextReturn,dsc->de.d_name,NAME_MAX);
                        if(yaffs_strnlen(dsc->de.d_name,NAME_MAX+1) == 0)
                        {
                                /* this should not happen! */
@@ -2190,7 +2190,7 @@ int yaffs_symlink(const YCHAR *oldpath, const YCHAR *newpath)
        if(parent && parent->myDev->readOnly)
                yaffsfs_SetError(-EINVAL);
        else if(parent){
-               obj = yaffs_MknodSymLink(parent,name,mode,0,0,oldpath);
+               obj = yaffs_create_symlink(parent,name,mode,0,0,oldpath);
                if(obj)
                        retVal = 0;
                else{
@@ -2316,12 +2316,12 @@ int yaffs_n_handles(const YCHAR *path)
 
        obj = yaffsfs_FindObject(NULL,path,0);
        if(obj)
-               obj = yaffs_GetEquivalentObject(obj);
+               obj = yaffs_get_equivalent_obj(obj);
 
        return yaffsfs_CountHandles(obj);
 }
 
-int yaffs_DumpDevStruct(const YCHAR *path)
+int yaffs_dump_dev(const YCHAR *path)
 {
 #if 0
        YCHAR *rest;
index 36b7e5a..2a450e9 100644 (file)
@@ -167,14 +167,14 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int shareMode) ;
 
 
 struct yaffs_DeviceStruct;
-void yaffs_AddDevice(struct yaffs_DeviceStruct *dev);
+void yaffs_add_device(struct yaffs_DeviceStruct *dev);
 
-int yaffs_StartUp(void);
+int yaffs_start_up(void);
 
 
 /* Function only for debugging */
 void * yaffs_getdev(const YCHAR *path);
-int yaffs_DumpDevStruct(const YCHAR *path);
+int yaffs_dump_dev(const YCHAR *path);
 
 #endif
 
index 677ab8a..824ce20 100644 (file)
@@ -84,7 +84,7 @@
 #define YAFFS_ROOT_MODE                                0666
 #define YAFFS_LOSTNFOUND_MODE          0666
 
-#define yaffs_SumCompare(x,y) ((x) == (y))
+#define yaffs_sum_cmp(x,y) ((x) == (y))
 #define yaffs_strcmp(a,b) strcmp(a,b)
 
 #include "yaffsfs.h"
index 8f73ac4..6d95651 100644 (file)
@@ -185,7 +185,7 @@ int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND,
        }
 
        if (tags)
-               yaffs_UnpackTags2(tags, &pt);
+               yaffs_unpack_tags2(tags, &pt);
 
        if (retval == 0)
                return YAFFS_OK;
index b5f9606..f40a657 100644 (file)
@@ -37,7 +37,7 @@
 #include "yaffs_tagsvalidity.h"
 #include "yaffs_packedtags2.h"
 
-unsigned yaffs_traceMask=0;
+unsigned yaffs_trace_mask=0;
 
 #define MAX_OBJECTS 10000
 
@@ -190,7 +190,7 @@ static int write_chunk(__u8 *data, __u32 objId, __u32 chunkId, __u32 nBytes)
        if (write(outFile,data,chunkSize) != chunkSize)
                fatal("write");
 
-       yaffs_InitialiseTags(&t);
+       yaffs_init_tags(&t);
        
        t.chunkId = chunkId;
 //     t.serialNumber = 0;
index e8434e8..b7173eb 100644 (file)
@@ -113,7 +113,7 @@ static int find_obj_in_list(dev_t dev, ino_t ino)
 }
 
 // NCB added 10/9/2002
-static __u16 yaffs_CalcNameSum(const char *name)
+static __u16 yaffs_calc_name_sum(const char *name)
 {
        __u16 sum = 0;
        __u16 i = 1;
@@ -130,13 +130,13 @@ static __u16 yaffs_CalcNameSum(const char *name)
 }
 
 
-static void yaffs_CalcECC(const __u8 *data, yaffs_Spare *spare)
+static void yaffs_calc_ecc(const __u8 *data, yaffs_Spare *spare)
 {
-       yaffs_ECCCalculate(data , spare->ecc1);
-       yaffs_ECCCalculate(&data[256] , spare->ecc2);
+       yaffs_ecc_cacl(data , spare->ecc1);
+       yaffs_ecc_cacl(&data[256] , spare->ecc2);
 }
 
-static void yaffs_CalcTagsECC(yaffs_Tags *tags)
+static void yaffs_calc_tags_ecc(yaffs_Tags *tags)
 {
        // Todo don't do anything yet. Need to calculate ecc
        unsigned char *b = ((yaffs_TagsUnion *)tags)->asBytes;
@@ -181,11 +181,11 @@ static void yaffs_CalcTagsECC(yaffs_Tags *tags)
         b[7] |= ((ecc & 0x3F) << 2);
     }
 }
-static void yaffs_LoadTagsIntoSpare(yaffs_Spare *sparePtr, yaffs_Tags *tagsPtr)
+static void yaffs_load_tags_to_spare(yaffs_Spare *sparePtr, yaffs_Tags *tagsPtr)
 {
        yaffs_TagsUnion *tu = (yaffs_TagsUnion *)tagsPtr;
        
-       //yaffs_CalcTagsECC(tagsPtr);
+       //yaffs_calc_tags_ecc(tagsPtr);
        
        sparePtr->tagByte0 = tu->asBytes[0];
        sparePtr->tagByte1 = tu->asBytes[1];
@@ -249,9 +249,9 @@ static int write_chunk(__u8 *data, __u32 objId, __u32 chunkId, __u32 nBytes)
         little_to_big_endian(&t);
     }
        
-       yaffs_CalcTagsECC(&t);
-       yaffs_LoadTagsIntoSpare(&s,&t);
-       yaffs_CalcECC(data,&s);
+       yaffs_calc_tags_ecc(&t);
+       yaffs_load_tags_to_spare(&s,&t);
+       yaffs_calc_ecc(data,&s);
        
        nPages++;
        
index ab44bc7..41200ee 100644 (file)
 
 #ifdef CONFIG_YAFFS_YMALLOC_ALLOCATOR
 
-void yaffs_DeinitialiseRawTnodesAndObjects(yaffs_Device *dev)
+void yaffs_deinit_raw_tnodes_and_objs(yaffs_Device *dev)
 {
        dev = dev;
 }
 
-void yaffs_InitialiseRawTnodesAndObjects(yaffs_Device *dev)
+void yaffs_init_raw_tnodes_and_objs(yaffs_Device *dev)
 {
        dev = dev;
 }
 
-yaffs_Tnode *yaffs_AllocateRawTnode(yaffs_Device *dev)
+yaffs_Tnode *yaffs_alloc_raw_tnode(yaffs_Device *dev)
 {
        return (yaffs_Tnode *)YMALLOC(dev->tnodeSize);
 }
 
-void yaffs_FreeRawTnode(yaffs_Device *dev, yaffs_Tnode *tn)
+void yaffs_free_raw_tnode(yaffs_Device *dev, yaffs_Tnode *tn)
 {
        dev = dev;
        YFREE(tn);
 }
 
-void yaffs_InitialiseRawObjects(yaffs_Device *dev)
+void yaffs_init_raw_objs(yaffs_Device *dev)
 {
        dev = dev;
 }
 
-void yaffs_DeinitialiseRawObjects(yaffs_Device *dev)
+void yaffs_deinit_raw_objs(yaffs_Device *dev)
 {
        dev = dev;
 }
 
-yaffs_Object *yaffs_AllocateRawObject(yaffs_Device *dev)
+yaffs_Object *yaffs_alloc_raw_obj(yaffs_Device *dev)
 {
        dev = dev;
        return (yaffs_Object *) YMALLOC(sizeof(yaffs_Object));
 }
 
 
-void yaffs_FreeRawObject(yaffs_Device *dev, yaffs_Object *obj)
+void yaffs_free_raw_obj(yaffs_Device *dev, yaffs_Object *obj)
 {
 
        dev = dev;
@@ -99,7 +99,7 @@ struct yaffs_AllocatorStruct {
 typedef struct yaffs_AllocatorStruct yaffs_Allocator;
 
 
-static void yaffs_DeinitialiseRawTnodes(yaffs_Device *dev)
+static void yaffs_deinit_raw_tnodes(yaffs_Device *dev)
 {
 
        yaffs_Allocator *allocator = (yaffs_Allocator *)dev->allocator;
@@ -125,7 +125,7 @@ static void yaffs_DeinitialiseRawTnodes(yaffs_Device *dev)
        allocator->nTnodesCreated = 0;
 }
 
-static void yaffs_InitialiseRawTnodes(yaffs_Device *dev)
+static void yaffs_init_raw_tnodes(yaffs_Device *dev)
 {
        yaffs_Allocator *allocator = dev->allocator;
 
@@ -138,7 +138,7 @@ static void yaffs_InitialiseRawTnodes(yaffs_Device *dev)
                YBUG();
 }
 
-static int yaffs_CreateTnodes(yaffs_Device *dev, int nTnodes)
+static int yaffs_create_tnodes(yaffs_Device *dev, int nTnodes)
 {
        yaffs_Allocator *allocator = (yaffs_Allocator *)dev->allocator;
        int i;
@@ -205,7 +205,7 @@ static int yaffs_CreateTnodes(yaffs_Device *dev, int nTnodes)
 }
 
 
-yaffs_Tnode *yaffs_AllocateRawTnode(yaffs_Device *dev)
+yaffs_Tnode *yaffs_alloc_raw_tnode(yaffs_Device *dev)
 {
        yaffs_Allocator *allocator = (yaffs_Allocator *)dev->allocator;
        yaffs_Tnode *tn = NULL;
@@ -217,7 +217,7 @@ yaffs_Tnode *yaffs_AllocateRawTnode(yaffs_Device *dev)
 
        /* If there are none left make more */
        if (!allocator->freeTnodes)
-               yaffs_CreateTnodes(dev, YAFFS_ALLOCATION_NTNODES);
+               yaffs_create_tnodes(dev, YAFFS_ALLOCATION_NTNODES);
 
        if (allocator->freeTnodes) {
                tn = allocator->freeTnodes;
@@ -229,7 +229,7 @@ yaffs_Tnode *yaffs_AllocateRawTnode(yaffs_Device *dev)
 }
 
 /* FreeTnode frees up a tnode and puts it back on the free list */
-void yaffs_FreeRawTnode(yaffs_Device *dev, yaffs_Tnode *tn)
+void yaffs_free_raw_tnode(yaffs_Device *dev, yaffs_Tnode *tn)
 {
        yaffs_Allocator *allocator = dev->allocator;
 
@@ -248,7 +248,7 @@ void yaffs_FreeRawTnode(yaffs_Device *dev, yaffs_Tnode *tn)
 
 
 
-static void yaffs_InitialiseRawObjects(yaffs_Device *dev)
+static void yaffs_init_raw_objs(yaffs_Device *dev)
 {
        yaffs_Allocator *allocator = dev->allocator;
 
@@ -260,7 +260,7 @@ static void yaffs_InitialiseRawObjects(yaffs_Device *dev)
                YBUG();
 }
 
-static void yaffs_DeinitialiseRawObjects(yaffs_Device *dev)
+static void yaffs_deinit_raw_objs(yaffs_Device *dev)
 {
        yaffs_Allocator *allocator = dev->allocator;
        yaffs_ObjectList *tmp;
@@ -284,7 +284,7 @@ static void yaffs_DeinitialiseRawObjects(yaffs_Device *dev)
 }
 
 
-static int yaffs_CreateFreeObjects(yaffs_Device *dev, int nObjects)
+static int yaffs_create_free_objs(yaffs_Device *dev, int nObjects)
 {
        yaffs_Allocator *allocator = dev->allocator;
 
@@ -338,7 +338,7 @@ static int yaffs_CreateFreeObjects(yaffs_Device *dev, int nObjects)
        return YAFFS_OK;
 }
 
-yaffs_Object *yaffs_AllocateRawObject(yaffs_Device *dev)
+yaffs_Object *yaffs_alloc_raw_obj(yaffs_Device *dev)
 {
        yaffs_Object *obj = NULL;
        yaffs_Allocator *allocator = dev->allocator;
@@ -350,7 +350,7 @@ yaffs_Object *yaffs_AllocateRawObject(yaffs_Device *dev)
 
        /* If there are none left make more */
        if (!allocator->freeObjects)
-               yaffs_CreateFreeObjects(dev, YAFFS_ALLOCATION_NOBJECTS);
+               yaffs_create_free_objs(dev, YAFFS_ALLOCATION_NOBJECTS);
 
        if (allocator->freeObjects) {
                obj = allocator->freeObjects;
@@ -363,7 +363,7 @@ yaffs_Object *yaffs_AllocateRawObject(yaffs_Device *dev)
 }
 
 
-void yaffs_FreeRawObject(yaffs_Device *dev, yaffs_Object *obj)
+void yaffs_free_raw_obj(yaffs_Device *dev, yaffs_Object *obj)
 {
 
        yaffs_Allocator *allocator = dev->allocator;
@@ -378,11 +378,11 @@ void yaffs_FreeRawObject(yaffs_Device *dev, yaffs_Object *obj)
        }
 }
 
-void yaffs_DeinitialiseRawTnodesAndObjects(yaffs_Device *dev)
+void yaffs_deinit_raw_tnodes_and_objs(yaffs_Device *dev)
 {
        if(dev->allocator){
-               yaffs_DeinitialiseRawTnodes(dev);
-               yaffs_DeinitialiseRawObjects(dev);
+               yaffs_deinit_raw_tnodes(dev);
+               yaffs_deinit_raw_objs(dev);
 
                YFREE(dev->allocator);
                dev->allocator=NULL;
@@ -390,7 +390,7 @@ void yaffs_DeinitialiseRawTnodesAndObjects(yaffs_Device *dev)
                YBUG();
 }
 
-void yaffs_InitialiseRawTnodesAndObjects(yaffs_Device *dev)
+void yaffs_init_raw_tnodes_and_objs(yaffs_Device *dev)
 {
        yaffs_Allocator *allocator;
 
@@ -398,8 +398,8 @@ void yaffs_InitialiseRawTnodesAndObjects(yaffs_Device *dev)
                allocator = YMALLOC(sizeof(yaffs_Allocator));
                if(allocator){
                        dev->allocator = allocator;
-                       yaffs_InitialiseRawTnodes(dev);
-                       yaffs_InitialiseRawObjects(dev);
+                       yaffs_init_raw_tnodes(dev);
+                       yaffs_init_raw_objs(dev);
                }
        } else
                YBUG();
index b0a5d11..1212081 100644 (file)
 
 #include "yaffs_guts.h"
 
-void yaffs_InitialiseRawTnodesAndObjects(yaffs_Device *dev);
-void yaffs_DeinitialiseRawTnodesAndObjects(yaffs_Device *dev);
+void yaffs_init_raw_tnodes_and_objs(yaffs_Device *dev);
+void yaffs_deinit_raw_tnodes_and_objs(yaffs_Device *dev);
 
-yaffs_Tnode *yaffs_AllocateRawTnode(yaffs_Device *dev);
-void yaffs_FreeRawTnode(yaffs_Device *dev, yaffs_Tnode *tn);
+yaffs_Tnode *yaffs_alloc_raw_tnode(yaffs_Device *dev);
+void yaffs_free_raw_tnode(yaffs_Device *dev, yaffs_Tnode *tn);
 
-yaffs_Object *yaffs_AllocateRawObject(yaffs_Device *dev);
-void yaffs_FreeRawObject(yaffs_Device *dev, yaffs_Object *obj);
+yaffs_Object *yaffs_alloc_raw_obj(yaffs_Device *dev);
+void yaffs_free_raw_obj(yaffs_Device *dev, yaffs_Object *obj);
 
 #endif
index c7e9e8c..a24dbb7 100644 (file)
@@ -29,7 +29,7 @@ static Y_INLINE __u8 *yaffs_BlockBits(yaffs_Device *dev, int blk)
                (dev->chunkBitmapStride * (blk - dev->internalStartBlock));
 }
 
-void yaffs_VerifyChunkBitId(yaffs_Device *dev, int blk, int chunk)
+void yaffs_verify_chunk_bit_id(yaffs_Device *dev, int blk, int chunk)
 {
        if (blk < dev->internalStartBlock || blk > dev->internalEndBlock ||
                        chunk < 0 || chunk >= dev->param.nChunksPerBlock) {
@@ -40,40 +40,40 @@ void yaffs_VerifyChunkBitId(yaffs_Device *dev, int blk, int chunk)
        }
 }
 
-void yaffs_ClearChunkBits(yaffs_Device *dev, int blk)
+void yaffs_clear_chunk_bits(yaffs_Device *dev, int blk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
 
        memset(blkBits, 0, dev->chunkBitmapStride);
 }
 
-void yaffs_ClearChunkBit(yaffs_Device *dev, int blk, int chunk)
+void yaffs_clear_chunk_bit(yaffs_Device *dev, int blk, int chunk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
 
-       yaffs_VerifyChunkBitId(dev, blk, chunk);
+       yaffs_verify_chunk_bit_id(dev, blk, chunk);
 
        blkBits[chunk / 8] &= ~(1 << (chunk & 7));
 }
 
-void yaffs_SetChunkBit(yaffs_Device *dev, int blk, int chunk)
+void yaffs_set_chunk_bit(yaffs_Device *dev, int blk, int chunk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
 
-       yaffs_VerifyChunkBitId(dev, blk, chunk);
+       yaffs_verify_chunk_bit_id(dev, blk, chunk);
 
        blkBits[chunk / 8] |= (1 << (chunk & 7));
 }
 
-int yaffs_CheckChunkBit(yaffs_Device *dev, int blk, int chunk)
+int yaffs_check_chunk_bit(yaffs_Device *dev, int blk, int chunk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
-       yaffs_VerifyChunkBitId(dev, blk, chunk);
+       yaffs_verify_chunk_bit_id(dev, blk, chunk);
 
        return (blkBits[chunk / 8] & (1 << (chunk & 7))) ? 1 : 0;
 }
 
-int yaffs_StillSomeChunkBits(yaffs_Device *dev, int blk)
+int yaffs_still_some_chunks(yaffs_Device *dev, int blk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
        int i;
@@ -85,7 +85,7 @@ int yaffs_StillSomeChunkBits(yaffs_Device *dev, int blk)
        return 0;
 }
 
-int yaffs_CountChunkBits(yaffs_Device *dev, int blk)
+int yaffs_count_chunk_bits(yaffs_Device *dev, int blk)
 {
        __u8 *blkBits = yaffs_BlockBits(dev, blk);
        int i;
index a0ad130..d693b31 100644 (file)
 
 #include "yaffs_guts.h"
 
-void yaffs_VerifyChunkBitId(yaffs_Device *dev, int blk, int chunk);
-void yaffs_ClearChunkBits(yaffs_Device *dev, int blk);
-void yaffs_ClearChunkBit(yaffs_Device *dev, int blk, int chunk);
-void yaffs_SetChunkBit(yaffs_Device *dev, int blk, int chunk);
-int yaffs_CheckChunkBit(yaffs_Device *dev, int blk, int chunk);
-int yaffs_StillSomeChunkBits(yaffs_Device *dev, int blk);
-int yaffs_CountChunkBits(yaffs_Device *dev, int blk);
+void yaffs_verify_chunk_bit_id(yaffs_Device *dev, int blk, int chunk);
+void yaffs_clear_chunk_bits(yaffs_Device *dev, int blk);
+void yaffs_clear_chunk_bit(yaffs_Device *dev, int blk, int chunk);
+void yaffs_set_chunk_bit(yaffs_Device *dev, int blk, int chunk);
+int yaffs_check_chunk_bit(yaffs_Device *dev, int blk, int chunk);
+int yaffs_still_some_chunks(yaffs_Device *dev, int blk);
+int yaffs_count_chunk_bits(yaffs_Device *dev, int blk);
 
 #endif
index 16c9f84..c047caf 100644 (file)
@@ -14,7 +14,7 @@
 #include "yaffs_checkptrw.h"
 #include "yaffs_getblockinfo.h"
 
-static int yaffs2_CheckpointSpaceOk(yaffs_Device *dev)
+static int yaffs2_checkpt_space_ok(yaffs_Device *dev)
 {
        int blocksAvailable = dev->nErasedBlocks - dev->param.nReservedBlocks;
 
@@ -26,7 +26,7 @@ static int yaffs2_CheckpointSpaceOk(yaffs_Device *dev)
 }
 
 
-static int yaffs2_CheckpointErase(yaffs_Device *dev)
+static int yaffs_checkpt_erase(yaffs_Device *dev)
 {
        int i;
 
@@ -36,7 +36,7 @@ static int yaffs2_CheckpointErase(yaffs_Device *dev)
                dev->internalStartBlock, dev->internalEndBlock));
 
        for (i = dev->internalStartBlock; i <= dev->internalEndBlock; i++) {
-               yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, i);
+               yaffs_BlockInfo *bi = yaffs_get_block_info(dev, i);
                if (bi->blockState == YAFFS_BLOCK_STATE_CHECKPOINT) {
                        T(YAFFS_TRACE_CHECKPOINT, (TSTR("erasing checkpt block %d"TENDSTR), i));
 
@@ -59,7 +59,7 @@ static int yaffs2_CheckpointErase(yaffs_Device *dev)
 }
 
 
-static void yaffs2_CheckpointFindNextErasedBlock(yaffs_Device *dev)
+static void yaffs2_checkpt_find_erased_block(yaffs_Device *dev)
 {
        int  i;
        int blocksAvailable = dev->nErasedBlocks - dev->param.nReservedBlocks;
@@ -72,7 +72,7 @@ static void yaffs2_CheckpointFindNextErasedBlock(yaffs_Device *dev)
                        blocksAvailable > 0) {
 
                for (i = dev->checkpointNextBlock; i <= dev->internalEndBlock; i++) {
-                       yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, i);
+                       yaffs_BlockInfo *bi = yaffs_get_block_info(dev, i);
                        if (bi->blockState == YAFFS_BLOCK_STATE_EMPTY) {
                                dev->checkpointNextBlock = i + 1;
                                dev->checkpointCurrentBlock = i;
@@ -87,7 +87,7 @@ static void yaffs2_CheckpointFindNextErasedBlock(yaffs_Device *dev)
        dev->checkpointCurrentBlock = -1;
 }
 
-static void yaffs2_CheckpointFindNextCheckpointBlock(yaffs_Device *dev)
+static void yaffs2_checkpt_find_block(yaffs_Device *dev)
 {
        int  i;
        yaffs_ExtendedTags tags;
@@ -123,7 +123,7 @@ static void yaffs2_CheckpointFindNextCheckpointBlock(yaffs_Device *dev)
 }
 
 
-int yaffs2_CheckpointOpen(yaffs_Device *dev, int forWriting)
+int yaffs2_checkpt_open(yaffs_Device *dev, int forWriting)
 {
 
 
@@ -136,7 +136,7 @@ int yaffs2_CheckpointOpen(yaffs_Device *dev, int forWriting)
                !dev->param.markNANDBlockBad)
                return 0;
 
-       if (forWriting && !yaffs2_CheckpointSpaceOk(dev))
+       if (forWriting && !yaffs2_checkpt_space_ok(dev))
                return 0;
 
        if (!dev->checkpointBuffer)
@@ -157,7 +157,7 @@ int yaffs2_CheckpointOpen(yaffs_Device *dev, int forWriting)
        if (forWriting) {
                memset(dev->checkpointBuffer, 0, dev->nDataBytesPerChunk);
                dev->checkpointByteOffset = 0;
-               return yaffs2_CheckpointErase(dev);
+               return yaffs_checkpt_erase(dev);
        } else {
                int i;
                /* Set to a value that will kick off a read */
@@ -177,7 +177,7 @@ int yaffs2_CheckpointOpen(yaffs_Device *dev, int forWriting)
        return 1;
 }
 
-int yaffs2_GetCheckpointSum(yaffs_Device *dev, __u32 *sum)
+int yaffs2_get_checkpt_sum(yaffs_Device *dev, __u32 *sum)
 {
        __u32 compositeSum;
        compositeSum =  (dev->checkpointSum << 8) | (dev->checkpointXor & 0xFF);
@@ -185,7 +185,7 @@ int yaffs2_GetCheckpointSum(yaffs_Device *dev, __u32 *sum)
        return 1;
 }
 
-static int yaffs2_CheckpointFlushBuffer(yaffs_Device *dev)
+static int yaffs2_checkpt_flush_buffer(yaffs_Device *dev)
 {
        int chunk;
        int realignedChunk;
@@ -193,7 +193,7 @@ static int yaffs2_CheckpointFlushBuffer(yaffs_Device *dev)
        yaffs_ExtendedTags tags;
 
        if (dev->checkpointCurrentBlock < 0) {
-               yaffs2_CheckpointFindNextErasedBlock(dev);
+               yaffs2_checkpt_find_erased_block(dev);
                dev->checkpointCurrentChunk = 0;
        }
 
@@ -208,7 +208,7 @@ static int yaffs2_CheckpointFlushBuffer(yaffs_Device *dev)
        if (dev->checkpointCurrentChunk == 0) {
                /* First chunk we write for the block? Set block state to
                   checkpoint */
-               yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, dev->checkpointCurrentBlock);
+               yaffs_BlockInfo *bi = yaffs_get_block_info(dev, dev->checkpointCurrentBlock);
                bi->blockState = YAFFS_BLOCK_STATE_CHECKPOINT;
                dev->blocksInCheckpoint++;
        }
@@ -238,7 +238,7 @@ static int yaffs2_CheckpointFlushBuffer(yaffs_Device *dev)
 }
 
 
-int yaffs2_CheckpointWrite(yaffs_Device *dev, const void *data, int nBytes)
+int yaffs2_checkpt_wr(yaffs_Device *dev, const void *data, int nBytes)
 {
        int i = 0;
        int ok = 1;
@@ -267,13 +267,13 @@ int yaffs2_CheckpointWrite(yaffs_Device *dev, const void *data, int nBytes)
 
                if (dev->checkpointByteOffset < 0 ||
                   dev->checkpointByteOffset >= dev->nDataBytesPerChunk)
-                       ok = yaffs2_CheckpointFlushBuffer(dev);
+                       ok = yaffs2_checkpt_flush_buffer(dev);
        }
 
        return i;
 }
 
-int yaffs2_CheckpointRead(yaffs_Device *dev, void *data, int nBytes)
+int yaffs2_checkpt_rd(yaffs_Device *dev, void *data, int nBytes)
 {
        int i = 0;
        int ok = 1;
@@ -298,7 +298,7 @@ int yaffs2_CheckpointRead(yaffs_Device *dev, void *data, int nBytes)
                        dev->checkpointByteOffset >= dev->nDataBytesPerChunk) {
 
                        if (dev->checkpointCurrentBlock < 0) {
-                               yaffs2_CheckpointFindNextCheckpointBlock(dev);
+                               yaffs2_checkpt_find_block(dev);
                                dev->checkpointCurrentChunk = 0;
                        }
 
@@ -348,19 +348,19 @@ int yaffs2_CheckpointRead(yaffs_Device *dev, void *data, int nBytes)
        return  i;
 }
 
-int yaffs2_CheckpointClose(yaffs_Device *dev)
+int yaffs_checkpt_close(yaffs_Device *dev)
 {
 
        if (dev->checkpointOpenForWrite) {
                if (dev->checkpointByteOffset != 0)
-                       yaffs2_CheckpointFlushBuffer(dev);
+                       yaffs2_checkpt_flush_buffer(dev);
        } else if(dev->checkpointBlockList){
                int i;
                for (i = 0; i < dev->blocksInCheckpoint && dev->checkpointBlockList[i] >= 0; i++) {
                        int blk = dev->checkpointBlockList[i];
                        yaffs_BlockInfo *bi = NULL;
                        if( dev->internalStartBlock <= blk && blk <= dev->internalEndBlock)
-                               bi = yaffs_GetBlockInfo(dev, blk);
+                               bi = yaffs_get_block_info(dev, blk);
                        if (bi && bi->blockState == YAFFS_BLOCK_STATE_EMPTY)
                                bi->blockState = YAFFS_BLOCK_STATE_CHECKPOINT;
                        else {
@@ -387,14 +387,14 @@ int yaffs2_CheckpointClose(yaffs_Device *dev)
                return 0;
 }
 
-int yaffs2_CheckpointInvalidateStream(yaffs_Device *dev)
+int yaffs2_checkpt_invalidate_stream(yaffs_Device *dev)
 {
        /* Erase the checkpoint data */
 
        T(YAFFS_TRACE_CHECKPOINT, (TSTR("checkpoint invalidate of %d blocks"TENDSTR),
                dev->blocksInCheckpoint));
 
-       return yaffs2_CheckpointErase(dev);
+       return yaffs_checkpt_erase(dev);
 }
 
 
index ea4f027..61ba179 100644 (file)
 
 #include "yaffs_guts.h"
 
-int yaffs2_CheckpointOpen(yaffs_Device *dev, int forWriting);
+int yaffs2_checkpt_open(yaffs_Device *dev, int forWriting);
 
-int yaffs2_CheckpointWrite(yaffs_Device *dev, const void *data, int nBytes);
+int yaffs2_checkpt_wr(yaffs_Device *dev, const void *data, int nBytes);
 
-int yaffs2_CheckpointRead(yaffs_Device *dev, void *data, int nBytes);
+int yaffs2_checkpt_rd(yaffs_Device *dev, void *data, int nBytes);
 
-int yaffs2_GetCheckpointSum(yaffs_Device *dev, __u32 *sum);
+int yaffs2_get_checkpt_sum(yaffs_Device *dev, __u32 *sum);
 
-int yaffs2_CheckpointClose(yaffs_Device *dev);
+int yaffs_checkpt_close(yaffs_Device *dev);
 
-int yaffs2_CheckpointInvalidateStream(yaffs_Device *dev);
+int yaffs2_checkpt_invalidate_stream(yaffs_Device *dev);
 
 
 #endif
index da6145a..71ebe76 100644 (file)
@@ -69,7 +69,7 @@ static const unsigned char column_parity_table[] = {
 
 /* Count the bits in an unsigned char or a U32 */
 
-static int yaffs_CountBits(unsigned char x)
+static int yaffs_count_bits(unsigned char x)
 {
        int r = 0;
        while (x) {
@@ -80,7 +80,7 @@ static int yaffs_CountBits(unsigned char x)
        return r;
 }
 
-static int yaffs_CountBits32(unsigned x)
+static int yaffs_count_bits32(unsigned x)
 {
        int r = 0;
        while (x) {
@@ -92,7 +92,7 @@ static int yaffs_CountBits32(unsigned x)
 }
 
 /* Calculate the ECC for a 256-byte block of data */
-void yaffs_ECCCalculate(const unsigned char *data, unsigned char *ecc)
+void yaffs_ecc_cacl(const unsigned char *data, unsigned char *ecc)
 {
        unsigned int i;
 
@@ -163,7 +163,7 @@ void yaffs_ECCCalculate(const unsigned char *data, unsigned char *ecc)
 
 /* Correct the ECC on a 256 byte block of data */
 
-int yaffs_ECCCorrect(unsigned char *data, unsigned char *read_ecc,
+int yaffs_ecc_correct(unsigned char *data, unsigned char *read_ecc,
                     const unsigned char *test_ecc)
 {
        unsigned char d0, d1, d2;       /* deltas */
@@ -223,9 +223,9 @@ int yaffs_ECCCorrect(unsigned char *data, unsigned char *read_ecc,
                return 1; /* Corrected the error */
        }
 
-       if ((yaffs_CountBits(d0) +
-            yaffs_CountBits(d1) +
-            yaffs_CountBits(d2)) ==  1) {
+       if ((yaffs_count_bits(d0) +
+            yaffs_count_bits(d1) +
+            yaffs_count_bits(d2)) ==  1) {
                /* Reccoverable error in ecc */
 
                read_ecc[0] = test_ecc[0];
@@ -245,7 +245,7 @@ int yaffs_ECCCorrect(unsigned char *data, unsigned char *read_ecc,
 /*
  * ECCxxxOther does ECC calcs on arbitrary n bytes of data
  */
-void yaffs_ECCCalculateOther(const unsigned char *data, unsigned nBytes,
+void yaffs_ecc_calc_other(const unsigned char *data, unsigned nBytes,
                                yaffs_ECCOther *eccOther)
 {
        unsigned int i;
@@ -272,7 +272,7 @@ void yaffs_ECCCalculateOther(const unsigned char *data, unsigned nBytes,
        eccOther->lineParityPrime = line_parity_prime;
 }
 
-int yaffs_ECCCorrectOther(unsigned char *data, unsigned nBytes,
+int yaffs_ecc_correct_other(unsigned char *data, unsigned nBytes,
                        yaffs_ECCOther *read_ecc,
                        const yaffs_ECCOther *test_ecc)
 {
@@ -309,8 +309,8 @@ int yaffs_ECCCorrectOther(unsigned char *data, unsigned nBytes,
                return 1; /* corrected */
        }
 
-       if ((yaffs_CountBits32(lDelta) + yaffs_CountBits32(lDeltaPrime) +
-                       yaffs_CountBits(cDelta)) == 1) {
+       if ((yaffs_count_bits32(lDelta) + yaffs_count_bits32(lDeltaPrime) +
+                       yaffs_count_bits(cDelta)) == 1) {
                /* Reccoverable error in ecc */
 
                *read_ecc = *test_ecc;
index a1ee69a..ef1fa60 100644 (file)
@@ -32,13 +32,13 @@ typedef struct {
        unsigned lineParityPrime;
 } yaffs_ECCOther;
 
-void yaffs_ECCCalculate(const unsigned char *data, unsigned char *ecc);
-int yaffs_ECCCorrect(unsigned char *data, unsigned char *read_ecc,
+void yaffs_ecc_cacl(const unsigned char *data, unsigned char *ecc);
+int yaffs_ecc_correct(unsigned char *data, unsigned char *read_ecc,
                const unsigned char *test_ecc);
 
-void yaffs_ECCCalculateOther(const unsigned char *data, unsigned nBytes,
+void yaffs_ecc_calc_other(const unsigned char *data, unsigned nBytes,
                        yaffs_ECCOther *ecc);
-int yaffs_ECCCorrectOther(unsigned char *data, unsigned nBytes,
+int yaffs_ecc_correct_other(unsigned char *data, unsigned nBytes,
                        yaffs_ECCOther *read_ecc,
                        const yaffs_ECCOther *test_ecc);
 #endif
index 71fe1de..781d0ab 100644 (file)
@@ -20,7 +20,7 @@
 #include "yaffs_trace.h"
 
 /* Function to manipulate block info */
-static Y_INLINE yaffs_BlockInfo *yaffs_GetBlockInfo(yaffs_Device * dev, int blk)
+static Y_INLINE yaffs_BlockInfo *yaffs_get_block_info(yaffs_Device * dev, int blk)
 {
        if (blk < dev->internalStartBlock || blk > dev->internalEndBlock) {
                T(YAFFS_TRACE_ERROR,
index 7e97a5f..358e464 100644 (file)
 
 
 /* Robustification (if it ever comes about...) */
-static void yaffs_RetireBlock(yaffs_Device *dev, int blockInNAND);
-static void yaffs_HandleWriteChunkError(yaffs_Device *dev, int chunkInNAND,
+static void yaffs_retire_block(yaffs_Device *dev, int blockInNAND);
+static void yaffs_handle_chunk_wr_error(yaffs_Device *dev, int chunkInNAND,
                int erasedOk);
-static void yaffs_HandleWriteChunkOk(yaffs_Device *dev, int chunkInNAND,
+static void yaffs_handle_chunk_wr_ok(yaffs_Device *dev, int chunkInNAND,
                                const __u8 *data,
                                const yaffs_ExtendedTags *tags);
-static void yaffs_HandleUpdateChunk(yaffs_Device *dev, int chunkInNAND,
+static void yaffs_handle_chunk_update(yaffs_Device *dev, int chunkInNAND,
                                const yaffs_ExtendedTags *tags);
 
 /* Other local prototypes */
-static void yaffs_UpdateParent(yaffs_Object *obj);
-static int yaffs_UnlinkObject(yaffs_Object *obj);
-static int yaffs_ObjectHasCachedWriteData(yaffs_Object *obj);
+static void yaffs_update_parent(yaffs_Object *obj);
+static int yaffs_unlink_obj(yaffs_Object *obj);
+static int yaffs_obj_cache_dirty(yaffs_Object *obj);
 
-static int yaffs_WriteNewChunkWithTagsToNAND(yaffs_Device *dev,
+static int yaffs_write_new_chunk(yaffs_Device *dev,
                                        const __u8 *buffer,
                                        yaffs_ExtendedTags *tags,
                                        int useReserve);
 
 
-static yaffs_Object *yaffs_CreateNewObject(yaffs_Device *dev, int number,
+static yaffs_Object *yaffs_new_obj(yaffs_Device *dev, int number,
                                        yaffs_ObjectType type);
 
 
-static int yaffs_ApplyXMod(yaffs_Object *obj, char *buffer, yaffs_XAttrMod *xmod);
+static int yaffs_apply_xattrib_mod(yaffs_Object *obj, char *buffer, yaffs_xattr_mod *xmod);
 
-static void yaffs_RemoveObjectFromDirectory(yaffs_Object *obj);
-static int yaffs_CheckStructures(void);
-static int yaffs_DoGenericObjectDeletion(yaffs_Object *in);
+static void yaffs_remove_obj_from_dir(yaffs_Object *obj);
+static int yaffs_check_structures(void);
+static int yaffs_generic_obj_del(yaffs_Object *in);
 
-static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct *dev,
+static int yaffs_check_chunk_erased(struct yaffs_DeviceStruct *dev,
                                int chunkInNAND);
 
-static int yaffs_UnlinkWorker(yaffs_Object *obj);
+static int yaffs_unlink_worker(yaffs_Object *obj);
 
-static int yaffs_TagsMatch(const yaffs_ExtendedTags *tags, int objectId,
+static int yaffs_tags_match(const yaffs_ExtendedTags *tags, int objectId,
                        int chunkInObject);
 
-static int yaffs_AllocateChunk(yaffs_Device *dev, int useReserve,
+static int yaffs_alloc_chunk(yaffs_Device *dev, int useReserve,
                                yaffs_BlockInfo **blockUsedPtr);
 
-static void yaffs_CheckObjectDetailsLoaded(yaffs_Object *in);
+static void yaffs_check_obj_details_loaded(yaffs_Object *in);
 
-static void yaffs_InvalidateWholeChunkCache(yaffs_Object *in);
-static void yaffs_InvalidateChunkCache(yaffs_Object *object, int chunkId);
+static void yaffs_invalidate_whole_cache(yaffs_Object *in);
+static void yaffs_invalidate_chunk_cache(yaffs_Object *object, int chunkId);
 
-static int yaffs_FindChunkInFile(yaffs_Object *in, int chunkInInode,
+static int yaffs_find_chunk_in_file(yaffs_Object *in, int chunkInInode,
                                yaffs_ExtendedTags *tags);
 
-static int yaffs_VerifyChunkWritten(yaffs_Device *dev,
+static int yaffs_verify_chunk_written(yaffs_Device *dev,
                                        int chunkInNAND,
                                        const __u8 *data,
                                        yaffs_ExtendedTags *tags);
 
 
-static void yaffs_LoadNameFromObjectHeader(yaffs_Device *dev,YCHAR *name, const YCHAR *ohName, int bufferSize);
-static void yaffs_LoadObjectHeaderFromName(yaffs_Device *dev,YCHAR *ohName, const YCHAR *name);
+static void yaffs_load_name_from_oh(yaffs_Device *dev,YCHAR *name, const YCHAR *ohName, int bufferSize);
+static void yaffs_load_oh_from_name(yaffs_Device *dev,YCHAR *ohName, const YCHAR *name);
 
 
 /* Function to calculate chunk and offset */
 
-static void yaffs_AddrToChunk(yaffs_Device *dev, loff_t addr, int *chunkOut,
+static void yaffs_addr_to_chunk(yaffs_Device *dev, loff_t addr, int *chunkOut,
                __u32 *offsetOut)
 {
        int chunk;
@@ -181,7 +181,7 @@ static __u32 Shifts(__u32 x)
  * Temporary buffer manipulations.
  */
 
-static int yaffs_InitialiseTempBuffers(yaffs_Device *dev)
+static int yaffs_init_tmp_buffers(yaffs_Device *dev)
 {
        int i;
        __u8 *buf = (__u8 *)1;
@@ -197,7 +197,7 @@ static int yaffs_InitialiseTempBuffers(yaffs_Device *dev)
        return buf ? YAFFS_OK : YAFFS_FAIL;
 }
 
-__u8 *yaffs_GetTempBuffer(yaffs_Device *dev, int lineNo)
+__u8 *yaffs_get_temp_buffer(yaffs_Device *dev, int lineNo)
 {
        int i, j;
 
@@ -237,7 +237,7 @@ __u8 *yaffs_GetTempBuffer(yaffs_Device *dev, int lineNo)
 
 }
 
-void yaffs_ReleaseTempBuffer(yaffs_Device *dev, __u8 *buffer,
+void yaffs_release_temp_buffer(yaffs_Device *dev, __u8 *buffer,
                                    int lineNo)
 {
        int i;
@@ -265,7 +265,7 @@ void yaffs_ReleaseTempBuffer(yaffs_Device *dev, __u8 *buffer,
 /*
  * Determine if we have a managed buffer.
  */
-int yaffs_IsManagedTempBuffer(yaffs_Device *dev, const __u8 *buffer)
+int yaffs_is_managed_tmp_buffer(yaffs_Device *dev, const __u8 *buffer)
 {
        int i;
 
@@ -298,7 +298,7 @@ int yaffs_IsManagedTempBuffer(yaffs_Device *dev, const __u8 *buffer)
  *  Simple hash function. Needs to have a reasonable spread
  */
 
-static Y_INLINE int yaffs_HashFunction(int n)
+static Y_INLINE int yaffs_hash_fn(int n)
 {
        n = abs(n);
        return n % YAFFS_NOBJECT_BUCKETS;
@@ -324,7 +324,7 @@ yaffs_Object *yaffs_LostNFound(yaffs_Device *dev)
  *  Erased NAND checking functions
  */
 
-int yaffs_CheckFF(__u8 *buffer, int nBytes)
+int yaffs_check_ff(__u8 *buffer, int nBytes)
 {
        /* Horrible, slow implementation */
        while (nBytes--) {
@@ -335,55 +335,55 @@ int yaffs_CheckFF(__u8 *buffer, int nBytes)
        return 1;
 }
 
-static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct *dev,
+static int yaffs_check_chunk_erased(struct yaffs_DeviceStruct *dev,
                                int chunkInNAND)
 {
        int retval = YAFFS_OK;
-       __u8 *data = yaffs_GetTempBuffer(dev, __LINE__);
+       __u8 *data = yaffs_get_temp_buffer(dev, __LINE__);
        yaffs_ExtendedTags tags;
        int result;
 
-       result = yaffs_ReadChunkWithTagsFromNAND(dev, chunkInNAND, data, &tags);
+       result = yaffs_rd_chunk_tags_nand(dev, chunkInNAND, data, &tags);
 
        if (tags.eccResult > YAFFS_ECC_RESULT_NO_ERROR)
                retval = YAFFS_FAIL;
 
-       if (!yaffs_CheckFF(data, dev->nDataBytesPerChunk) || tags.chunkUsed) {
+       if (!yaffs_check_ff(data, dev->nDataBytesPerChunk) || tags.chunkUsed) {
                T(YAFFS_TRACE_NANDACCESS,
                  (TSTR("Chunk %d not erased" TENDSTR), chunkInNAND));
                retval = YAFFS_FAIL;
        }
 
-       yaffs_ReleaseTempBuffer(dev, data, __LINE__);
+       yaffs_release_temp_buffer(dev, data, __LINE__);
 
        return retval;
 
 }
 
 
-static int yaffs_VerifyChunkWritten(yaffs_Device *dev,
+static int yaffs_verify_chunk_written(yaffs_Device *dev,
                                        int chunkInNAND,
                                        const __u8 *data,
                                        yaffs_ExtendedTags *tags)
 {
        int retval = YAFFS_OK;
        yaffs_ExtendedTags tempTags;
-       __u8 *buffer = yaffs_GetTempBuffer(dev,__LINE__);
+       __u8 *buffer = yaffs_get_temp_buffer(dev,__LINE__);
        int result;
        
-       result = yaffs_ReadChunkWithTagsFromNAND(dev,chunkInNAND,buffer,&tempTags);
+       result = yaffs_rd_chunk_tags_nand(dev,chunkInNAND,buffer,&tempTags);
        if(memcmp(buffer,data,dev->nDataBytesPerChunk) ||
                tempTags.objectId != tags->objectId ||
                tempTags.chunkId  != tags->chunkId ||
                tempTags.byteCount != tags->byteCount)
                retval = YAFFS_FAIL;
 
-       yaffs_ReleaseTempBuffer(dev, buffer, __LINE__);
+       yaffs_release_temp_buffer(dev, buffer, __LINE__);
 
        return retval;
 }
 
-static int yaffs_WriteNewChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev,
+static int yaffs_write_new_chunk(struct yaffs_DeviceStruct *dev,
                                        const __u8 *data,
                                        yaffs_ExtendedTags *tags,
                                        int useReserve)
@@ -392,13 +392,13 @@ static int yaffs_WriteNewChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev,
        int writeOk = 0;
        int chunk;
 
-       yaffs2_InvalidateCheckpoint(dev);
+       yaffs2_checkpt_invalidate(dev);
 
        do {
                yaffs_BlockInfo *bi = 0;
                int erasedOk = 0;
 
-               chunk = yaffs_AllocateChunk(dev, useReserve, &bi);
+               chunk = yaffs_alloc_chunk(dev, useReserve, &bi);
                if (chunk < 0) {
                        /* no space */
                        break;
@@ -435,7 +435,7 @@ static int yaffs_WriteNewChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev,
                        bi->skipErasedCheck = 0;
 
                if (!bi->skipErasedCheck) {
-                       erasedOk = yaffs_CheckChunkErased(dev, chunk);
+                       erasedOk = yaffs_check_chunk_erased(dev, chunk);
                        if (erasedOk != YAFFS_OK) {
                                T(YAFFS_TRACE_ERROR,
                                (TSTR("**>> yaffs chunk %d was not erased"
@@ -444,29 +444,29 @@ static int yaffs_WriteNewChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev,
                                /* If not erased, delete this one,
                                 * skip rest of block and
                                 * try another chunk */
-                                yaffs_DeleteChunk(dev,chunk,1,__LINE__);
-                                yaffs_SkipRestOfBlock(dev);
+                                yaffs_chunk_del(dev,chunk,1,__LINE__);
+                                yaffs_skip_rest_of_block(dev);
                                continue;
                        }
                }
 
-               writeOk = yaffs_WriteChunkWithTagsToNAND(dev, chunk,
+               writeOk = yaffs_wr_chunk_tags_nand(dev, chunk,
                                data, tags);
 
                if(!bi->skipErasedCheck)
-                       writeOk = yaffs_VerifyChunkWritten(dev, chunk, data, tags);
+                       writeOk = yaffs_verify_chunk_written(dev, chunk, data, tags);
 
                if (writeOk != YAFFS_OK) {
                        /* Clean up aborted write, skip to next block and
                         * try another chunk */
-                       yaffs_HandleWriteChunkError(dev, chunk, erasedOk);
+                       yaffs_handle_chunk_wr_error(dev, chunk, erasedOk);
                        continue;
                }
 
                bi->skipErasedCheck = 1;
 
                /* Copy the data into the robustification buffer */
-               yaffs_HandleWriteChunkOk(dev, chunk, data, tags);
+               yaffs_handle_chunk_wr_ok(dev, chunk, data, tags);
 
        } while (writeOk != YAFFS_OK &&
                (yaffs_wr_attempts <= 0 || attempts <= yaffs_wr_attempts));
@@ -491,16 +491,16 @@ static int yaffs_WriteNewChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev,
  * Block retiring for handling a broken block.
  */
 
-static void yaffs_RetireBlock(yaffs_Device *dev, int blockInNAND)
+static void yaffs_retire_block(yaffs_Device *dev, int blockInNAND)
 {
-       yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, blockInNAND);
+       yaffs_BlockInfo *bi = yaffs_get_block_info(dev, blockInNAND);
 
-       yaffs2_InvalidateCheckpoint(dev);
+       yaffs2_checkpt_invalidate(dev);
        
-       yaffs2_ClearOldestDirtySequence(dev,bi);
+       yaffs2_clear_oldest_dirty_seq(dev,bi);
 
-       if (yaffs_MarkBlockBad(dev, blockInNAND) != YAFFS_OK) {
-               if (yaffs_EraseBlockInNAND(dev, blockInNAND) != YAFFS_OK) {
+       if (yaffs_mark_bad(dev, blockInNAND) != YAFFS_OK) {
+               if (yaffs_erase_block(dev, blockInNAND) != YAFFS_OK) {
                        T(YAFFS_TRACE_ALWAYS, (TSTR(
                                "yaffs: Failed to mark bad and erase block %d"
                                TENDSTR), blockInNAND));
@@ -508,10 +508,10 @@ static void yaffs_RetireBlock(yaffs_Device *dev, int blockInNAND)
                        yaffs_ExtendedTags tags;
                        int chunkId = blockInNAND * dev->param.nChunksPerBlock;
 
-                       __u8 *buffer = yaffs_GetTempBuffer(dev, __LINE__);
+                       __u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
 
                        memset(buffer, 0xff, dev->nDataBytesPerChunk);
-                       yaffs_InitialiseTags(&tags);
+                       yaffs_init_tags(&tags);
                        tags.sequenceNumber = YAFFS_SEQUENCE_BAD_BLOCK;
                        if (dev->param.writeChunkWithTagsToNAND(dev, chunkId -
                                dev->chunkOffset, buffer, &tags) != YAFFS_OK)
@@ -519,7 +519,7 @@ static void yaffs_RetireBlock(yaffs_Device *dev, int blockInNAND)
                                        TCONT("write bad block marker to block %d")
                                        TENDSTR), blockInNAND));
 
-                       yaffs_ReleaseTempBuffer(dev, buffer, __LINE__);
+                       yaffs_release_temp_buffer(dev, buffer, __LINE__);
                }
        }
 
@@ -535,7 +535,7 @@ static void yaffs_RetireBlock(yaffs_Device *dev, int blockInNAND)
  *
  */
 
-static void yaffs_HandleWriteChunkOk(yaffs_Device *dev, int chunkInNAND,
+static void yaffs_handle_chunk_wr_ok(yaffs_Device *dev, int chunkInNAND,
                                const __u8 *data,
                                const yaffs_ExtendedTags *tags)
 {
@@ -545,7 +545,7 @@ static void yaffs_HandleWriteChunkOk(yaffs_Device *dev, int chunkInNAND,
        tags=tags;
 }
 
-static void yaffs_HandleUpdateChunk(yaffs_Device *dev, int chunkInNAND,
+static void yaffs_handle_chunk_update(yaffs_Device *dev, int chunkInNAND,
                                const yaffs_ExtendedTags *tags)
 {
        dev=dev;
@@ -553,7 +553,7 @@ static void yaffs_HandleUpdateChunk(yaffs_Device *dev, int chunkInNAND,
        tags=tags;
 }
 
-void yaffs_HandleChunkError(yaffs_Device *dev, yaffs_BlockInfo *bi)
+void yaffs_handle_chunk_error(yaffs_Device *dev, yaffs_BlockInfo *bi)
 {
        if (!bi->gcPrioritise) {
                bi->gcPrioritise = 1;
@@ -568,13 +568,13 @@ void yaffs_HandleChunkError(yaffs_Device *dev, yaffs_BlockInfo *bi)
        }
 }
 
-static void yaffs_HandleWriteChunkError(yaffs_Device *dev, int chunkInNAND,
+static void yaffs_handle_chunk_wr_error(yaffs_Device *dev, int chunkInNAND,
                int erasedOk)
 {
        int blockInNAND = chunkInNAND / dev->param.nChunksPerBlock;
-       yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, blockInNAND);
+       yaffs_BlockInfo *bi = yaffs_get_block_info(dev, blockInNAND);
 
-       yaffs_HandleChunkError(dev, bi);
+       yaffs_handle_chunk_error(dev, bi);
 
        if (erasedOk) {
                /* Was an actual write failure, so mark the block for retirement  */
@@ -584,14 +584,14 @@ static void yaffs_HandleWriteChunkError(yaffs_Device *dev, int chunkInNAND,
        }
 
        /* Delete the chunk */
-       yaffs_DeleteChunk(dev, chunkInNAND, 1, __LINE__);
-       yaffs_SkipRestOfBlock(dev);
+       yaffs_chunk_del(dev, chunkInNAND, 1, __LINE__);
+       yaffs_skip_rest_of_block(dev);
 }
 
 
 /*---------------- Name handling functions ------------*/
 
-static __u16 yaffs_CalcNameSum(const YCHAR *name)
+static __u16 yaffs_calc_name_sum(const YCHAR *name)
 {
        __u16 sum = 0;
        __u16 i = 1;
@@ -612,7 +612,7 @@ static __u16 yaffs_CalcNameSum(const YCHAR *name)
        return sum;
 }
 
-void yaffs_SetObjectName(yaffs_Object *obj, const YCHAR *name)
+void yaffs_set_obj_name(yaffs_Object *obj, const YCHAR *name)
 {
 #ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM
        memset(obj->shortName, 0, sizeof(YCHAR) * (YAFFS_SHORT_NAME_LENGTH+1));
@@ -621,18 +621,18 @@ void yaffs_SetObjectName(yaffs_Object *obj, const YCHAR *name)
        else
                obj->shortName[0] = _Y('\0');
 #endif
-       obj->sum = yaffs_CalcNameSum(name);
+       obj->sum = yaffs_calc_name_sum(name);
 }
 
-void yaffs_SetObjectNameFromOH(yaffs_Object *obj, const yaffs_ObjectHeader *oh)
+void yaffs_set_obj_name_from_oh(yaffs_Object *obj, const yaffs_ObjectHeader *oh)
 {
 #ifdef CONFIG_YAFFS_AUTO_UNICODE
        YCHAR tmpName[YAFFS_MAX_NAME_LENGTH+1];
        memset(tmpName,0,sizeof(tmpName));
-       yaffs_LoadNameFromObjectHeader(obj->myDev,tmpName,oh->name,YAFFS_MAX_NAME_LENGTH+1);
-       yaffs_SetObjectName(obj,tmpName);
+       yaffs_load_name_from_oh(obj->myDev,tmpName,oh->name,YAFFS_MAX_NAME_LENGTH+1);
+       yaffs_set_obj_name(obj,tmpName);
 #else
-       yaffs_SetObjectName(obj,oh->name);
+       yaffs_set_obj_name(obj,oh->name);
 #endif
 }
 
@@ -644,9 +644,9 @@ void yaffs_SetObjectNameFromOH(yaffs_Object *obj, const yaffs_ObjectHeader *oh)
  */
 
 
-yaffs_Tnode *yaffs_GetTnode(yaffs_Device *dev)
+yaffs_Tnode *yaffs_get_tnode(yaffs_Device *dev)
 {
-       yaffs_Tnode *tn = yaffs_AllocateRawTnode(dev);
+       yaffs_Tnode *tn = yaffs_alloc_raw_tnode(dev);
        if (tn){
                memset(tn, 0, dev->tnodeSize);
                dev->nTnodes++;
@@ -658,22 +658,22 @@ yaffs_Tnode *yaffs_GetTnode(yaffs_Device *dev)
 }
 
 /* FreeTnode frees up a tnode and puts it back on the free list */
-static void yaffs_FreeTnode(yaffs_Device *dev, yaffs_Tnode *tn)
+static void yaffs_free_tnode(yaffs_Device *dev, yaffs_Tnode *tn)
 {
-       yaffs_FreeRawTnode(dev,tn);
+       yaffs_free_raw_tnode(dev,tn);
        dev->nTnodes--;
        dev->nCheckpointBlocksRequired = 0; /* force recalculation*/
 }
 
-static void yaffs_DeinitialiseTnodesAndObjects(yaffs_Device *dev)
+static void yaffs_deinit_tnodes_and_objs(yaffs_Device *dev)
 {
-       yaffs_DeinitialiseRawTnodesAndObjects(dev);
+       yaffs_deinit_raw_tnodes_and_objs(dev);
        dev->nObjects = 0;
        dev->nTnodes = 0;
 }
 
 
-void yaffs_LoadLevel0Tnode(yaffs_Device *dev, yaffs_Tnode *tn, unsigned pos,
+void yaffs_load_tnode_0(yaffs_Device *dev, yaffs_Tnode *tn, unsigned pos,
                unsigned val)
 {
        __u32 *map = (__u32 *)tn;
@@ -703,7 +703,7 @@ void yaffs_LoadLevel0Tnode(yaffs_Device *dev, yaffs_Tnode *tn, unsigned pos,
        }
 }
 
-__u32 yaffs_GetChunkGroupBase(yaffs_Device *dev, yaffs_Tnode *tn,
+__u32 yaffs_get_group_base(yaffs_Device *dev, yaffs_Tnode *tn,
                unsigned pos)
 {
        __u32 *map = (__u32 *)tn;
@@ -740,7 +740,7 @@ __u32 yaffs_GetChunkGroupBase(yaffs_Device *dev, yaffs_Tnode *tn,
  */
 
 /* FindLevel0Tnode finds the level 0 tnode, if one exists. */
-yaffs_Tnode *yaffs_FindLevel0Tnode(yaffs_Device *dev,
+yaffs_Tnode *yaffs_find_tnode_0(yaffs_Device *dev,
                                        yaffs_FileStructure *fStruct,
                                        __u32 chunkId)
 {
@@ -794,7 +794,7 @@ yaffs_Tnode *yaffs_FindLevel0Tnode(yaffs_Device *dev,
  *  be plugged into the ttree.
  */
 
-yaffs_Tnode *yaffs_AddOrFindLevel0Tnode(yaffs_Device *dev,
+yaffs_Tnode *yaffs_add_find_tnode_0(yaffs_Device *dev,
                                        yaffs_FileStructure *fStruct,
                                        __u32 chunkId,
                                        yaffs_Tnode *passedTn)
@@ -828,7 +828,7 @@ yaffs_Tnode *yaffs_AddOrFindLevel0Tnode(yaffs_Device *dev,
                /* Not tall enough, gotta make the tree taller */
                for (i = fStruct->topLevel; i < requiredTallness; i++) {
 
-                       tn = yaffs_GetTnode(dev);
+                       tn = yaffs_get_tnode(dev);
 
                        if (tn) {
                                tn->internal[0] = fStruct->top;
@@ -857,7 +857,7 @@ yaffs_Tnode *yaffs_AddOrFindLevel0Tnode(yaffs_Device *dev,
 
                        if ((l > 1) && !tn->internal[x]) {
                                /* Add missing non-level-zero tnode */
-                               tn->internal[x] = yaffs_GetTnode(dev);
+                               tn->internal[x] = yaffs_get_tnode(dev);
                                if(!tn->internal[x])
                                        return NULL;
                        } else if (l == 1) {
@@ -865,12 +865,12 @@ yaffs_Tnode *yaffs_AddOrFindLevel0Tnode(yaffs_Device *dev,
                                if (passedTn) {
                                        /* If we already have one, then release it.*/
                                        if (tn->internal[x])
-                                               yaffs_FreeTnode(dev, tn->internal[x]);
+                                               yaffs_free_tnode(dev, tn->internal[x]);
                                        tn->internal[x] = passedTn;
 
                                } else if (!tn->internal[x]) {
                                        /* Don't have one, none passed in */
-                                       tn->internal[x] = yaffs_GetTnode(dev);
+                                       tn->internal[x] = yaffs_get_tnode(dev);
                                        if(!tn->internal[x])
                                                return NULL;
                                }
@@ -883,29 +883,29 @@ yaffs_Tnode *yaffs_AddOrFindLevel0Tnode(yaffs_Device *dev,
                /* top is level 0 */
                if (passedTn) {
                        memcpy(tn, passedTn, (dev->tnodeWidth * YAFFS_NTNODES_LEVEL0)/8);
-                       yaffs_FreeTnode(dev, passedTn);
+                       yaffs_free_tnode(dev, passedTn);
                }
        }
 
        return tn;
 }
 
-static int yaffs_FindChunkInGroup(yaffs_Device *dev, int theChunk,
+static int yaffs_find_chunk_in_group(yaffs_Device *dev, int theChunk,
                                yaffs_ExtendedTags *tags, int objectId,
                                int chunkInInode)
 {
        int j;
 
        for (j = 0; theChunk && j < dev->chunkGroupSize; j++) {
-               if (yaffs_CheckChunkBit(dev, theChunk / dev->param.nChunksPerBlock,
+               if (yaffs_check_chunk_bit(dev, theChunk / dev->param.nChunksPerBlock,
                                theChunk % dev->param.nChunksPerBlock)) {
                        
                        if(dev->chunkGroupSize == 1)
                                return theChunk;
                        else {
-                               yaffs_ReadChunkWithTagsFromNAND(dev, theChunk, NULL,
+                               yaffs_rd_chunk_tags_nand(dev, theChunk, NULL,
                                                                tags);
-                               if (yaffs_TagsMatch(tags, objectId, chunkInInode)) {
+                               if (yaffs_tags_match(tags, objectId, chunkInInode)) {
                                        /* found it; */
                                        return theChunk;
                                }
@@ -924,7 +924,7 @@ static int yaffs_FindChunkInGroup(yaffs_Device *dev, int theChunk,
  * Returns 0 if it stopped early due to hitting the limit and the delete is incomplete.
  */
 
-static int yaffs_DeleteWorker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level,
+static int yaffs_del_worker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level,
                              int chunkOffset, int *limit)
 {
        int i;
@@ -945,7 +945,7 @@ static int yaffs_DeleteWorker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level,
                                                allDone = 0;
                                        } else {
                                                allDone =
-                                                       yaffs_DeleteWorker(in,
+                                                       yaffs_del_worker(in,
                                                                tn->
                                                                internal
                                                                [i],
@@ -958,7 +958,7 @@ static int yaffs_DeleteWorker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level,
                                                                limit);
                                        }
                                        if (allDone) {
-                                               yaffs_FreeTnode(dev,
+                                               yaffs_free_tnode(dev,
                                                                tn->
                                                                internal[i]);
                                                tn->internal[i] = NULL;
@@ -971,21 +971,21 @@ static int yaffs_DeleteWorker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level,
 
                        for (i = YAFFS_NTNODES_LEVEL0 - 1; i >= 0 && !hitLimit;
                                        i--) {
-                               theChunk = yaffs_GetChunkGroupBase(dev, tn, i);
+                               theChunk = yaffs_get_group_base(dev, tn, i);
                                if (theChunk) {
 
                                        chunkInInode = (chunkOffset <<
                                                YAFFS_TNODES_LEVEL0_BITS) + i;
 
                                        foundChunk =
-                                               yaffs_FindChunkInGroup(dev,
+                                               yaffs_find_chunk_in_group(dev,
                                                                theChunk,
                                                                &tags,
                                                                in->objectId,
                                                                chunkInInode);
 
                                        if (foundChunk > 0) {
-                                               yaffs_DeleteChunk(dev,
+                                               yaffs_chunk_del(dev,
                                                                  foundChunk, 1,
                                                                  __LINE__);
                                                in->nDataChunks--;
@@ -997,7 +997,7 @@ static int yaffs_DeleteWorker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level,
 
                                        }
 
-                                       yaffs_LoadLevel0Tnode(dev, tn, i, 0);
+                                       yaffs_load_tnode_0(dev, tn, i, 0);
                                }
 
                        }
@@ -1013,7 +1013,7 @@ static int yaffs_DeleteWorker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level,
 
 #endif
 
-static void yaffs_SoftDeleteChunk(yaffs_Device *dev, int chunk)
+static void yaffs_soft_del_chunk(yaffs_Device *dev, int chunk)
 {
        yaffs_BlockInfo *theBlock;
        unsigned blockNo;
@@ -1021,11 +1021,11 @@ static void yaffs_SoftDeleteChunk(yaffs_Device *dev, int chunk)
        T(YAFFS_TRACE_DELETION, (TSTR("soft delete chunk %d" TENDSTR), chunk));
 
        blockNo =  chunk / dev->param.nChunksPerBlock;
-       theBlock = yaffs_GetBlockInfo(dev, blockNo);
+       theBlock = yaffs_get_block_info(dev, blockNo);
        if (theBlock) {
                theBlock->softDeletions++;
                dev->nFreeChunks++;
-               yaffs2_UpdateOldestDirtySequence(dev, blockNo, theBlock);
+               yaffs2_update_oldest_dirty_seq(dev, blockNo, theBlock);
        }
 }
 
@@ -1035,7 +1035,7 @@ static void yaffs_SoftDeleteChunk(yaffs_Device *dev, int chunk)
  * Thus, essentially this is the same as DeleteWorker except that the chunks are soft deleted.
  */
 
-static int yaffs_SoftDeleteWorker(yaffs_Object *in, yaffs_Tnode *tn,
+static int yaffs_soft_del_worker(yaffs_Object *in, yaffs_Tnode *tn,
                                  __u32 level, int chunkOffset)
 {
        int i;
@@ -1050,7 +1050,7 @@ static int yaffs_SoftDeleteWorker(yaffs_Object *in, yaffs_Tnode *tn,
                             i--) {
                                if (tn->internal[i]) {
                                        allDone =
-                                           yaffs_SoftDeleteWorker(in,
+                                           yaffs_soft_del_worker(in,
                                                                   tn->
                                                                   internal[i],
                                                                   level - 1,
@@ -1059,7 +1059,7 @@ static int yaffs_SoftDeleteWorker(yaffs_Object *in, yaffs_Tnode *tn,
                                                                    YAFFS_TNODES_INTERNAL_BITS)
                                                                   + i);
                                        if (allDone) {
-                                               yaffs_FreeTnode(dev,
+                                               yaffs_free_tnode(dev,
                                                                tn->
                                                                internal[i]);
                                                tn->internal[i] = NULL;
@@ -1072,14 +1072,14 @@ static int yaffs_SoftDeleteWorker(yaffs_Object *in, yaffs_Tnode *tn,
                } else if (level == 0) {
 
                        for (i = YAFFS_NTNODES_LEVEL0 - 1; i >= 0; i--) {
-                               theChunk = yaffs_GetChunkGroupBase(dev, tn, i);
+                               theChunk = yaffs_get_group_base(dev, tn, i);
                                if (theChunk) {
                                        /* Note this does not find the real chunk, only the chunk group.
                                         * We make an assumption that a chunk group is not larger than
                                         * a block.
                                         */
-                                       yaffs_SoftDeleteChunk(dev, theChunk);
-                                       yaffs_LoadLevel0Tnode(dev, tn, i, 0);
+                                       yaffs_soft_del_chunk(dev, theChunk);
+                                       yaffs_load_tnode_0(dev, tn, i, 0);
                                }
 
                        }
@@ -1093,21 +1093,21 @@ static int yaffs_SoftDeleteWorker(yaffs_Object *in, yaffs_Tnode *tn,
 
 }
 
-static void yaffs_SoftDeleteFile(yaffs_Object *obj)
+static void yaffs_soft_del_file(yaffs_Object *obj)
 {
        if (obj->deleted &&
            obj->variantType == YAFFS_OBJECT_TYPE_FILE && !obj->softDeleted) {
                if (obj->nDataChunks <= 0) {
                        /* Empty file with no duplicate object headers, just delete it immediately */
-                       yaffs_FreeTnode(obj->myDev,
+                       yaffs_free_tnode(obj->myDev,
                                        obj->variant.fileVariant.top);
                        obj->variant.fileVariant.top = NULL;
                        T(YAFFS_TRACE_TRACING,
                          (TSTR("yaffs: Deleting empty file %d" TENDSTR),
                           obj->objectId));
-                       yaffs_DoGenericObjectDeletion(obj);
+                       yaffs_generic_obj_del(obj);
                } else {
-                       yaffs_SoftDeleteWorker(obj,
+                       yaffs_soft_del_worker(obj,
                                               obj->variant.fileVariant.top,
                                               obj->variant.fileVariant.
                                               topLevel, 0);
@@ -1131,7 +1131,7 @@ static void yaffs_SoftDeleteFile(yaffs_Object *obj)
  * If there is no data in a subtree then it is pruned.
  */
 
-static yaffs_Tnode *yaffs_PruneWorker(yaffs_Device *dev, yaffs_Tnode *tn,
+static yaffs_Tnode *yaffs_prune_worker(yaffs_Device *dev, yaffs_Tnode *tn,
                                __u32 level, int del0)
 {
        int i;
@@ -1144,7 +1144,7 @@ static yaffs_Tnode *yaffs_PruneWorker(yaffs_Device *dev, yaffs_Tnode *tn,
                        for (i = 0; i < YAFFS_NTNODES_INTERNAL; i++) {
                                if (tn->internal[i]) {
                                        tn->internal[i] =
-                                               yaffs_PruneWorker(dev, tn->internal[i],
+                                               yaffs_prune_worker(dev, tn->internal[i],
                                                        level - 1,
                                                        (i == 0) ? del0 : 1);
                                }
@@ -1165,7 +1165,7 @@ static yaffs_Tnode *yaffs_PruneWorker(yaffs_Device *dev, yaffs_Tnode *tn,
                if (hasData == 0 && del0) {
                        /* Free and return NULL */
 
-                       yaffs_FreeTnode(dev, tn);
+                       yaffs_free_tnode(dev, tn);
                        tn = NULL;
                }
 
@@ -1175,7 +1175,7 @@ static yaffs_Tnode *yaffs_PruneWorker(yaffs_Device *dev, yaffs_Tnode *tn,
 
 }
 
-static int yaffs_PruneFileStructure(yaffs_Device *dev,
+static int yaffs_prune_tree(yaffs_Device *dev,
                                yaffs_FileStructure *fStruct)
 {
        int i;
@@ -1185,7 +1185,7 @@ static int yaffs_PruneFileStructure(yaffs_Device *dev,
 
        if (fStruct->topLevel > 0) {
                fStruct->top =
-                   yaffs_PruneWorker(dev, fStruct->top, fStruct->topLevel, 0);
+                   yaffs_prune_worker(dev, fStruct->top, fStruct->topLevel, 0);
 
                /* Now we have a tree with all the non-zero branches NULL but the height
                 * is the same as it was.
@@ -1206,7 +1206,7 @@ static int yaffs_PruneFileStructure(yaffs_Device *dev,
                        if (!hasData) {
                                fStruct->top = tn->internal[0];
                                fStruct->topLevel--;
-                               yaffs_FreeTnode(dev, tn);
+                               yaffs_free_tnode(dev, tn);
                        } else {
                                done = 1;
                        }
@@ -1220,9 +1220,9 @@ static int yaffs_PruneFileStructure(yaffs_Device *dev,
 
 
 /* AllocateEmptyObject gets us a clean Object. Tries to make allocate more if we run out */
-static yaffs_Object *yaffs_AllocateEmptyObject(yaffs_Device *dev)
+static yaffs_Object *yaffs_alloc_empty_obj(yaffs_Device *dev)
 {
-       yaffs_Object *obj = yaffs_AllocateRawObject(dev);
+       yaffs_Object *obj = yaffs_alloc_raw_obj(dev);
 
        if (obj) {
                dev->nObjects++;
@@ -1251,7 +1251,7 @@ static yaffs_Object *yaffs_AllocateEmptyObject(yaffs_Device *dev)
                 * check if lostNFound exists first
                 */
                if (dev->lostNFoundDir)
-                       yaffs_AddObjectToDirectory(dev->lostNFoundDir, obj);
+                       yaffs_add_obj_to_dir(dev->lostNFoundDir, obj);
 
                obj->beingCreated = 0;
        }
@@ -1261,12 +1261,12 @@ static yaffs_Object *yaffs_AllocateEmptyObject(yaffs_Device *dev)
        return obj;
 }
 
-static yaffs_Object *yaffs_CreateFakeDirectory(yaffs_Device *dev, int number,
+static yaffs_Object *yaffs_create_fake_dir(yaffs_Device *dev, int number,
                                               __u32 mode)
 {
 
        yaffs_Object *obj =
-           yaffs_CreateNewObject(dev, number, YAFFS_OBJECT_TYPE_DIRECTORY);
+           yaffs_new_obj(dev, number, YAFFS_OBJECT_TYPE_DIRECTORY);
        if (obj) {
                obj->fake = 1;          /* it is fake so it might have no NAND presence... */
                obj->renameAllowed = 0; /* ... and we're not allowed to rename it... */
@@ -1282,7 +1282,7 @@ static yaffs_Object *yaffs_CreateFakeDirectory(yaffs_Device *dev, int number,
 
 }
 
-static void yaffs_UnhashObject(yaffs_Object *obj)
+static void yaffs_unhash_obj(yaffs_Object *obj)
 {
        int bucket;
        yaffs_Device *dev = obj->myDev;
@@ -1290,13 +1290,13 @@ static void yaffs_UnhashObject(yaffs_Object *obj)
        /* If it is still linked into the bucket list, free from the list */
        if (!ylist_empty(&obj->hashLink)) {
                ylist_del_init(&obj->hashLink);
-               bucket = yaffs_HashFunction(obj->objectId);
+               bucket = yaffs_hash_fn(obj->objectId);
                dev->objectBucket[bucket].count--;
        }
 }
 
 /*  FreeObject frees up a Object and puts it back on the free list */
-static void yaffs_FreeObject(yaffs_Object *obj)
+static void yaffs_free_obj(yaffs_Object *obj)
 {
        yaffs_Device *dev = obj->myDev;
 
@@ -1318,28 +1318,28 @@ static void yaffs_FreeObject(yaffs_Object *obj)
                return;
        }
 
-       yaffs_UnhashObject(obj);
+       yaffs_unhash_obj(obj);
 
-       yaffs_FreeRawObject(dev,obj);
+       yaffs_free_raw_obj(dev,obj);
        dev->nObjects--;
        dev->nCheckpointBlocksRequired = 0; /* force recalculation*/
 }
 
 
-void yaffs_HandleDeferedFree(yaffs_Object *obj)
+void yaffs_handle_defered_free(yaffs_Object *obj)
 {
        if (obj->deferedFree)
-               yaffs_FreeObject(obj);
+               yaffs_free_obj(obj);
 }
 
-static void yaffs_InitialiseTnodesAndObjects(yaffs_Device *dev)
+static void yaffs_init_tnodes_and_objs(yaffs_Device *dev)
 {
        int i;
 
        dev->nObjects = 0;
        dev->nTnodes = 0;
 
-       yaffs_InitialiseRawTnodesAndObjects(dev);
+       yaffs_init_raw_tnodes_and_objs(dev);
 
        for (i = 0; i < YAFFS_NOBJECT_BUCKETS; i++) {
                YINIT_LIST_HEAD(&dev->objectBucket[i].list);
@@ -1347,7 +1347,7 @@ static void yaffs_InitialiseTnodesAndObjects(yaffs_Device *dev)
        }
 }
 
-static int yaffs_FindNiceObjectBucket(yaffs_Device *dev)
+static int yaffs_find_nice_bucket(yaffs_Device *dev)
 {
        int i;
        int l = 999;
@@ -1371,9 +1371,9 @@ static int yaffs_FindNiceObjectBucket(yaffs_Device *dev)
        return l;
 }
 
-static int yaffs_CreateNewObjectNumber(yaffs_Device *dev)
+static int yaffs_new_obj_id(yaffs_Device *dev)
 {
-       int bucket = yaffs_FindNiceObjectBucket(dev);
+       int bucket = yaffs_find_nice_bucket(dev);
 
        /* Now find an object value that has not already been taken
         * by scanning the list.
@@ -1384,7 +1384,7 @@ static int yaffs_CreateNewObjectNumber(yaffs_Device *dev)
 
        __u32 n = (__u32) bucket;
 
-       /* yaffs_CheckObjectHashSanity();  */
+       /* yaffs_check_obj_hash_sane();  */
 
        while (!found) {
                found = 1;
@@ -1403,18 +1403,18 @@ static int yaffs_CreateNewObjectNumber(yaffs_Device *dev)
        return n;
 }
 
-static void yaffs_HashObject(yaffs_Object *in)
+static void yaffs_hash_obj(yaffs_Object *in)
 {
-       int bucket = yaffs_HashFunction(in->objectId);
+       int bucket = yaffs_hash_fn(in->objectId);
        yaffs_Device *dev = in->myDev;
 
        ylist_add(&in->hashLink, &dev->objectBucket[bucket].list);
        dev->objectBucket[bucket].count++;
 }
 
-yaffs_Object *yaffs_FindObjectByNumber(yaffs_Device *dev, __u32 number)
+yaffs_Object *yaffs_find_by_number(yaffs_Device *dev, __u32 number)
 {
-       int bucket = yaffs_HashFunction(number);
+       int bucket = yaffs_hash_fn(number);
        struct ylist_head *i;
        yaffs_Object *in;
 
@@ -1436,25 +1436,25 @@ yaffs_Object *yaffs_FindObjectByNumber(yaffs_Device *dev, __u32 number)
        return NULL;
 }
 
-yaffs_Object *yaffs_CreateNewObject(yaffs_Device *dev, int number,
+yaffs_Object *yaffs_new_obj(yaffs_Device *dev, int number,
                                    yaffs_ObjectType type)
 {
        yaffs_Object *theObject=NULL;
        yaffs_Tnode *tn = NULL;
 
        if (number < 0)
-               number = yaffs_CreateNewObjectNumber(dev);
+               number = yaffs_new_obj_id(dev);
 
        if (type == YAFFS_OBJECT_TYPE_FILE) {
-               tn = yaffs_GetTnode(dev);
+               tn = yaffs_get_tnode(dev);
                if (!tn)
                        return NULL;
        }
 
-       theObject = yaffs_AllocateEmptyObject(dev);
+       theObject = yaffs_alloc_empty_obj(dev);
        if (!theObject){
                if(tn)
-                       yaffs_FreeTnode(dev,tn);
+                       yaffs_free_tnode(dev,tn);
                return NULL;
        }
 
@@ -1464,7 +1464,7 @@ yaffs_Object *yaffs_CreateNewObject(yaffs_Device *dev, int number,
                theObject->renameAllowed = 1;
                theObject->unlinkAllowed = 1;
                theObject->objectId = number;
-               yaffs_HashObject(theObject);
+               yaffs_hash_obj(theObject);
                theObject->variantType = type;
 #ifdef CONFIG_YAFFS_WINCE
                yfsd_WinFileTimeNow(theObject->win_atime);
@@ -1506,24 +1506,24 @@ yaffs_Object *yaffs_CreateNewObject(yaffs_Device *dev, int number,
        return theObject;
 }
 
-yaffs_Object *yaffs_FindOrCreateObjectByNumber(yaffs_Device *dev,
+yaffs_Object *yaffs_find_or_create_by_number(yaffs_Device *dev,
                                                int number,
                                                yaffs_ObjectType type)
 {
        yaffs_Object *theObject = NULL;
 
        if (number > 0)
-               theObject = yaffs_FindObjectByNumber(dev, number);
+               theObject = yaffs_find_by_number(dev, number);
 
        if (!theObject)
-               theObject = yaffs_CreateNewObject(dev, number, type);
+               theObject = yaffs_new_obj(dev, number, type);
 
        return theObject;
 
 }
 
 
-YCHAR *yaffs_CloneString(const YCHAR *str)
+YCHAR *yaffs_clone_str(const YCHAR *str)
 {
        YCHAR *newStr = NULL;
        int len;
@@ -1548,7 +1548,7 @@ YCHAR *yaffs_CloneString(const YCHAR *str)
  * rdev only has meaning for devices (a subset of special objects)
  */
 
-static yaffs_Object *yaffs_MknodObject(yaffs_ObjectType type,
+static yaffs_Object *yaffs_create_obj(yaffs_ObjectType type,
                                       yaffs_Object *parent,
                                       const YCHAR *name,
                                       __u32 mode,
@@ -1563,16 +1563,16 @@ static yaffs_Object *yaffs_MknodObject(yaffs_ObjectType type,
        yaffs_Device *dev = parent->myDev;
 
        /* Check if the entry exists. If it does then fail the call since we don't want a dup.*/
-       if (yaffs_FindObjectByName(parent, name))
+       if (yaffs_find_by_name(parent, name))
                return NULL;
 
        if (type == YAFFS_OBJECT_TYPE_SYMLINK) {
-               str = yaffs_CloneString(aliasString);
+               str = yaffs_clone_str(aliasString);
                if (!str)
                        return NULL;
        }
 
-       in = yaffs_CreateNewObject(dev, -1, type);
+       in = yaffs_new_obj(dev, -1, type);
 
        if (!in){
                if(str)
@@ -1605,10 +1605,10 @@ static yaffs_Object *yaffs_MknodObject(yaffs_ObjectType type,
 #endif
                in->nDataChunks = 0;
 
-               yaffs_SetObjectName(in, name);
+               yaffs_set_obj_name(in, name);
                in->dirty = 1;
 
-               yaffs_AddObjectToDirectory(parent, in);
+               yaffs_add_obj_to_dir(parent, in);
 
                in->myDev = parent->myDev;
 
@@ -1631,44 +1631,44 @@ static yaffs_Object *yaffs_MknodObject(yaffs_ObjectType type,
                        break;
                }
 
-               if (yaffs_UpdateObjectHeader(in, name, 0, 0, 0, NULL) < 0) {
+               if (yaffs_update_oh(in, name, 0, 0, 0, NULL) < 0) {
                        /* Could not create the object header, fail the creation */
-                       yaffs_DeleteObject(in);
+                       yaffs_del_obj(in);
                        in = NULL;
                }
 
-               yaffs_UpdateParent(parent);
+               yaffs_update_parent(parent);
        }
 
        return in;
 }
 
-yaffs_Object *yaffs_MknodFile(yaffs_Object *parent, const YCHAR *name,
+yaffs_Object *yaffs_create_file(yaffs_Object *parent, const YCHAR *name,
                        __u32 mode, __u32 uid, __u32 gid)
 {
-       return yaffs_MknodObject(YAFFS_OBJECT_TYPE_FILE, parent, name, mode,
+       return yaffs_create_obj(YAFFS_OBJECT_TYPE_FILE, parent, name, mode,
                                uid, gid, NULL, NULL, 0);
 }
 
-yaffs_Object *yaffs_MknodDirectory(yaffs_Object *parent, const YCHAR *name,
+yaffs_Object *yaffs_create_dir(yaffs_Object *parent, const YCHAR *name,
                                __u32 mode, __u32 uid, __u32 gid)
 {
-       return yaffs_MknodObject(YAFFS_OBJECT_TYPE_DIRECTORY, parent, name,
+       return yaffs_create_obj(YAFFS_OBJECT_TYPE_DIRECTORY, parent, name,
                                 mode, uid, gid, NULL, NULL, 0);
 }
 
-yaffs_Object *yaffs_MknodSpecial(yaffs_Object *parent, const YCHAR *name,
+yaffs_Object *yaffs_create_special(yaffs_Object *parent, const YCHAR *name,
                                __u32 mode, __u32 uid, __u32 gid, __u32 rdev)
 {
-       return yaffs_MknodObject(YAFFS_OBJECT_TYPE_SPECIAL, parent, name, mode,
+       return yaffs_create_obj(YAFFS_OBJECT_TYPE_SPECIAL, parent, name, mode,
                                 uid, gid, NULL, NULL, rdev);
 }
 
-yaffs_Object *yaffs_MknodSymLink(yaffs_Object *parent, const YCHAR *name,
+yaffs_Object *yaffs_create_symlink(yaffs_Object *parent, const YCHAR *name,
                                __u32 mode, __u32 uid, __u32 gid,
                                const YCHAR *alias)
 {
-       return yaffs_MknodObject(YAFFS_OBJECT_TYPE_SYMLINK, parent, name, mode,
+       return yaffs_create_obj(YAFFS_OBJECT_TYPE_SYMLINK, parent, name, mode,
                                uid, gid, NULL, alias, 0);
 }
 
@@ -1677,9 +1677,9 @@ yaffs_Object *yaffs_Link(yaffs_Object *parent, const YCHAR *name,
                        yaffs_Object *equivalentObject)
 {
        /* Get the real object in case we were fed a hard link as an equivalent object */
-       equivalentObject = yaffs_GetEquivalentObject(equivalentObject);
+       equivalentObject = yaffs_get_equivalent_obj(equivalentObject);
 
-       if (yaffs_MknodObject
+       if (yaffs_create_obj
            (YAFFS_OBJECT_TYPE_HARDLINK, parent, name, 0, 0, 0,
             equivalentObject, NULL, 0)) {
                return equivalentObject;
@@ -1689,7 +1689,7 @@ yaffs_Object *yaffs_Link(yaffs_Object *parent, const YCHAR *name,
 
 }
 
-static int yaffs_ChangeObjectName(yaffs_Object *obj, yaffs_Object *newDir,
+static int yaffs_change_obj_name(yaffs_Object *obj, yaffs_Object *newDir,
                                const YCHAR *newName, int force, int shadows)
 {
        int unlinkOp;
@@ -1703,7 +1703,7 @@ static int yaffs_ChangeObjectName(yaffs_Object *obj, yaffs_Object *newDir,
        if (newDir->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) {
                T(YAFFS_TRACE_ALWAYS,
                  (TSTR
-                  ("tragedy: yaffs_ChangeObjectName: newDir is not a directory"
+                  ("tragedy: yaffs_change_obj_name: newDir is not a directory"
                    TENDSTR)));
                YBUG();
        }
@@ -1717,7 +1717,7 @@ static int yaffs_ChangeObjectName(yaffs_Object *obj, yaffs_Object *newDir,
 
        deleteOp = (newDir == obj->myDev->deletedDir);
 
-       existingTarget = yaffs_FindObjectByName(newDir, newName);
+       existingTarget = yaffs_find_by_name(newDir, newName);
 
        /* If the object is a file going into the unlinked directory,
         *   then it is OK to just stuff it in since duplicate names are allowed.
@@ -1730,23 +1730,23 @@ static int yaffs_ChangeObjectName(yaffs_Object *obj, yaffs_Object *newDir,
             (shadows > 0) ||
             !existingTarget) &&
            newDir->variantType == YAFFS_OBJECT_TYPE_DIRECTORY) {
-               yaffs_SetObjectName(obj, newName);
+               yaffs_set_obj_name(obj, newName);
                obj->dirty = 1;
 
-               yaffs_AddObjectToDirectory(newDir, obj);
+               yaffs_add_obj_to_dir(newDir, obj);
 
                if (unlinkOp)
                        obj->unlinked = 1;
 
                /* If it is a deletion then we mark it as a shrink for gc purposes. */
-               if (yaffs_UpdateObjectHeader(obj, newName, 0, deleteOp, shadows, NULL) >= 0)
+               if (yaffs_update_oh(obj, newName, 0, deleteOp, shadows, NULL) >= 0)
                        return YAFFS_OK;
        }
 
        return YAFFS_FAIL;
 }
 
-int yaffs_RenameObject(yaffs_Object *oldDir, const YCHAR *oldName,
+int yaffs_rename_obj(yaffs_Object *oldDir, const YCHAR *oldName,
                yaffs_Object *newDir, const YCHAR *newName)
 {
        yaffs_Object *obj = NULL;
@@ -1776,13 +1776,13 @@ int yaffs_RenameObject(yaffs_Object *oldDir, const YCHAR *oldName,
                /* ENAMETOOLONG */
                return YAFFS_FAIL;
 
-       obj = yaffs_FindObjectByName(oldDir, oldName);
+       obj = yaffs_find_by_name(oldDir, oldName);
 
        if (obj && obj->renameAllowed) {
 
                /* Now do the handling for an existing target, if there is one */
 
-               existingTarget = yaffs_FindObjectByName(newDir, newName);
+               existingTarget = yaffs_find_by_name(newDir, newName);
                if (existingTarget &&
                        existingTarget->variantType == YAFFS_OBJECT_TYPE_DIRECTORY &&
                        !ylist_empty(&existingTarget->variant.directoryVariant.children)) {
@@ -1796,18 +1796,18 @@ int yaffs_RenameObject(yaffs_Object *oldDir, const YCHAR *oldName,
                         *
                         */
                        dev->gcDisable=1;
-                       yaffs_ChangeObjectName(obj, newDir, newName, force,
+                       yaffs_change_obj_name(obj, newDir, newName, force,
                                                existingTarget->objectId);
                        existingTarget->isShadowed = 1;
-                       yaffs_UnlinkObject(existingTarget);
+                       yaffs_unlink_obj(existingTarget);
                        dev->gcDisable=0;
                }
 
-               result = yaffs_ChangeObjectName(obj, newDir, newName, 1, 0);
+               result = yaffs_change_obj_name(obj, newDir, newName, 1, 0);
 
-               yaffs_UpdateParent(oldDir);
+               yaffs_update_parent(oldDir);
                if(newDir != oldDir)
-                       yaffs_UpdateParent(newDir);
+                       yaffs_update_parent(newDir);
                
                return result;
        }
@@ -1816,7 +1816,7 @@ int yaffs_RenameObject(yaffs_Object *oldDir, const YCHAR *oldName,
 
 /*------------------------- Block Management and Page Allocation ----------------*/
 
-static int yaffs_InitialiseBlocks(yaffs_Device *dev)
+static int yaffs_init_blocks(yaffs_Device *dev)
 {
        int nBlocks = dev->internalEndBlock - dev->internalStartBlock + 1;
 
@@ -1853,7 +1853,7 @@ static int yaffs_InitialiseBlocks(yaffs_Device *dev)
        return YAFFS_FAIL;
 }
 
-static void yaffs_DeinitialiseBlocks(yaffs_Device *dev)
+static void yaffs_deinit_blocks(yaffs_Device *dev)
 {
        if (dev->blockInfoAlt && dev->blockInfo)
                YFREE_ALT(dev->blockInfo);
@@ -1872,9 +1872,9 @@ static void yaffs_DeinitialiseBlocks(yaffs_Device *dev)
        dev->chunkBits = NULL;
 }
 
-void yaffs_BlockBecameDirty(yaffs_Device *dev, int blockNo)
+void yaffs_block_became_dirty(yaffs_Device *dev, int blockNo)
 {
-       yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, blockNo);
+       yaffs_BlockInfo *bi = yaffs_get_block_info(dev, blockNo);
 
        int erasedOk = 0;
 
@@ -1883,10 +1883,10 @@ void yaffs_BlockBecameDirty(yaffs_Device *dev, int blockNo)
         */
 
        T(YAFFS_TRACE_GC | YAFFS_TRACE_ERASE,
-               (TSTR("yaffs_BlockBecameDirty block %d state %d %s"TENDSTR),
+               (TSTR("yaffs_block_became_dirty block %d state %d %s"TENDSTR),
                blockNo, bi->blockState, (bi->needsRetiring) ? "needs retiring" : ""));
 
-       yaffs2_ClearOldestDirtySequence(dev,bi);
+       yaffs2_clear_oldest_dirty_seq(dev,bi);
 
        bi->blockState = YAFFS_BLOCK_STATE_DIRTY;
 
@@ -1901,8 +1901,8 @@ void yaffs_BlockBecameDirty(yaffs_Device *dev, int blockNo)
        }
 
        if (!bi->needsRetiring) {
-               yaffs2_InvalidateCheckpoint(dev);
-               erasedOk = yaffs_EraseBlockInNAND(dev, blockNo);
+               yaffs2_checkpt_invalidate(dev);
+               erasedOk = yaffs_erase_block(dev, blockNo);
                if (!erasedOk) {
                        dev->nErasureFailures++;
                        T(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,
@@ -1911,10 +1911,10 @@ void yaffs_BlockBecameDirty(yaffs_Device *dev, int blockNo)
        }
 
        if (erasedOk &&
-           ((yaffs_traceMask & YAFFS_TRACE_ERASE) || !yaffs_SkipVerification(dev))) {
+           ((yaffs_trace_mask & YAFFS_TRACE_ERASE) || !yaffs_skip_verification(dev))) {
                int i;
                for (i = 0; i < dev->param.nChunksPerBlock; i++) {
-                       if (!yaffs_CheckChunkErased
+                       if (!yaffs_check_chunk_erased
                            (dev, blockNo * dev->param.nChunksPerBlock + i)) {
                                T(YAFFS_TRACE_ERROR,
                                  (TSTR
@@ -1934,20 +1934,20 @@ void yaffs_BlockBecameDirty(yaffs_Device *dev, int blockNo)
                bi->hasShrinkHeader = 0;
                bi->skipErasedCheck = 1;  /* This is clean, so no need to check */
                bi->gcPrioritise = 0;
-               yaffs_ClearChunkBits(dev, blockNo);
+               yaffs_clear_chunk_bits(dev, blockNo);
 
                T(YAFFS_TRACE_ERASE,
                  (TSTR("Erased block %d" TENDSTR), blockNo));
        } else {
                dev->nFreeChunks -= dev->param.nChunksPerBlock; /* We lost a block of free space */
 
-               yaffs_RetireBlock(dev, blockNo);
+               yaffs_retire_block(dev, blockNo);
                T(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,
                  (TSTR("**>> Block %d retired" TENDSTR), blockNo));
        }
 }
 
-static int yaffs_FindBlockForAllocation(yaffs_Device *dev)
+static int yaffs_find_alloc_block(yaffs_Device *dev)
 {
        int i;
 
@@ -1972,7 +1972,7 @@ static int yaffs_FindBlockForAllocation(yaffs_Device *dev)
                        dev->allocationBlockFinder = dev->internalStartBlock;
                }
 
-               bi = yaffs_GetBlockInfo(dev, dev->allocationBlockFinder);
+               bi = yaffs_get_block_info(dev, dev->allocationBlockFinder);
 
                if (bi->blockState == YAFFS_BLOCK_STATE_EMPTY) {
                        bi->blockState = YAFFS_BLOCK_STATE_ALLOCATING;
@@ -1998,22 +1998,22 @@ static int yaffs_FindBlockForAllocation(yaffs_Device *dev)
 
 /*
  * Check if there's space to allocate...
- * Thinks.... do we need top make this ths same as yaffs_GetFreeChunks()?
+ * Thinks.... do we need top make this ths same as yaffs_get_free_chunks()?
  */
-int yaffs_CheckSpaceForAllocation(yaffs_Device *dev, int nChunks)
+int yaffs_check_alloc_available(yaffs_Device *dev, int nChunks)
 {
        int reservedChunks;
        int reservedBlocks = dev->param.nReservedBlocks;
        int checkpointBlocks;
 
-       checkpointBlocks = yaffs2_CalcCheckpointBlocksRequired(dev);
+       checkpointBlocks = yaffs_calc_checkpt_blocks_required(dev);
 
        reservedChunks = ((reservedBlocks + checkpointBlocks) * dev->param.nChunksPerBlock);
 
        return (dev->nFreeChunks > (reservedChunks + nChunks));
 }
 
-static int yaffs_AllocateChunk(yaffs_Device *dev, int useReserve,
+static int yaffs_alloc_chunk(yaffs_Device *dev, int useReserve,
                yaffs_BlockInfo **blockUsedPtr)
 {
        int retVal;
@@ -2021,11 +2021,11 @@ static int yaffs_AllocateChunk(yaffs_Device *dev, int useReserve,
 
        if (dev->allocationBlock < 0) {
                /* Get next block to allocate off */
-               dev->allocationBlock = yaffs_FindBlockForAllocation(dev);
+               dev->allocationBlock = yaffs_find_alloc_block(dev);
                dev->allocationPage = 0;
        }
 
-       if (!useReserve && !yaffs_CheckSpaceForAllocation(dev, 1)) {
+       if (!useReserve && !yaffs_check_alloc_available(dev, 1)) {
                /* Not enough space to allocate unless we're allowed to use the reserve. */
                return -1;
        }
@@ -2037,12 +2037,12 @@ static int yaffs_AllocateChunk(yaffs_Device *dev, int useReserve,
 
        /* Next page please.... */
        if (dev->allocationBlock >= 0) {
-               bi = yaffs_GetBlockInfo(dev, dev->allocationBlock);
+               bi = yaffs_get_block_info(dev, dev->allocationBlock);
 
                retVal = (dev->allocationBlock * dev->param.nChunksPerBlock) +
                        dev->allocationPage;
                bi->pagesInUse++;
-               yaffs_SetChunkBit(dev, dev->allocationBlock,
+               yaffs_set_chunk_bit(dev, dev->allocationBlock,
                                dev->allocationPage);
 
                dev->allocationPage++;
@@ -2067,7 +2067,7 @@ static int yaffs_AllocateChunk(yaffs_Device *dev, int useReserve,
        return -1;
 }
 
-static int yaffs_GetErasedChunks(yaffs_Device *dev)
+static int yaffs_get_erased_chunks(yaffs_Device *dev)
 {
        int n;
 
@@ -2081,13 +2081,13 @@ static int yaffs_GetErasedChunks(yaffs_Device *dev)
 }
 
 /*
- * yaffs_SkipRestOfBlock() skips over the rest of the allocation block
+ * yaffs_skip_rest_of_block() skips over the rest of the allocation block
  * if we don't want to write to it.
  */
-void yaffs_SkipRestOfBlock(yaffs_Device *dev)
+void yaffs_skip_rest_of_block(yaffs_Device *dev)
 {
        if(dev->allocationBlock > 0){
-               yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, dev->allocationBlock);
+               yaffs_BlockInfo *bi = yaffs_get_block_info(dev, dev->allocationBlock);
                if(bi->blockState == YAFFS_BLOCK_STATE_ALLOCATING){
                        bi->blockState = YAFFS_BLOCK_STATE_FULL;
                        dev->allocationBlock = -1;
@@ -2096,7 +2096,7 @@ void yaffs_SkipRestOfBlock(yaffs_Device *dev)
 }
 
 
-static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
+static int yaffs_gc_block(yaffs_Device *dev, int block,
                int wholeBlock)
 {
        int oldChunk;
@@ -2108,12 +2108,12 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
        int matchingChunk;
        int maxCopies;
 
-       int chunksBefore = yaffs_GetErasedChunks(dev);
+       int chunksBefore = yaffs_get_erased_chunks(dev);
        int chunksAfter;
 
        yaffs_ExtendedTags tags;
 
-       yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, block);
+       yaffs_BlockInfo *bi = yaffs_get_block_info(dev, block);
 
        yaffs_Object *object;
 
@@ -2127,7 +2127,7 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
                         bi->hasShrinkHeader,
                         wholeBlock));
 
-       /*yaffs_VerifyFreeChunks(dev); */
+       /*yaffs_verify_free_chunks(dev); */
 
        if(bi->blockState == YAFFS_BLOCK_STATE_FULL)
                bi->blockState = YAFFS_BLOCK_STATE_COLLECTING;
@@ -2137,17 +2137,17 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
        dev->gcDisable = 1;
 
        if (isCheckpointBlock ||
-                       !yaffs_StillSomeChunkBits(dev, block)) {
+                       !yaffs_still_some_chunks(dev, block)) {
                T(YAFFS_TRACE_TRACING,
                                (TSTR
                                 ("Collecting block %d that has no chunks in use" TENDSTR),
                                 block));
-               yaffs_BlockBecameDirty(dev, block);
+               yaffs_block_became_dirty(dev, block);
        } else {
 
-               __u8 *buffer = yaffs_GetTempBuffer(dev, __LINE__);
+               __u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
 
-               yaffs_VerifyBlock(dev, bi, block);
+               yaffs_verify_blk(dev, bi, block);
 
                maxCopies = (wholeBlock) ? dev->param.nChunksPerBlock : 5;
                oldChunk = block * dev->param.nChunksPerBlock + dev->gcChunk;
@@ -2158,7 +2158,7 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
                     (bi->blockState == YAFFS_BLOCK_STATE_COLLECTING) &&
                     maxCopies > 0;
                     dev->gcChunk++, oldChunk++) {
-                       if (yaffs_CheckChunkBit(dev, block, dev->gcChunk)) {
+                       if (yaffs_check_chunk_bit(dev, block, dev->gcChunk)) {
 
                                /* This page is in use and might need to be copied off */
 
@@ -2166,13 +2166,13 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
 
                                markNAND = 1;
 
-                               yaffs_InitialiseTags(&tags);
+                               yaffs_init_tags(&tags);
 
-                               yaffs_ReadChunkWithTagsFromNAND(dev, oldChunk,
+                               yaffs_rd_chunk_tags_nand(dev, oldChunk,
                                                                buffer, &tags);
 
                                object =
-                                   yaffs_FindObjectByNumber(dev,
+                                   yaffs_find_by_number(dev,
                                                             tags.objectId);
 
                                T(YAFFS_TRACE_GC_DETAIL,
@@ -2181,13 +2181,13 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
                                   dev->gcChunk, tags.objectId, tags.chunkId,
                                   tags.byteCount));
 
-                               if (object && !yaffs_SkipVerification(dev)) {
+                               if (object && !yaffs_skip_verification(dev)) {
                                        if (tags.chunkId == 0)
                                                matchingChunk = object->hdrChunk;
                                        else if (object->softDeleted)
                                                matchingChunk = oldChunk; /* Defeat the test */
                                        else
-                                               matchingChunk = yaffs_FindChunkInFile(object, tags.chunkId, NULL);
+                                               matchingChunk = yaffs_find_chunk_in_file(object, tags.chunkId, NULL);
 
                                        if (oldChunk != matchingChunk)
                                                T(YAFFS_TRACE_ERROR,
@@ -2237,11 +2237,11 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
                                         * Can be discarded and the file deleted.
                                         */
                                        object->hdrChunk = 0;
-                                       yaffs_FreeTnode(object->myDev,
+                                       yaffs_free_tnode(object->myDev,
                                                        object->variant.
                                                        fileVariant.top);
                                        object->variant.fileVariant.top = NULL;
-                                       yaffs_DoGenericObjectDeletion(object);
+                                       yaffs_generic_obj_del(object);
 
                                } else if (object) {
                                        /* It's either a data chunk in a live file or
@@ -2277,12 +2277,12 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
                                                        tags.extraFileLength = oh->fileSize;
                                                }
 
-                                               yaffs_VerifyObjectHeader(object, oh, &tags, 1);
+                                               yaffs_verify_oh(object, oh, &tags, 1);
                                                newChunk =
-                                                   yaffs_WriteNewChunkWithTagsToNAND(dev,(__u8 *) oh, &tags, 1);
+                                                   yaffs_write_new_chunk(dev,(__u8 *) oh, &tags, 1);
                                        } else
                                                newChunk =
-                                                   yaffs_WriteNewChunkWithTagsToNAND(dev, buffer, &tags, 1);
+                                                   yaffs_write_new_chunk(dev, buffer, &tags, 1);
 
                                        if (newChunk < 0) {
                                                retVal = YAFFS_FAIL;
@@ -2297,7 +2297,7 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
                                                } else {
                                                        /* It's a data chunk */
                                                        int ok;
-                                                       ok = yaffs_PutChunkIntoFile
+                                                       ok = yaffs_put_chunk_in_file
                                                            (object,
                                                             tags.chunkId,
                                                             newChunk, 0);
@@ -2306,18 +2306,18 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
                                }
 
                                if (retVal == YAFFS_OK)
-                                       yaffs_DeleteChunk(dev, oldChunk, markNAND, __LINE__);
+                                       yaffs_chunk_del(dev, oldChunk, markNAND, __LINE__);
 
                        }
                }
 
-               yaffs_ReleaseTempBuffer(dev, buffer, __LINE__);
+               yaffs_release_temp_buffer(dev, buffer, __LINE__);
 
 
 
        }
 
-       yaffs_VerifyCollectedBlock(dev, bi, block);
+       yaffs_verify_collected_blk(dev, bi, block);
 
 
 
@@ -2333,10 +2333,10 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
                for (i = 0; i < dev->nCleanups; i++) {
                        /* Time to delete the file too */
                        object =
-                           yaffs_FindObjectByNumber(dev,
+                           yaffs_find_by_number(dev,
                                                     dev->gcCleanupList[i]);
                        if (object) {
-                               yaffs_FreeTnode(dev,
+                               yaffs_free_tnode(dev,
                                                object->variant.fileVariant.
                                                top);
                                object->variant.fileVariant.top = NULL;
@@ -2344,14 +2344,14 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
                                  (TSTR
                                   ("yaffs: About to finally delete object %d"
                                    TENDSTR), object->objectId));
-                               yaffs_DoGenericObjectDeletion(object);
+                               yaffs_generic_obj_del(object);
                                object->myDev->nDeletedFiles--;
                        }
 
                }
 
 
-               chunksAfter = yaffs_GetErasedChunks(dev);
+               chunksAfter = yaffs_get_erased_chunks(dev);
                if (chunksBefore >= chunksAfter) {
                        T(YAFFS_TRACE_GC,
                          (TSTR
@@ -2373,7 +2373,7 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block,
  * for garbage collection.
  */
 
-static unsigned yaffs_FindBlockForGarbageCollection(yaffs_Device *dev,
+static unsigned yaffs_find_gc_block(yaffs_Device *dev,
                                        int aggressive,
                                        int background)
 {
@@ -2396,7 +2396,7 @@ static unsigned yaffs_FindBlockForGarbageCollection(yaffs_Device *dev,
                        if (bi->gcPrioritise) {
                                prioritisedExists = 1;
                                if (bi->blockState == YAFFS_BLOCK_STATE_FULL &&
-                                  yaffs2_BlockNotDisqualifiedFromGC(dev, bi)) {
+                                  yaffs_block_ok_for_gc(dev, bi)) {
                                        selected = i;
                                        prioritised = 1;
                                }
@@ -2464,14 +2464,14 @@ static unsigned yaffs_FindBlockForGarbageCollection(yaffs_Device *dev,
                                dev->gcBlockFinder > dev->internalEndBlock)
                                dev->gcBlockFinder = dev->internalStartBlock;
 
-                       bi = yaffs_GetBlockInfo(dev, dev->gcBlockFinder);
+                       bi = yaffs_get_block_info(dev, dev->gcBlockFinder);
 
                        pagesUsed = bi->pagesInUse - bi->softDeletions;
 
                        if (bi->blockState == YAFFS_BLOCK_STATE_FULL &&
                                pagesUsed < dev->param.nChunksPerBlock &&
                                (dev->gcDirtiest < 1 || pagesUsed < dev->gcPagesInUse) &&
-                               yaffs2_BlockNotDisqualifiedFromGC(dev, bi)) {
+                               yaffs_block_ok_for_gc(dev, bi)) {
                                dev->gcDirtiest = dev->gcBlockFinder;
                                dev->gcPagesInUse = pagesUsed;
                        }
@@ -2488,12 +2488,12 @@ static unsigned yaffs_FindBlockForGarbageCollection(yaffs_Device *dev,
 
        if(!selected && dev->param.isYaffs2 &&
                dev->gcNotDone >= ( background ? 10 : 20)){
-               yaffs2_FindOldestDirtySequence(dev);
+               yaffs2_find_oldest_dirty_seq(dev);
                if(dev->oldestDirtyBlock > 0) {
                        selected = dev->oldestDirtyBlock;
                        dev->gcDirtiest = selected;
                        dev->oldestDirtyGCs++;
-                       bi = yaffs_GetBlockInfo(dev, selected);
+                       bi = yaffs_get_block_info(dev, selected);
                        dev->gcPagesInUse =  bi->pagesInUse - bi->softDeletions;
                } else
                        dev->gcNotDone = 0;
@@ -2538,7 +2538,7 @@ static unsigned yaffs_FindBlockForGarbageCollection(yaffs_Device *dev,
  * The idea is to help clear out space in a more spread-out manner.
  * Dunno if it really does anything useful.
  */
-static int yaffs_CheckGarbageCollection(yaffs_Device *dev, int background)
+static int yaffs_check_gc(yaffs_Device *dev, int background)
 {
        int aggressive = 0;
        int gcOk = YAFFS_OK;
@@ -2563,7 +2563,7 @@ static int yaffs_CheckGarbageCollection(yaffs_Device *dev, int background)
        do {
                maxTries++;
 
-               checkpointBlockAdjust = yaffs2_CalcCheckpointBlocksRequired(dev);
+               checkpointBlockAdjust = yaffs_calc_checkpt_blocks_required(dev);
 
                minErased  = dev->param.nReservedBlocks + checkpointBlockAdjust + 1;
                erasedChunks = dev->nErasedBlocks * dev->param.nChunksPerBlock;
@@ -2592,12 +2592,12 @@ static int yaffs_CheckGarbageCollection(yaffs_Device *dev, int background)
                 /* If we don't already have a block being gc'd then see if we should start another */
 
                if (dev->gcBlock < 1 && !aggressive) {
-                       dev->gcBlock = yaffs2_FindRefreshBlock(dev);
+                       dev->gcBlock = yaffs2_find_refresh_block(dev);
                        dev->gcChunk = 0;
                        dev->nCleanups=0;
                }
                if (dev->gcBlock < 1) {
-                       dev->gcBlock = yaffs_FindBlockForGarbageCollection(dev, aggressive, background);
+                       dev->gcBlock = yaffs_find_gc_block(dev, aggressive, background);
                        dev->gcChunk = 0;
                        dev->nCleanups=0;
                }
@@ -2612,7 +2612,7 @@ static int yaffs_CheckGarbageCollection(yaffs_Device *dev, int background)
                           ("yaffs: GC erasedBlocks %d aggressive %d" TENDSTR),
                           dev->nErasedBlocks, aggressive));
 
-                       gcOk = yaffs_GarbageCollectBlock(dev, dev->gcBlock, aggressive);
+                       gcOk = yaffs_gc_block(dev, dev->gcBlock, aggressive);
                }
 
                if (dev->nErasedBlocks < (dev->param.nReservedBlocks) && dev->gcBlock > 0) {
@@ -2629,23 +2629,23 @@ static int yaffs_CheckGarbageCollection(yaffs_Device *dev, int background)
 }
 
 /*
- * yaffs_BackgroundGarbageCollect()
+ * yaffs_bg_gc()
  * Garbage collects. Intended to be called from a background thread.
  * Returns non-zero if at least half the free chunks are erased.
  */
-int yaffs_BackgroundGarbageCollect(yaffs_Device *dev, unsigned urgency)
+int yaffs_bg_gc(yaffs_Device *dev, unsigned urgency)
 {
        int erasedChunks = dev->nErasedBlocks * dev->param.nChunksPerBlock;
 
        T(YAFFS_TRACE_BACKGROUND, (TSTR("Background gc %u" TENDSTR),urgency));
 
-       yaffs_CheckGarbageCollection(dev, 1);
+       yaffs_check_gc(dev, 1);
        return erasedChunks > dev->nFreeChunks/2;
 }
 
 /*-------------------------  TAGS --------------------------------*/
 
-static int yaffs_TagsMatch(const yaffs_ExtendedTags *tags, int objectId,
+static int yaffs_tags_match(const yaffs_ExtendedTags *tags, int objectId,
                           int chunkInObject)
 {
        return (tags->chunkId == chunkInObject &&
@@ -2656,7 +2656,7 @@ static int yaffs_TagsMatch(const yaffs_ExtendedTags *tags, int objectId,
 
 /*-------------------- Data file manipulation -----------------*/
 
-static int yaffs_FindChunkInFile(yaffs_Object *in, int chunkInInode,
+static int yaffs_find_chunk_in_file(yaffs_Object *in, int chunkInInode,
                                 yaffs_ExtendedTags *tags)
 {
        /*Get the Tnode, then get the level 0 offset chunk offset */
@@ -2672,19 +2672,19 @@ static int yaffs_FindChunkInFile(yaffs_Object *in, int chunkInInode,
                tags = &localTags;
        }
 
-       tn = yaffs_FindLevel0Tnode(dev, &in->variant.fileVariant, chunkInInode);
+       tn = yaffs_find_tnode_0(dev, &in->variant.fileVariant, chunkInInode);
 
        if (tn) {
-               theChunk = yaffs_GetChunkGroupBase(dev, tn, chunkInInode);
+               theChunk = yaffs_get_group_base(dev, tn, chunkInInode);
 
                retVal =
-                   yaffs_FindChunkInGroup(dev, theChunk, tags, in->objectId,
+                   yaffs_find_chunk_in_group(dev, theChunk, tags, in->objectId,
                                           chunkInInode);
        }
        return retVal;
 }
 
-static int yaffs_FindAndDeleteChunkInFile(yaffs_Object *in, int chunkInInode,
+static int yaffs_find_del_file_chunk(yaffs_Object *in, int chunkInInode,
                                          yaffs_ExtendedTags *tags)
 {
        /* Get the Tnode, then get the level 0 offset chunk offset */
@@ -2700,26 +2700,26 @@ static int yaffs_FindAndDeleteChunkInFile(yaffs_Object *in, int chunkInInode,
                tags = &localTags;
        }
 
-       tn = yaffs_FindLevel0Tnode(dev, &in->variant.fileVariant, chunkInInode);
+       tn = yaffs_find_tnode_0(dev, &in->variant.fileVariant, chunkInInode);
 
        if (tn) {
 
-               theChunk = yaffs_GetChunkGroupBase(dev, tn, chunkInInode);
+               theChunk = yaffs_get_group_base(dev, tn, chunkInInode);
 
                retVal =
-                   yaffs_FindChunkInGroup(dev, theChunk, tags, in->objectId,
+                   yaffs_find_chunk_in_group(dev, theChunk, tags, in->objectId,
                                           chunkInInode);
 
                /* Delete the entry in the filestructure (if found) */
                if (retVal != -1)
-                       yaffs_LoadLevel0Tnode(dev, tn, chunkInInode, 0);
+                       yaffs_load_tnode_0(dev, tn, chunkInInode, 0);
        }
 
        return retVal;
 }
 
 
-int yaffs_PutChunkIntoFile(yaffs_Object *in, int chunkInInode,
+int yaffs_put_chunk_in_file(yaffs_Object *in, int chunkInInode,
                                int chunkInNAND, int inScan)
 {
        /* NB inScan is zero unless scanning.
@@ -2748,11 +2748,11 @@ int yaffs_PutChunkIntoFile(yaffs_Object *in, int chunkInInode,
                        YBUG();
                }
 
-               yaffs_DeleteChunk(dev, chunkInNAND, 1, __LINE__);
+               yaffs_chunk_del(dev, chunkInNAND, 1, __LINE__);
                return YAFFS_OK;
        }
 
-       tn = yaffs_AddOrFindLevel0Tnode(dev,
+       tn = yaffs_add_find_tnode_0(dev,
                                        &in->variant.fileVariant,
                                        chunkInInode,
                                        NULL);
@@ -2763,7 +2763,7 @@ int yaffs_PutChunkIntoFile(yaffs_Object *in, int chunkInInode,
                /* Dummy insert, bail now */
                return YAFFS_OK;
 
-       existingChunk = yaffs_GetChunkGroupBase(dev, tn, chunkInInode);
+       existingChunk = yaffs_get_group_base(dev, tn, chunkInInode);
 
        if (inScan != 0) {
                /* If we're scanning then we need to test for duplicates
@@ -2788,13 +2788,13 @@ int yaffs_PutChunkIntoFile(yaffs_Object *in, int chunkInInode,
 
                        if (inScan > 0) {
                                /* Only do this for forward scanning */
-                               yaffs_ReadChunkWithTagsFromNAND(dev,
+                               yaffs_rd_chunk_tags_nand(dev,
                                                                chunkInNAND,
                                                                NULL, &newTags);
 
                                /* Do a proper find */
                                existingChunk =
-                                   yaffs_FindChunkInFile(in, chunkInInode,
+                                   yaffs_find_chunk_in_file(in, chunkInInode,
                                                          &existingTags);
                        }
 
@@ -2824,14 +2824,14 @@ int yaffs_PutChunkIntoFile(yaffs_Object *in, int chunkInInode,
                                 * Use new
                                 * Delete the old one and drop through to update the tnode
                                 */
-                               yaffs_DeleteChunk(dev, existingChunk, 1,
+                               yaffs_chunk_del(dev, existingChunk, 1,
                                                  __LINE__);
                        } else {
                                /* Backward scanning or we want to use the existing one
                                 * Use existing.
                                 * Delete the new one and return early so that the tnode isn't changed
                                 */
-                               yaffs_DeleteChunk(dev, chunkInNAND, 1,
+                               yaffs_chunk_del(dev, chunkInNAND, 1,
                                                  __LINE__);
                                return YAFFS_OK;
                        }
@@ -2842,18 +2842,18 @@ int yaffs_PutChunkIntoFile(yaffs_Object *in, int chunkInInode,
        if (existingChunk == 0)
                in->nDataChunks++;
 
-       yaffs_LoadLevel0Tnode(dev, tn, chunkInInode, chunkInNAND);
+       yaffs_load_tnode_0(dev, tn, chunkInInode, chunkInNAND);
 
        return YAFFS_OK;
 }
 
-static int yaffs_ReadChunkDataFromObject(yaffs_Object *in, int chunkInInode,
+static int yaffs_rd_data_obj(yaffs_Object *in, int chunkInInode,
                                        __u8 *buffer)
 {
-       int chunkInNAND = yaffs_FindChunkInFile(in, chunkInInode, NULL);
+       int chunkInNAND = yaffs_find_chunk_in_file(in, chunkInInode, NULL);
 
        if (chunkInNAND >= 0)
-               return yaffs_ReadChunkWithTagsFromNAND(in->myDev, chunkInNAND,
+               return yaffs_rd_chunk_tags_nand(in->myDev, chunkInNAND,
                                                buffer, NULL);
        else {
                T(YAFFS_TRACE_NANDACCESS,
@@ -2866,7 +2866,7 @@ static int yaffs_ReadChunkDataFromObject(yaffs_Object *in, int chunkInInode,
 
 }
 
-void yaffs_DeleteChunk(yaffs_Device *dev, int chunkId, int markNAND, int lyn)
+void yaffs_chunk_del(yaffs_Device *dev, int chunkId, int markNAND, int lyn)
 {
        int block;
        int page;
@@ -2881,14 +2881,14 @@ void yaffs_DeleteChunk(yaffs_Device *dev, int chunkId, int markNAND, int lyn)
        page = chunkId % dev->param.nChunksPerBlock;
 
 
-       if (!yaffs_CheckChunkBit(dev, block, page))
+       if (!yaffs_check_chunk_bit(dev, block, page))
                T(YAFFS_TRACE_VERIFY,
                        (TSTR("Deleting invalid chunk %d"TENDSTR),
                         chunkId));
 
-       bi = yaffs_GetBlockInfo(dev, block);
+       bi = yaffs_get_block_info(dev, block);
        
-       yaffs2_UpdateOldestDirtySequence(dev, block, bi);
+       yaffs2_update_oldest_dirty_seq(dev, block, bi);
 
        T(YAFFS_TRACE_DELETION,
          (TSTR("line %d delete of chunk %d" TENDSTR), lyn, chunkId));
@@ -2896,12 +2896,12 @@ void yaffs_DeleteChunk(yaffs_Device *dev, int chunkId, int markNAND, int lyn)
        if (!dev->param.isYaffs2 && markNAND &&
            bi->blockState != YAFFS_BLOCK_STATE_COLLECTING) {
 
-               yaffs_InitialiseTags(&tags);
+               yaffs_init_tags(&tags);
 
                tags.chunkDeleted = 1;
 
-               yaffs_WriteChunkWithTagsToNAND(dev, chunkId, NULL, &tags);
-               yaffs_HandleUpdateChunk(dev, chunkId, &tags);
+               yaffs_wr_chunk_tags_nand(dev, chunkId, NULL, &tags);
+               yaffs_handle_chunk_update(dev, chunkId, &tags);
        } else {
                dev->nUnmarkedDeletions++;
        }
@@ -2915,7 +2915,7 @@ void yaffs_DeleteChunk(yaffs_Device *dev, int chunkId, int markNAND, int lyn)
            bi->blockState == YAFFS_BLOCK_STATE_COLLECTING) {
                dev->nFreeChunks++;
 
-               yaffs_ClearChunkBit(dev, block, page);
+               yaffs_clear_chunk_bit(dev, block, page);
 
                bi->pagesInUse--;
 
@@ -2923,14 +2923,14 @@ void yaffs_DeleteChunk(yaffs_Device *dev, int chunkId, int markNAND, int lyn)
                    !bi->hasShrinkHeader &&
                    bi->blockState != YAFFS_BLOCK_STATE_ALLOCATING &&
                    bi->blockState != YAFFS_BLOCK_STATE_NEEDS_SCANNING) {
-                       yaffs_BlockBecameDirty(dev, block);
+                       yaffs_block_became_dirty(dev, block);
                }
 
        }
 
 }
 
-static int yaffs_WriteChunkDataToObject(yaffs_Object *in, int chunkInInode,
+static int yaffs_wr_data_obj(yaffs_Object *in, int chunkInInode,
                                        const __u8 *buffer, int nBytes,
                                        int useReserve)
 {
@@ -2947,19 +2947,19 @@ static int yaffs_WriteChunkDataToObject(yaffs_Object *in, int chunkInInode,
 
        yaffs_Device *dev = in->myDev;
 
-       yaffs_CheckGarbageCollection(dev,0);
+       yaffs_check_gc(dev,0);
 
        /* Get the previous chunk at this location in the file if it exists.
         * If it does not exist then put a zero into the tree. This creates
         * the tnode now, rather than later when it is harder to clean up.
         */
-       prevChunkId = yaffs_FindChunkInFile(in, chunkInInode, &prevTags);
+       prevChunkId = yaffs_find_chunk_in_file(in, chunkInInode, &prevTags);
        if(prevChunkId < 1 &&
-               !yaffs_PutChunkIntoFile(in, chunkInInode, 0, 0))
+               !yaffs_put_chunk_in_file(in, chunkInInode, 0, 0))
                return 0;
 
        /* Set up new tags */
-       yaffs_InitialiseTags(&newTags);
+       yaffs_init_tags(&newTags);
 
        newTags.chunkId = chunkInInode;
        newTags.objectId = in->objectId;
@@ -2975,16 +2975,16 @@ static int yaffs_WriteChunkDataToObject(yaffs_Object *in, int chunkInInode,
        
                
        newChunkId =
-           yaffs_WriteNewChunkWithTagsToNAND(dev, buffer, &newTags,
+           yaffs_write_new_chunk(dev, buffer, &newTags,
                                              useReserve);
 
        if (newChunkId > 0) {
-               yaffs_PutChunkIntoFile(in, chunkInInode, newChunkId, 0);
+               yaffs_put_chunk_in_file(in, chunkInInode, newChunkId, 0);
 
                if (prevChunkId > 0)
-                       yaffs_DeleteChunk(dev, prevChunkId, 1, __LINE__);
+                       yaffs_chunk_del(dev, prevChunkId, 1, __LINE__);
 
-               yaffs_VerifyFileSanity(in);
+               yaffs_verify_file_sane(in);
        }
        return newChunkId;
 
@@ -2993,8 +2993,8 @@ static int yaffs_WriteChunkDataToObject(yaffs_Object *in, int chunkInInode,
 /* UpdateObjectHeader updates the header on NAND for an object.
  * If name is not NULL, then that new name is used.
  */
-int yaffs_UpdateObjectHeader(yaffs_Object *in, const YCHAR *name, int force,
-                            int isShrink, int shadows, yaffs_XAttrMod *xmod)
+int yaffs_update_oh(yaffs_Object *in, const YCHAR *name, int force,
+                            int isShrink, int shadows, yaffs_xattr_mod *xmod)
 {
 
        yaffs_BlockInfo *bi;
@@ -3022,19 +3022,19 @@ int yaffs_UpdateObjectHeader(yaffs_Object *in, const YCHAR *name, int force,
                in == dev->rootDir || /* The rootDir should also be saved */
                force  || xmod) {
 
-               yaffs_CheckGarbageCollection(dev,0);
-               yaffs_CheckObjectDetailsLoaded(in);
+               yaffs_check_gc(dev,0);
+               yaffs_check_obj_details_loaded(in);
 
-               buffer = yaffs_GetTempBuffer(in->myDev, __LINE__);
+               buffer = yaffs_get_temp_buffer(in->myDev, __LINE__);
                oh = (yaffs_ObjectHeader *) buffer;
 
                prevChunkId = in->hdrChunk;
 
                if (prevChunkId > 0) {
-                       result = yaffs_ReadChunkWithTagsFromNAND(dev, prevChunkId,
+                       result = yaffs_rd_chunk_tags_nand(dev, prevChunkId,
                                                        buffer, &oldTags);
 
-                       yaffs_VerifyObjectHeader(in, oh, &oldTags, 0);
+                       yaffs_verify_oh(in, oh, &oldTags, 0);
 
                        memcpy(oldName, oh->name, sizeof(oh->name));
                        memset(buffer, 0xFF, sizeof(yaffs_ObjectHeader));
@@ -3067,7 +3067,7 @@ int yaffs_UpdateObjectHeader(yaffs_Object *in, const YCHAR *name, int force,
 
                if (name && *name) {
                        memset(oh->name, 0, sizeof(oh->name));
-                       yaffs_LoadObjectHeaderFromName(dev,oh->name,name);
+                       yaffs_load_oh_from_name(dev,oh->name,name);
                } else if (prevChunkId > 0)
                        memcpy(oh->name, oldName, sizeof(oh->name));
                else
@@ -3109,11 +3109,11 @@ int yaffs_UpdateObjectHeader(yaffs_Object *in, const YCHAR *name, int force,
 
                /* process any xattrib modifications */
                if(xmod)
-                       yaffs_ApplyXMod(in, (char *)buffer, xmod);
+                       yaffs_apply_xattrib_mod(in, (char *)buffer, xmod);
 
 
                /* Tags */
-               yaffs_InitialiseTags(&newTags);
+               yaffs_init_tags(&newTags);
                in->serial++;
                newTags.chunkId = 0;
                newTags.objectId = in->objectId;
@@ -3129,11 +3129,11 @@ int yaffs_UpdateObjectHeader(yaffs_Object *in, const YCHAR *name, int force,
                newTags.extraShadows = (oh->shadowsObject > 0) ? 1 : 0;
                newTags.extraObjectType = in->variantType;
 
-               yaffs_VerifyObjectHeader(in, oh, &newTags, 1);
+               yaffs_verify_oh(in, oh, &newTags, 1);
 
                /* Create new chunk in NAND */
                newChunkId =
-                   yaffs_WriteNewChunkWithTagsToNAND(dev, buffer, &newTags,
+                   yaffs_write_new_chunk(dev, buffer, &newTags,
                                                      (prevChunkId > 0) ? 1 : 0);
 
                if (newChunkId >= 0) {
@@ -3141,16 +3141,16 @@ int yaffs_UpdateObjectHeader(yaffs_Object *in, const YCHAR *name, int force,
                        in->hdrChunk = newChunkId;
 
                        if (prevChunkId > 0) {
-                               yaffs_DeleteChunk(dev, prevChunkId, 1,
+                               yaffs_chunk_del(dev, prevChunkId, 1,
                                                  __LINE__);
                        }
 
-                       if (!yaffs_ObjectHasCachedWriteData(in))
+                       if (!yaffs_obj_cache_dirty(in))
                                in->dirty = 0;
 
                        /* If this was a shrink, then mark the block that the chunk lives on */
                        if (isShrink) {
-                               bi = yaffs_GetBlockInfo(in->myDev,
+                               bi = yaffs_get_block_info(in->myDev,
                                        newChunkId / in->myDev->param.nChunksPerBlock);
                                bi->hasShrinkHeader = 1;
                        }
@@ -3162,7 +3162,7 @@ int yaffs_UpdateObjectHeader(yaffs_Object *in, const YCHAR *name, int force,
        }
 
        if (buffer)
-               yaffs_ReleaseTempBuffer(dev, buffer, __LINE__);
+               yaffs_release_temp_buffer(dev, buffer, __LINE__);
 
        return retVal;
 }
@@ -3180,7 +3180,7 @@ int yaffs_UpdateObjectHeader(yaffs_Object *in, const YCHAR *name, int force,
  *   need a very intelligent search.
  */
 
-static int yaffs_ObjectHasCachedWriteData(yaffs_Object *obj)
+static int yaffs_obj_cache_dirty(yaffs_Object *obj)
 {
        yaffs_Device *dev = obj->myDev;
        int i;
@@ -3198,7 +3198,7 @@ static int yaffs_ObjectHasCachedWriteData(yaffs_Object *obj)
 }
 
 
-static void yaffs_FlushFilesChunkCache(yaffs_Object *obj)
+static void yaffs_flush_file_cache(yaffs_Object *obj)
 {
        yaffs_Device *dev = obj->myDev;
        int lowest = -99;       /* Stop compiler whining. */
@@ -3228,7 +3228,7 @@ static void yaffs_FlushFilesChunkCache(yaffs_Object *obj)
                                /* Write it out and free it up */
 
                                chunkWritten =
-                                   yaffs_WriteChunkDataToObject(cache->object,
+                                   yaffs_wr_data_obj(cache->object,
                                                                 cache->chunkId,
                                                                 cache->data,
                                                                 cache->nBytes,
@@ -3249,12 +3249,12 @@ static void yaffs_FlushFilesChunkCache(yaffs_Object *obj)
 
 }
 
-/*yaffs_FlushEntireDeviceCache(dev)
+/*yaffs_flush_whole_cache(dev)
  *
  *
  */
 
-void yaffs_FlushEntireDeviceCache(yaffs_Device *dev)
+void yaffs_flush_whole_cache(yaffs_Device *dev)
 {
        yaffs_Object *obj;
        int nCaches = dev->param.nShortOpCaches;
@@ -3272,7 +3272,7 @@ void yaffs_FlushEntireDeviceCache(yaffs_Device *dev)
 
                }
                if (obj)
-                       yaffs_FlushFilesChunkCache(obj);
+                       yaffs_flush_file_cache(obj);
 
        } while (obj);
 
@@ -3284,7 +3284,7 @@ void yaffs_FlushEntireDeviceCache(yaffs_Device *dev)
  * Then look for the least recently used non-dirty one.
  * Then look for the least recently used dirty one...., flush and look again.
  */
-static yaffs_ChunkCache *yaffs_GrabChunkCacheWorker(yaffs_Device *dev)
+static yaffs_ChunkCache *yaffs_grab_chunk_worker(yaffs_Device *dev)
 {
        int i;
 
@@ -3298,7 +3298,7 @@ static yaffs_ChunkCache *yaffs_GrabChunkCacheWorker(yaffs_Device *dev)
        return NULL;
 }
 
-static yaffs_ChunkCache *yaffs_GrabChunkCache(yaffs_Device *dev)
+static yaffs_ChunkCache *yaffs_grab_chunk_cache(yaffs_Device *dev)
 {
        yaffs_ChunkCache *cache;
        yaffs_Object *theObj;
@@ -3309,7 +3309,7 @@ static yaffs_ChunkCache *yaffs_GrabChunkCache(yaffs_Device *dev)
        if (dev->param.nShortOpCaches > 0) {
                /* Try find a non-dirty one... */
 
-               cache = yaffs_GrabChunkCacheWorker(dev);
+               cache = yaffs_grab_chunk_worker(dev);
 
                if (!cache) {
                        /* They were all dirty, find the last recently used object and flush
@@ -3338,8 +3338,8 @@ static yaffs_ChunkCache *yaffs_GrabChunkCache(yaffs_Device *dev)
 
                        if (!cache || cache->dirty) {
                                /* Flush and try again */
-                               yaffs_FlushFilesChunkCache(theObj);
-                               cache = yaffs_GrabChunkCacheWorker(dev);
+                               yaffs_flush_file_cache(theObj);
+                               cache = yaffs_grab_chunk_worker(dev);
                        }
 
                }
@@ -3350,7 +3350,7 @@ static yaffs_ChunkCache *yaffs_GrabChunkCache(yaffs_Device *dev)
 }
 
 /* Find a cached chunk */
-static yaffs_ChunkCache *yaffs_FindChunkCache(const yaffs_Object *obj,
+static yaffs_ChunkCache *yaffs_find_chunk_cache(const yaffs_Object *obj,
                                              int chunkId)
 {
        yaffs_Device *dev = obj->myDev;
@@ -3369,7 +3369,7 @@ static yaffs_ChunkCache *yaffs_FindChunkCache(const yaffs_Object *obj,
 }
 
 /* Mark the chunk for the least recently used algorithym */
-static void yaffs_UseChunkCache(yaffs_Device *dev, yaffs_ChunkCache *cache,
+static void yaffs_use_cache(yaffs_Device *dev, yaffs_ChunkCache *cache,
                                int isAWrite)
 {
 
@@ -3396,10 +3396,10 @@ static void yaffs_UseChunkCache(yaffs_Device *dev, yaffs_ChunkCache *cache,
  * Do this when a whole page gets written,
  * ie the short cache for this page is no longer valid.
  */
-static void yaffs_InvalidateChunkCache(yaffs_Object *object, int chunkId)
+static void yaffs_invalidate_chunk_cache(yaffs_Object *object, int chunkId)
 {
        if (object->myDev->param.nShortOpCaches > 0) {
-               yaffs_ChunkCache *cache = yaffs_FindChunkCache(object, chunkId);
+               yaffs_ChunkCache *cache = yaffs_find_chunk_cache(object, chunkId);
 
                if (cache)
                        cache->object = NULL;
@@ -3409,7 +3409,7 @@ static void yaffs_InvalidateChunkCache(yaffs_Object *object, int chunkId)
 /* Invalidate all the cache pages associated with this object
  * Do this whenever ther file is deleted or resized.
  */
-static void yaffs_InvalidateWholeChunkCache(yaffs_Object *in)
+static void yaffs_invalidate_whole_cache(yaffs_Object *in)
 {
        int i;
        yaffs_Device *dev = in->myDev;
@@ -3434,7 +3434,7 @@ static void yaffs_InvalidateWholeChunkCache(yaffs_Object *in)
  * Curve-balls: the first chunk might also be the last chunk.
  */
 
-int yaffs_ReadDataFromFile(yaffs_Object *in, __u8 *buffer, loff_t offset,
+int yaffs_file_rd(yaffs_Object *in, __u8 *buffer, loff_t offset,
                        int nBytes)
 {
 
@@ -3452,7 +3452,7 @@ int yaffs_ReadDataFromFile(yaffs_Object *in, __u8 *buffer, loff_t offset,
        while (n > 0) {
                /* chunk = offset / dev->nDataBytesPerChunk + 1; */
                /* start = offset % dev->nDataBytesPerChunk; */
-               yaffs_AddrToChunk(dev, offset, &chunk, &start);
+               yaffs_addr_to_chunk(dev, offset, &chunk, &start);
                chunk++;
 
                /* OK now check for the curveball where the start and end are in
@@ -3463,7 +3463,7 @@ int yaffs_ReadDataFromFile(yaffs_Object *in, __u8 *buffer, loff_t offset,
                else
                        nToCopy = dev->nDataBytesPerChunk - start;
 
-               cache = yaffs_FindChunkCache(in, chunk);
+               cache = yaffs_find_chunk_cache(in, chunk);
 
                /* If the chunk is already in the cache or it is less than a whole chunk
                 * or we're using inband tags then use the cache (if there is caching)
@@ -3475,18 +3475,18 @@ int yaffs_ReadDataFromFile(yaffs_Object *in, __u8 *buffer, loff_t offset,
                                /* If we can't find the data in the cache, then load it up. */
 
                                if (!cache) {
-                                       cache = yaffs_GrabChunkCache(in->myDev);
+                                       cache = yaffs_grab_chunk_cache(in->myDev);
                                        cache->object = in;
                                        cache->chunkId = chunk;
                                        cache->dirty = 0;
                                        cache->locked = 0;
-                                       yaffs_ReadChunkDataFromObject(in, chunk,
+                                       yaffs_rd_data_obj(in, chunk,
                                                                      cache->
                                                                      data);
                                        cache->nBytes = 0;
                                }
 
-                               yaffs_UseChunkCache(dev, cache, 0);
+                               yaffs_use_cache(dev, cache, 0);
 
                                cache->locked = 1;
 
@@ -3498,21 +3498,21 @@ int yaffs_ReadDataFromFile(yaffs_Object *in, __u8 *buffer, loff_t offset,
                                /* Read into the local buffer then copy..*/
 
                                __u8 *localBuffer =
-                                   yaffs_GetTempBuffer(dev, __LINE__);
-                               yaffs_ReadChunkDataFromObject(in, chunk,
+                                   yaffs_get_temp_buffer(dev, __LINE__);
+                               yaffs_rd_data_obj(in, chunk,
                                                              localBuffer);
 
                                memcpy(buffer, &localBuffer[start], nToCopy);
 
 
-                               yaffs_ReleaseTempBuffer(dev, localBuffer,
+                               yaffs_release_temp_buffer(dev, localBuffer,
                                                        __LINE__);
                        }
 
                } else {
 
                        /* A full chunk. Read directly into the supplied buffer. */
-                       yaffs_ReadChunkDataFromObject(in, chunk, buffer);
+                       yaffs_rd_data_obj(in, chunk, buffer);
 
                }
 
@@ -3526,7 +3526,7 @@ int yaffs_ReadDataFromFile(yaffs_Object *in, __u8 *buffer, loff_t offset,
        return nDone;
 }
 
-int yaffs_DoWriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
+int yaffs_do_file_wr(yaffs_Object *in, const __u8 *buffer, loff_t offset,
                        int nBytes, int writeThrough)
 {
 
@@ -3546,7 +3546,7 @@ int yaffs_DoWriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
        dev = in->myDev;
 
        while (n > 0 && chunkWritten >= 0) {
-               yaffs_AddrToChunk(dev, offset, &chunk, &start);
+               yaffs_addr_to_chunk(dev, offset, &chunk, &start);
 
                if (chunk * dev->nDataBytesPerChunk + start != offset ||
                                start >= dev->nDataBytesPerChunk) {
@@ -3598,20 +3598,20 @@ int yaffs_DoWriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
                        if (dev->param.nShortOpCaches > 0) {
                                yaffs_ChunkCache *cache;
                                /* If we can't find the data in the cache, then load the cache */
-                               cache = yaffs_FindChunkCache(in, chunk);
+                               cache = yaffs_find_chunk_cache(in, chunk);
 
                                if (!cache
-                                   && yaffs_CheckSpaceForAllocation(dev, 1)) {
-                                       cache = yaffs_GrabChunkCache(dev);
+                                   && yaffs_check_alloc_available(dev, 1)) {
+                                       cache = yaffs_grab_chunk_cache(dev);
                                        cache->object = in;
                                        cache->chunkId = chunk;
                                        cache->dirty = 0;
                                        cache->locked = 0;
-                                       yaffs_ReadChunkDataFromObject(in, chunk,
+                                       yaffs_rd_data_obj(in, chunk,
                                                                      cache->data);
                                } else if (cache &&
                                        !cache->dirty &&
-                                       !yaffs_CheckSpaceForAllocation(dev, 1)) {
+                                       !yaffs_check_alloc_available(dev, 1)) {
                                        /* Drop the cache if it was a read cache item and
                                         * no space check has been made for it.
                                         */
@@ -3619,7 +3619,7 @@ int yaffs_DoWriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
                                }
 
                                if (cache) {
-                                       yaffs_UseChunkCache(dev, cache, 1);
+                                       yaffs_use_cache(dev, cache, 1);
                                        cache->locked = 1;
 
 
@@ -3632,7 +3632,7 @@ int yaffs_DoWriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
 
                                        if (writeThrough) {
                                                chunkWritten =
-                                                   yaffs_WriteChunkDataToObject
+                                                   yaffs_wr_data_obj
                                                    (cache->object,
                                                     cache->chunkId,
                                                     cache->data, cache->nBytes,
@@ -3649,9 +3649,9 @@ int yaffs_DoWriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
                                 */
 
                                __u8 *localBuffer =
-                                   yaffs_GetTempBuffer(dev, __LINE__);
+                                   yaffs_get_temp_buffer(dev, __LINE__);
 
-                               yaffs_ReadChunkDataFromObject(in, chunk,
+                               yaffs_rd_data_obj(in, chunk,
                                                              localBuffer);
 
 
@@ -3659,12 +3659,12 @@ int yaffs_DoWriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
                                memcpy(&localBuffer[start], buffer, nToCopy);
 
                                chunkWritten =
-                                   yaffs_WriteChunkDataToObject(in, chunk,
+                                   yaffs_wr_data_obj(in, chunk,
                                                                 localBuffer,
                                                                 nToWriteBack,
                                                                 0);
 
-                               yaffs_ReleaseTempBuffer(dev, localBuffer,
+                               yaffs_release_temp_buffer(dev, localBuffer,
                                                        __LINE__);
 
                        }
@@ -3675,12 +3675,12 @@ int yaffs_DoWriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
 
 
                        chunkWritten =
-                           yaffs_WriteChunkDataToObject(in, chunk, buffer,
+                           yaffs_wr_data_obj(in, chunk, buffer,
                                                         dev->nDataBytesPerChunk,
                                                         0);
 
                        /* Since we've overwritten the cached data, we better invalidate it. */
-                       yaffs_InvalidateChunkCache(in, chunk);
+                       yaffs_invalidate_chunk_cache(in, chunk);
                }
 
                if (chunkWritten >= 0) {
@@ -3702,18 +3702,18 @@ int yaffs_DoWriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
        return nDone;
 }
 
-int yaffs_WriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
+int yaffs_wr_file(yaffs_Object *in, const __u8 *buffer, loff_t offset,
                        int nBytes, int writeThrough)
 {
-       yaffs2_HandleHole(in,offset);
-       return yaffs_DoWriteDataToFile(in,buffer,offset,nBytes,writeThrough);
+       yaffs2_handle_hole(in,offset);
+       return yaffs_do_file_wr(in,buffer,offset,nBytes,writeThrough);
 }
 
 
 
 /* ---------------------- File resizing stuff ------------------ */
 
-static void yaffs_PruneResizedChunks(yaffs_Object *in, int newSize)
+static void yaffs_prune_chunks(yaffs_Object *in, int newSize)
 {
 
        yaffs_Device *dev = in->myDev;
@@ -3732,10 +3732,10 @@ static void yaffs_PruneResizedChunks(yaffs_Object *in, int newSize)
        for (i = lastDel; i >= startDel; i--) {
                /* NB this could be optimised somewhat,
                 * eg. could retrieve the tags and write them without
-                * using yaffs_DeleteChunk
+                * using yaffs_chunk_del
                 */
 
-               chunkId = yaffs_FindAndDeleteChunkInFile(in, i, NULL);
+               chunkId = yaffs_find_del_file_chunk(in, i, NULL);
                if (chunkId > 0) {
                        if (chunkId <
                            (dev->internalStartBlock * dev->param.nChunksPerBlock)
@@ -3747,7 +3747,7 @@ static void yaffs_PruneResizedChunks(yaffs_Object *in, int newSize)
                                   chunkId, i));
                        } else {
                                in->nDataChunks--;
-                               yaffs_DeleteChunk(dev, chunkId, 1, __LINE__);
+                               yaffs_chunk_del(dev, chunkId, 1, __LINE__);
                        }
                }
        }
@@ -3755,46 +3755,46 @@ static void yaffs_PruneResizedChunks(yaffs_Object *in, int newSize)
 }
 
 
-void yaffs_ResizeDown( yaffs_Object *obj, loff_t newSize)
+void yaffs_resize_file_down( yaffs_Object *obj, loff_t newSize)
 {
        int newFullChunks;
        __u32 newSizeOfPartialChunk;
        yaffs_Device *dev = obj->myDev;
 
-       yaffs_AddrToChunk(dev, newSize, &newFullChunks, &newSizeOfPartialChunk);
+       yaffs_addr_to_chunk(dev, newSize, &newFullChunks, &newSizeOfPartialChunk);
 
-       yaffs_PruneResizedChunks(obj, newSize);
+       yaffs_prune_chunks(obj, newSize);
 
        if (newSizeOfPartialChunk != 0) {
                int lastChunk = 1 + newFullChunks;
-               __u8 *localBuffer = yaffs_GetTempBuffer(dev, __LINE__);
+               __u8 *localBuffer = yaffs_get_temp_buffer(dev, __LINE__);
 
                /* Got to read and rewrite the last chunk with its new size and zero pad */
-               yaffs_ReadChunkDataFromObject(obj, lastChunk, localBuffer);
+               yaffs_rd_data_obj(obj, lastChunk, localBuffer);
                memset(localBuffer + newSizeOfPartialChunk, 0,
                        dev->nDataBytesPerChunk - newSizeOfPartialChunk);
 
-               yaffs_WriteChunkDataToObject(obj, lastChunk, localBuffer,
+               yaffs_wr_data_obj(obj, lastChunk, localBuffer,
                                             newSizeOfPartialChunk, 1);
 
-               yaffs_ReleaseTempBuffer(dev, localBuffer, __LINE__);
+               yaffs_release_temp_buffer(dev, localBuffer, __LINE__);
        }
 
        obj->variant.fileVariant.fileSize = newSize;
 
-       yaffs_PruneFileStructure(dev, &obj->variant.fileVariant);
+       yaffs_prune_tree(dev, &obj->variant.fileVariant);
 }
 
 
-int yaffs_ResizeFile(yaffs_Object *in, loff_t newSize)
+int yaffs_resize_file(yaffs_Object *in, loff_t newSize)
 {
        yaffs_Device *dev = in->myDev;
        int oldFileSize = in->variant.fileVariant.fileSize;
 
-       yaffs_FlushFilesChunkCache(in);
-       yaffs_InvalidateWholeChunkCache(in);
+       yaffs_flush_file_cache(in);
+       yaffs_invalidate_whole_cache(in);
 
-       yaffs_CheckGarbageCollection(dev,0);
+       yaffs_check_gc(dev,0);
 
        if (in->variantType != YAFFS_OBJECT_TYPE_FILE)
                return YAFFS_FAIL;
@@ -3803,11 +3803,11 @@ int yaffs_ResizeFile(yaffs_Object *in, loff_t newSize)
                return YAFFS_OK;
                
        if(newSize > oldFileSize){
-               yaffs2_HandleHole(in,newSize);
+               yaffs2_handle_hole(in,newSize);
                in->variant.fileVariant.fileSize = newSize;
        } else {
                /* newSize < oldFileSize */ 
-               yaffs_ResizeDown(in, newSize);
+               yaffs_resize_file_down(in, newSize);
        } 
 
        /* Write a new object header to reflect the resize.
@@ -3819,16 +3819,16 @@ int yaffs_ResizeFile(yaffs_Object *in, loff_t newSize)
            !in->isShadowed &&
            in->parent->objectId != YAFFS_OBJECTID_UNLINKED &&
            in->parent->objectId != YAFFS_OBJECTID_DELETED)
-               yaffs_UpdateObjectHeader(in, NULL, 0, 0, 0, NULL);
+               yaffs_update_oh(in, NULL, 0, 0, 0, NULL);
 
 
        return YAFFS_OK;
 }
 
-loff_t yaffs_GetFileSize(yaffs_Object *obj)
+loff_t yaffs_get_file_size(yaffs_Object *obj)
 {
        YCHAR *alias = NULL;
-       obj = yaffs_GetEquivalentObject(obj);
+       obj = yaffs_get_equivalent_obj(obj);
 
        switch (obj->variantType) {
        case YAFFS_OBJECT_TYPE_FILE:
@@ -3845,11 +3845,11 @@ loff_t yaffs_GetFileSize(yaffs_Object *obj)
 
 
 
-int yaffs_FlushFile(yaffs_Object *in, int updateTime, int dataSync)
+int yaffs_flush_file(yaffs_Object *in, int updateTime, int dataSync)
 {
        int retVal;
        if (in->dirty) {
-               yaffs_FlushFilesChunkCache(in);
+               yaffs_flush_file_cache(in);
                if(dataSync) /* Only sync data */
                        retVal=YAFFS_OK;
                else {
@@ -3863,7 +3863,7 @@ int yaffs_FlushFile(yaffs_Object *in, int updateTime, int dataSync)
 #endif
                        }
 
-                       retVal = (yaffs_UpdateObjectHeader(in, NULL, 0, 0, 0, NULL) >=
+                       retVal = (yaffs_update_oh(in, NULL, 0, 0, 0, NULL) >=
                                0) ? YAFFS_OK : YAFFS_FAIL;
                }
        } else {
@@ -3874,32 +3874,32 @@ int yaffs_FlushFile(yaffs_Object *in, int updateTime, int dataSync)
 
 }
 
-static int yaffs_DoGenericObjectDeletion(yaffs_Object *in)
+static int yaffs_generic_obj_del(yaffs_Object *in)
 {
 
        /* First off, invalidate the file's data in the cache, without flushing. */
-       yaffs_InvalidateWholeChunkCache(in);
+       yaffs_invalidate_whole_cache(in);
 
        if (in->myDev->param.isYaffs2 && (in->parent != in->myDev->deletedDir)) {
                /* Move to the unlinked directory so we have a record that it was deleted. */
-               yaffs_ChangeObjectName(in, in->myDev->deletedDir, _Y("deleted"), 0, 0);
+               yaffs_change_obj_name(in, in->myDev->deletedDir, _Y("deleted"), 0, 0);
 
        }
 
-       yaffs_RemoveObjectFromDirectory(in);
-       yaffs_DeleteChunk(in->myDev, in->hdrChunk, 1, __LINE__);
+       yaffs_remove_obj_from_dir(in);
+       yaffs_chunk_del(in->myDev, in->hdrChunk, 1, __LINE__);
        in->hdrChunk = 0;
 
-       yaffs_FreeObject(in);
+       yaffs_free_obj(in);
        return YAFFS_OK;
 
 }
 
-/* yaffs_DeleteFile deletes the whole file data
+/* yaffs_del_file deletes the whole file data
  * and the inode associated with the file.
  * It does not delete the links associated with the file.
  */
-static int yaffs_UnlinkFileIfNeeded(yaffs_Object *in)
+static int yaffs_unlink_file_if_needed(yaffs_Object *in)
 {
 
        int retVal;
@@ -3911,7 +3911,7 @@ static int yaffs_UnlinkFileIfNeeded(yaffs_Object *in)
 
        if (immediateDeletion) {
                retVal =
-                   yaffs_ChangeObjectName(in, in->myDev->deletedDir,
+                   yaffs_change_obj_name(in, in->myDev->deletedDir,
                                           _Y("deleted"), 0, 0);
                T(YAFFS_TRACE_TRACING,
                  (TSTR("yaffs: immediate deletion of file %d" TENDSTR),
@@ -3919,11 +3919,11 @@ static int yaffs_UnlinkFileIfNeeded(yaffs_Object *in)
                in->deleted = 1;
                in->myDev->nDeletedFiles++;
                if (dev->param.disableSoftDelete || dev->param.isYaffs2)
-                       yaffs_ResizeFile(in, 0);
-               yaffs_SoftDeleteFile(in);
+                       yaffs_resize_file(in, 0);
+               yaffs_soft_del_file(in);
        } else {
                retVal =
-                   yaffs_ChangeObjectName(in, in->myDev->unlinkedDir,
+                   yaffs_change_obj_name(in, in->myDev->unlinkedDir,
                                           _Y("unlinked"), 0, 0);
        }
 
@@ -3931,21 +3931,21 @@ static int yaffs_UnlinkFileIfNeeded(yaffs_Object *in)
        return retVal;
 }
 
-int yaffs_DeleteFile(yaffs_Object *in)
+int yaffs_del_file(yaffs_Object *in)
 {
        int retVal = YAFFS_OK;
        int deleted; /* Need to cache value on stack if in is freed */
        yaffs_Device *dev = in->myDev;
 
        if (dev->param.disableSoftDelete || dev->param.isYaffs2)
-               yaffs_ResizeFile(in, 0);
+               yaffs_resize_file(in, 0);
 
        if (in->nDataChunks > 0) {
                /* Use soft deletion if there is data in the file.
                 * That won't be the case if it has been resized to zero.
                 */
                if (!in->unlinked)
-                       retVal = yaffs_UnlinkFileIfNeeded(in);
+                       retVal = yaffs_unlink_file_if_needed(in);
 
                deleted = in->deleted;
 
@@ -3953,74 +3953,74 @@ int yaffs_DeleteFile(yaffs_Object *in)
                        in->deleted = 1;
                        deleted = 1;
                        in->myDev->nDeletedFiles++;
-                       yaffs_SoftDeleteFile(in);
+                       yaffs_soft_del_file(in);
                }
                return deleted ? YAFFS_OK : YAFFS_FAIL;
        } else {
                /* The file has no data chunks so we toss it immediately */
-               yaffs_FreeTnode(in->myDev, in->variant.fileVariant.top);
+               yaffs_free_tnode(in->myDev, in->variant.fileVariant.top);
                in->variant.fileVariant.top = NULL;
-               yaffs_DoGenericObjectDeletion(in);
+               yaffs_generic_obj_del(in);
 
                return YAFFS_OK;
        }
 }
 
-static int yaffs_IsNonEmptyDirectory(yaffs_Object *obj)
+static int yaffs_is_non_empty_dir(yaffs_Object *obj)
 {
        return (obj->variantType == YAFFS_OBJECT_TYPE_DIRECTORY) &&
                !(ylist_empty(&obj->variant.directoryVariant.children));
 }
 
-static int yaffs_DeleteDirectory(yaffs_Object *obj)
+static int yaffs_del_dir(yaffs_Object *obj)
 {
        /* First check that the directory is empty. */
-       if (yaffs_IsNonEmptyDirectory(obj))
+       if (yaffs_is_non_empty_dir(obj))
                return YAFFS_FAIL;
 
-       return yaffs_DoGenericObjectDeletion(obj);
+       return yaffs_generic_obj_del(obj);
 }
 
-static int yaffs_DeleteSymLink(yaffs_Object *in)
+static int yaffs_del_symlink(yaffs_Object *in)
 {
        if(in->variant.symLinkVariant.alias)
                YFREE(in->variant.symLinkVariant.alias);
        in->variant.symLinkVariant.alias=NULL;
 
-       return yaffs_DoGenericObjectDeletion(in);
+       return yaffs_generic_obj_del(in);
 }
 
-static int yaffs_DeleteHardLink(yaffs_Object *in)
+static int yaffs_del_link(yaffs_Object *in)
 {
        /* remove this hardlink from the list assocaited with the equivalent
         * object
         */
        ylist_del_init(&in->hardLinks);
-       return yaffs_DoGenericObjectDeletion(in);
+       return yaffs_generic_obj_del(in);
 }
 
-int yaffs_DeleteObject(yaffs_Object *obj)
+int yaffs_del_obj(yaffs_Object *obj)
 {
 int retVal = -1;
        switch (obj->variantType) {
        case YAFFS_OBJECT_TYPE_FILE:
-               retVal = yaffs_DeleteFile(obj);
+               retVal = yaffs_del_file(obj);
                break;
        case YAFFS_OBJECT_TYPE_DIRECTORY:
                if(!ylist_empty(&obj->variant.directoryVariant.dirty)){
                        T(YAFFS_TRACE_BACKGROUND, (TSTR("Remove object %d from dirty directories" TENDSTR),obj->objectId));
                        ylist_del_init(&obj->variant.directoryVariant.dirty);
                }
-               return yaffs_DeleteDirectory(obj);
+               return yaffs_del_dir(obj);
                break;
        case YAFFS_OBJECT_TYPE_SYMLINK:
-               retVal = yaffs_DeleteSymLink(obj);
+               retVal = yaffs_del_symlink(obj);
                break;
        case YAFFS_OBJECT_TYPE_HARDLINK:
-               retVal = yaffs_DeleteHardLink(obj);
+               retVal = yaffs_del_link(obj);
                break;
        case YAFFS_OBJECT_TYPE_SPECIAL:
-               retVal = yaffs_DoGenericObjectDeletion(obj);
+               retVal = yaffs_generic_obj_del(obj);
                break;
        case YAFFS_OBJECT_TYPE_UNKNOWN:
                retVal = 0;
@@ -4030,7 +4030,7 @@ int retVal = -1;
        return retVal;
 }
 
-static int yaffs_UnlinkWorker(yaffs_Object *obj)
+static int yaffs_unlink_worker(yaffs_Object *obj)
 {
 
        int immediateDeletion = 0;
@@ -4039,10 +4039,10 @@ static int yaffs_UnlinkWorker(yaffs_Object *obj)
                immediateDeletion = 1;
 
        if(obj)
-               yaffs_UpdateParent(obj->parent);
+               yaffs_update_parent(obj->parent);
 
        if (obj->variantType == YAFFS_OBJECT_TYPE_HARDLINK) {
-               return yaffs_DeleteHardLink(obj);
+               return yaffs_del_link(obj);
        } else if (!ylist_empty(&obj->hardLinks)) {
                /* Curve ball: We're unlinking an object that has a hardlink.
                 *
@@ -4065,53 +4065,53 @@ static int yaffs_UnlinkWorker(yaffs_Object *obj)
 
                hl = ylist_entry(obj->hardLinks.next, yaffs_Object, hardLinks);
 
-               yaffs_GetObjectName(hl, name, YAFFS_MAX_NAME_LENGTH + 1);
+               yaffs_get_obj_name(hl, name, YAFFS_MAX_NAME_LENGTH + 1);
                parent = hl->parent;
 
                ylist_del_init(&hl->hardLinks);
 
-               yaffs_AddObjectToDirectory(obj->myDev->unlinkedDir, hl);
+               yaffs_add_obj_to_dir(obj->myDev->unlinkedDir, hl);
 
-               retVal = yaffs_ChangeObjectName(obj,parent, name, 0, 0);
+               retVal = yaffs_change_obj_name(obj,parent, name, 0, 0);
 
                if (retVal == YAFFS_OK)
-                       retVal = yaffs_DoGenericObjectDeletion(hl);
+                       retVal = yaffs_generic_obj_del(hl);
 
                return retVal;
 
        } else if (immediateDeletion) {
                switch (obj->variantType) {
                case YAFFS_OBJECT_TYPE_FILE:
-                       return yaffs_DeleteFile(obj);
+                       return yaffs_del_file(obj);
                        break;
                case YAFFS_OBJECT_TYPE_DIRECTORY:
                        ylist_del_init(&obj->variant.directoryVariant.dirty);
-                       return yaffs_DeleteDirectory(obj);
+                       return yaffs_del_dir(obj);
                        break;
                case YAFFS_OBJECT_TYPE_SYMLINK:
-                       return yaffs_DeleteSymLink(obj);
+                       return yaffs_del_symlink(obj);
                        break;
                case YAFFS_OBJECT_TYPE_SPECIAL:
-                       return yaffs_DoGenericObjectDeletion(obj);
+                       return yaffs_generic_obj_del(obj);
                        break;
                case YAFFS_OBJECT_TYPE_HARDLINK:
                case YAFFS_OBJECT_TYPE_UNKNOWN:
                default:
                        return YAFFS_FAIL;
                }
-       } else if(yaffs_IsNonEmptyDirectory(obj))
+       } else if(yaffs_is_non_empty_dir(obj))
                return YAFFS_FAIL;
        else
-               return yaffs_ChangeObjectName(obj, obj->myDev->unlinkedDir,
+               return yaffs_change_obj_name(obj, obj->myDev->unlinkedDir,
                                           _Y("unlinked"), 0, 0);
 }
 
 
-static int yaffs_UnlinkObject(yaffs_Object *obj)
+static int yaffs_unlink_obj(yaffs_Object *obj)
 {
 
        if (obj && obj->unlinkAllowed)
-               return yaffs_UnlinkWorker(obj);
+               return yaffs_unlink_worker(obj);
 
        return YAFFS_FAIL;
 
@@ -4120,13 +4120,13 @@ int yaffs_Unlink(yaffs_Object *dir, const YCHAR *name)
 {
        yaffs_Object *obj;
 
-       obj = yaffs_FindObjectByName(dir, name);
-       return yaffs_UnlinkObject(obj);
+       obj = yaffs_find_by_name(dir, name);
+       return yaffs_unlink_obj(obj);
 }
 
 /*----------------------- Initialisation Scanning ---------------------- */
 
-void yaffs_HandleShadowedObject(yaffs_Device *dev, int objId,
+void yaffs_handle_shadowed_obj(yaffs_Device *dev, int objId,
                                int backwardScanning)
 {
        yaffs_Object *obj;
@@ -4140,7 +4140,7 @@ void yaffs_HandleShadowedObject(yaffs_Device *dev, int objId,
                /* Handle YAFFS2 case (backward scanning)
                 * If the shadowed object exists then ignore.
                 */
-               obj = yaffs_FindObjectByNumber(dev, objId);
+               obj = yaffs_find_by_number(dev, objId);
                if(obj)
                        return;
        }
@@ -4149,19 +4149,19 @@ void yaffs_HandleShadowedObject(yaffs_Device *dev, int objId,
         * We put it in unlinked dir to be cleaned up after the scanning
         */
        obj =
-           yaffs_FindOrCreateObjectByNumber(dev, objId,
+           yaffs_find_or_create_by_number(dev, objId,
                                             YAFFS_OBJECT_TYPE_FILE);
        if (!obj)
                return;
        obj->isShadowed = 1;
-       yaffs_AddObjectToDirectory(dev->unlinkedDir, obj);
+       yaffs_add_obj_to_dir(dev->unlinkedDir, obj);
        obj->variant.fileVariant.shrinkSize = 0;
        obj->valid = 1;         /* So that we don't read any other info for this file */
 
 }
 
 
-void yaffs_HardlinkFixup(yaffs_Device *dev, yaffs_Object *hardList)
+void yaffs_link_fixup(yaffs_Device *dev, yaffs_Object *hardList)
 {
        yaffs_Object *hl;
        yaffs_Object *in;
@@ -4170,7 +4170,7 @@ void yaffs_HardlinkFixup(yaffs_Device *dev, yaffs_Object *hardList)
                hl = hardList;
                hardList = (yaffs_Object *) (hardList->hardLinks.next);
 
-               in = yaffs_FindObjectByNumber(dev,
+               in = yaffs_find_by_number(dev,
                                              hl->variant.hardLinkVariant.
                                              equivalentObjectId);
 
@@ -4190,7 +4190,7 @@ void yaffs_HardlinkFixup(yaffs_Device *dev, yaffs_Object *hardList)
 }
 
 
-static void yaffs_StripDeletedObjects(yaffs_Device *dev)
+static void yaffs_strip_deleted_objs(yaffs_Device *dev)
 {
        /*
        *  Sort out state of unlinked and deleted objects after scanning.
@@ -4207,7 +4207,7 @@ static void yaffs_StripDeletedObjects(yaffs_Device *dev)
                &dev->unlinkedDir->variant.directoryVariant.children) {
                if (i) {
                        l = ylist_entry(i, yaffs_Object, siblings);
-                       yaffs_DeleteObject(l);
+                       yaffs_del_obj(l);
                }
        }
 
@@ -4215,7 +4215,7 @@ static void yaffs_StripDeletedObjects(yaffs_Device *dev)
                &dev->deletedDir->variant.directoryVariant.children) {
                if (i) {
                        l = ylist_entry(i, yaffs_Object, siblings);
-                       yaffs_DeleteObject(l);
+                       yaffs_del_obj(l);
                }
        }
 
@@ -4238,14 +4238,14 @@ static void yaffs_StripDeletedObjects(yaffs_Device *dev)
  * leaving the object "hanging" without being rooted in the directory tree.
  */
  
-static int yaffs_HasNULLParent(yaffs_Device *dev, yaffs_Object *obj)
+static int yaffs_has_null_parent(yaffs_Device *dev, yaffs_Object *obj)
 {
        return (obj == dev->deletedDir ||
                obj == dev->unlinkedDir||
                obj == dev->rootDir);
 }
 
-static void yaffs_FixHangingObjects(yaffs_Device *dev)
+static void yaffs_fix_hanging_objs(yaffs_Device *dev)
 {
        yaffs_Object *obj;
        yaffs_Object *parent;
@@ -4269,13 +4269,13 @@ static void yaffs_FixHangingObjects(yaffs_Device *dev)
                                obj = ylist_entry(lh, yaffs_Object, hashLink);
                                parent= obj->parent;
                                
-                               if(yaffs_HasNULLParent(dev,obj)){
+                               if(yaffs_has_null_parent(dev,obj)){
                                        /* These directories are not hanging */
                                        hanging = 0;
                                }
                                else if(!parent || parent->variantType != YAFFS_OBJECT_TYPE_DIRECTORY)
                                        hanging = 1;
-                               else if(yaffs_HasNULLParent(dev,parent))
+                               else if(yaffs_has_null_parent(dev,parent))
                                        hanging = 0;
                                else {
                                        /*
@@ -4298,7 +4298,7 @@ static void yaffs_FixHangingObjects(yaffs_Device *dev)
                                        T(YAFFS_TRACE_SCAN,
                                          (TSTR("Hanging object %d moved to lost and found" TENDSTR),
                                                obj->objectId));
-                                       yaffs_AddObjectToDirectory(dev->lostNFoundDir,obj);
+                                       yaffs_add_obj_to_dir(dev->lostNFoundDir,obj);
                                }
                        }
                }
@@ -4309,7 +4309,7 @@ static void yaffs_FixHangingObjects(yaffs_Device *dev)
 /*
  * Delete directory contents for cleaning up lost and found.
  */
-static void yaffs_DeleteDirectoryContents(yaffs_Object *dir)
+static void yaffs_del_dir_contents(yaffs_Object *dir)
 {
        yaffs_Object *obj;
        struct ylist_head *lh;
@@ -4322,7 +4322,7 @@ static void yaffs_DeleteDirectoryContents(yaffs_Object *dir)
                if (lh) {
                        obj = ylist_entry(lh, yaffs_Object, siblings);
                        if(obj->variantType == YAFFS_OBJECT_TYPE_DIRECTORY)
-                               yaffs_DeleteDirectoryContents(obj);
+                               yaffs_del_dir_contents(obj);
 
                        T(YAFFS_TRACE_SCAN,
                                (TSTR("Deleting lost_found object %d" TENDSTR),
@@ -4331,18 +4331,18 @@ static void yaffs_DeleteDirectoryContents(yaffs_Object *dir)
                        /* Need to use UnlinkObject since Delete would not handle
                         * hardlinked objects correctly.
                         */
-                       yaffs_UnlinkObject(obj); 
+                       yaffs_unlink_obj(obj); 
                }
        }
                        
 }
 
-static void yaffs_EmptyLostAndFound(yaffs_Device *dev)
+static void yaffs_empty_l_n_f(yaffs_Device *dev)
 {
-       yaffs_DeleteDirectoryContents(dev->lostNFoundDir);
+       yaffs_del_dir_contents(dev->lostNFoundDir);
 }
 
-static void yaffs_CheckObjectDetailsLoaded(yaffs_Object *in)
+static void yaffs_check_obj_details_loaded(yaffs_Object *in)
 {
        __u8 *chunkData;
        yaffs_ObjectHeader *oh;
@@ -4364,9 +4364,9 @@ static void yaffs_CheckObjectDetailsLoaded(yaffs_Object *in)
 
        if (in->lazyLoaded && in->hdrChunk > 0) {
                in->lazyLoaded = 0;
-               chunkData = yaffs_GetTempBuffer(dev, __LINE__);
+               chunkData = yaffs_get_temp_buffer(dev, __LINE__);
 
-               result = yaffs_ReadChunkWithTagsFromNAND(dev, in->hdrChunk, chunkData, &tags);
+               result = yaffs_rd_chunk_tags_nand(dev, in->hdrChunk, chunkData, &tags);
                oh = (yaffs_ObjectHeader *) chunkData;
 
                in->yst_mode = oh->yst_mode;
@@ -4386,23 +4386,23 @@ static void yaffs_CheckObjectDetailsLoaded(yaffs_Object *in)
                in->yst_rdev = oh->yst_rdev;
 
 #endif
-               yaffs_SetObjectNameFromOH(in, oh);
+               yaffs_set_obj_name_from_oh(in, oh);
 
                if (in->variantType == YAFFS_OBJECT_TYPE_SYMLINK) {
                        in->variant.symLinkVariant.alias =
-                                                   yaffs_CloneString(oh->alias);
+                                                   yaffs_clone_str(oh->alias);
                        if (!in->variant.symLinkVariant.alias)
                                alloc_failed = 1; /* Not returned to caller */
                }
 
-               yaffs_ReleaseTempBuffer(dev, chunkData, __LINE__);
+               yaffs_release_temp_buffer(dev, chunkData, __LINE__);
        }
 }
 
 /*------------------------------  Directory Functions ----------------------------- */
 
 /*
- *yaffs_UpdateParent() handles fixing a directories mtime and ctime when a new
+ *yaffs_update_parent() handles fixing a directories mtime and ctime when a new
  * link (ie. name) is created or deleted in the directory.
  *
  * ie.
@@ -4413,11 +4413,11 @@ static void yaffs_CheckObjectDetailsLoaded(yaffs_Object *in)
  * This can be handled immediately or defered. Defering helps reduce the number
  * of updates when many files in a directory are changed within a brief period.
  *
- * If the directory updating is defered then yaffs_UpdateDirtyDirecories must be
+ * If the directory updating is defered then yaffs_update_dirty_dirs must be
  * called periodically.
  */
  
-static void yaffs_UpdateParent(yaffs_Object *obj)
+static void yaffs_update_parent(yaffs_Object *obj)
 {
        yaffs_Device *dev;
        if(!obj)
@@ -4436,11 +4436,11 @@ static void yaffs_UpdateParent(yaffs_Object *obj)
                }
 
        } else
-               yaffs_UpdateObjectHeader(obj, NULL, 0, 0, 0, NULL);
+               yaffs_update_oh(obj, NULL, 0, 0, 0, NULL);
 #endif
 }
 
-void yaffs_UpdateDirtyDirectories(yaffs_Device *dev)
+void yaffs_update_dirty_dirs(yaffs_Device *dev)
 {
        struct ylist_head *link;
        yaffs_Object *obj;
@@ -4460,19 +4460,19 @@ void yaffs_UpdateDirtyDirectories(yaffs_Device *dev)
                T(YAFFS_TRACE_BACKGROUND, (TSTR("Update directory %d" TENDSTR), obj->objectId));
 
                if(obj->dirty)
-                       yaffs_UpdateObjectHeader(obj, NULL, 0, 0, 0, NULL);
+                       yaffs_update_oh(obj, NULL, 0, 0, 0, NULL);
        }
 }
 
-static void yaffs_RemoveObjectFromDirectory(yaffs_Object *obj)
+static void yaffs_remove_obj_from_dir(yaffs_Object *obj)
 {
        yaffs_Device *dev = obj->myDev;
        yaffs_Object *parent;
 
-       yaffs_VerifyObjectInDirectory(obj);
+       yaffs_verify_obj_in_dir(obj);
        parent = obj->parent;
 
-       yaffs_VerifyDirectory(parent);
+       yaffs_verify_dir(parent);
 
        if (dev && dev->param.removeObjectCallback)
                dev->param.removeObjectCallback(obj);
@@ -4481,10 +4481,10 @@ static void yaffs_RemoveObjectFromDirectory(yaffs_Object *obj)
        ylist_del_init(&obj->siblings);
        obj->parent = NULL;
        
-       yaffs_VerifyDirectory(parent);
+       yaffs_verify_dir(parent);
 }
 
-void yaffs_AddObjectToDirectory(yaffs_Object *directory,
+void yaffs_add_obj_to_dir(yaffs_Object *directory,
                                        yaffs_Object *obj)
 {
        if (!directory) {
@@ -4509,9 +4509,9 @@ void yaffs_AddObjectToDirectory(yaffs_Object *directory,
        }
 
 
-       yaffs_VerifyDirectory(directory);
+       yaffs_verify_dir(directory);
 
-       yaffs_RemoveObjectFromDirectory(obj);
+       yaffs_remove_obj_from_dir(obj);
 
 
        /* Now add it */
@@ -4525,11 +4525,11 @@ void yaffs_AddObjectToDirectory(yaffs_Object *directory,
                obj->renameAllowed = 0;
        }
 
-       yaffs_VerifyDirectory(directory);
-       yaffs_VerifyObjectInDirectory(obj);
+       yaffs_verify_dir(directory);
+       yaffs_verify_obj_in_dir(obj);
 }
 
-yaffs_Object *yaffs_FindObjectByName(yaffs_Object *directory,
+yaffs_Object *yaffs_find_by_name(yaffs_Object *directory,
                                     const YCHAR *name)
 {
        int sum;
@@ -4545,7 +4545,7 @@ yaffs_Object *yaffs_FindObjectByName(yaffs_Object *directory,
        if (!directory) {
                T(YAFFS_TRACE_ALWAYS,
                  (TSTR
-                  ("tragedy: yaffs_FindObjectByName: null pointer directory"
+                  ("tragedy: yaffs_find_by_name: null pointer directory"
                    TENDSTR)));
                YBUG();
                return NULL;
@@ -4553,11 +4553,11 @@ yaffs_Object *yaffs_FindObjectByName(yaffs_Object *directory,
        if (directory->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) {
                T(YAFFS_TRACE_ALWAYS,
                  (TSTR
-                  ("tragedy: yaffs_FindObjectByName: non-directory" TENDSTR)));
+                  ("tragedy: yaffs_find_by_name: non-directory" TENDSTR)));
                YBUG();
        }
 
-       sum = yaffs_CalcNameSum(name);
+       sum = yaffs_calc_name_sum(name);
 
        ylist_for_each(i, &directory->variant.directoryVariant.children) {
                if (i) {
@@ -4566,17 +4566,17 @@ yaffs_Object *yaffs_FindObjectByName(yaffs_Object *directory,
                        if (l->parent != directory)
                                YBUG();
 
-                       yaffs_CheckObjectDetailsLoaded(l);
+                       yaffs_check_obj_details_loaded(l);
 
                        /* Special case for lost-n-found */
                        if (l->objectId == YAFFS_OBJECTID_LOSTNFOUND) {
                                if (yaffs_strcmp(name, YAFFS_LOSTNFOUND_NAME) == 0)
                                        return l;
-                       } else if (yaffs_SumCompare(l->sum, sum) || l->hdrChunk <= 0) {
+                       } else if (yaffs_sum_cmp(l->sum, sum) || l->hdrChunk <= 0) {
                                /* LostnFound chunk called Objxxx
                                 * Do a real check
                                 */
-                               yaffs_GetObjectName(l, buffer,
+                               yaffs_get_obj_name(l, buffer,
                                                    YAFFS_MAX_NAME_LENGTH + 1);
                                if (yaffs_strncmp(name, buffer, YAFFS_MAX_NAME_LENGTH) == 0)
                                        return l;
@@ -4598,7 +4598,7 @@ int yaffs_ApplyToDirectoryChildren(yaffs_Object *theDir,
        if (!theDir) {
                T(YAFFS_TRACE_ALWAYS,
                  (TSTR
-                  ("tragedy: yaffs_FindObjectByName: null pointer directory"
+                  ("tragedy: yaffs_find_by_name: null pointer directory"
                    TENDSTR)));
                YBUG();
                return YAFFS_FAIL;
@@ -4606,7 +4606,7 @@ int yaffs_ApplyToDirectoryChildren(yaffs_Object *theDir,
        if (theDir->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) {
                T(YAFFS_TRACE_ALWAYS,
                  (TSTR
-                  ("tragedy: yaffs_FindObjectByName: non-directory" TENDSTR)));
+                  ("tragedy: yaffs_find_by_name: non-directory" TENDSTR)));
                YBUG();
                return YAFFS_FAIL;
        }
@@ -4628,12 +4628,12 @@ int yaffs_ApplyToDirectoryChildren(yaffs_Object *theDir,
  * actual object.
  */
 
-yaffs_Object *yaffs_GetEquivalentObject(yaffs_Object *obj)
+yaffs_Object *yaffs_get_equivalent_obj(yaffs_Object *obj)
 {
        if (obj && obj->variantType == YAFFS_OBJECT_TYPE_HARDLINK) {
                /* We want the object id of the equivalent object, not this one */
                obj = obj->variant.hardLinkVariant.equivalentObject;
-               yaffs_CheckObjectDetailsLoaded(obj);
+               yaffs_check_obj_details_loaded(obj);
        }
        return obj;
 }
@@ -4657,7 +4657,7 @@ yaffs_Object *yaffs_GetEquivalentObject(yaffs_Object *obj)
  *    starting at oh->name[1].
 
  */
-static void yaffs_FixNullName(yaffs_Object * obj,YCHAR * name, int buffSize)
+static void yaffs_fix_null_name(yaffs_Object * obj,YCHAR * name, int buffSize)
 {
        /* Create an object name if we could not find one. */
        if(yaffs_strnlen(name,YAFFS_MAX_NAME_LENGTH) == 0){
@@ -4678,7 +4678,7 @@ static void yaffs_FixNullName(yaffs_Object * obj,YCHAR * name, int buffSize)
        }
 }
 
-static void yaffs_LoadNameFromObjectHeader(yaffs_Device *dev,YCHAR *name, const YCHAR *ohName, int bufferSize)
+static void yaffs_load_name_from_oh(yaffs_Device *dev,YCHAR *name, const YCHAR *ohName, int bufferSize)
 {
 #ifdef CONFIG_YAFFS_AUTO_UNICODE
        if(dev->param.autoUnicode){
@@ -4700,7 +4700,7 @@ static void yaffs_LoadNameFromObjectHeader(yaffs_Device *dev,YCHAR *name, const
 }
 
 
-static void yaffs_LoadObjectHeaderFromName(yaffs_Device *dev, YCHAR *ohName, const YCHAR *name)
+static void yaffs_load_oh_from_name(yaffs_Device *dev, YCHAR *ohName, const YCHAR *name)
 {
 #ifdef CONFIG_YAFFS_AUTO_UNICODE
 
@@ -4741,11 +4741,11 @@ static void yaffs_LoadObjectHeaderFromName(yaffs_Device *dev, YCHAR *ohName, con
 
 }
 
-int yaffs_GetObjectName(yaffs_Object * obj, YCHAR * name, int buffSize)
+int yaffs_get_obj_name(yaffs_Object * obj, YCHAR * name, int buffSize)
 {
        memset(name, 0, buffSize * sizeof(YCHAR));
        
-       yaffs_CheckObjectDetailsLoaded(obj);
+       yaffs_check_obj_details_loaded(obj);
 
        if (obj->objectId == YAFFS_OBJECTID_LOSTNFOUND) {
                yaffs_strncpy(name, YAFFS_LOSTNFOUND_NAME, buffSize - 1);
@@ -4757,32 +4757,32 @@ int yaffs_GetObjectName(yaffs_Object * obj, YCHAR * name, int buffSize)
 #endif
        else if(obj->hdrChunk > 0) {
                int result;
-               __u8 *buffer = yaffs_GetTempBuffer(obj->myDev, __LINE__);
+               __u8 *buffer = yaffs_get_temp_buffer(obj->myDev, __LINE__);
 
                yaffs_ObjectHeader *oh = (yaffs_ObjectHeader *) buffer;
 
                memset(buffer, 0, obj->myDev->nDataBytesPerChunk);
 
                if (obj->hdrChunk > 0) {
-                       result = yaffs_ReadChunkWithTagsFromNAND(obj->myDev,
+                       result = yaffs_rd_chunk_tags_nand(obj->myDev,
                                                        obj->hdrChunk, buffer,
                                                        NULL);
                }
-               yaffs_LoadNameFromObjectHeader(obj->myDev,name,oh->name,buffSize);
+               yaffs_load_name_from_oh(obj->myDev,name,oh->name,buffSize);
 
-               yaffs_ReleaseTempBuffer(obj->myDev, buffer, __LINE__);
+               yaffs_release_temp_buffer(obj->myDev, buffer, __LINE__);
        }
 
-       yaffs_FixNullName(obj,name,buffSize);
+       yaffs_fix_null_name(obj,name,buffSize);
 
        return yaffs_strnlen(name,YAFFS_MAX_NAME_LENGTH);
 }
 
 
-int yaffs_GetObjectFileLength(yaffs_Object *obj)
+int yaffs_get_obj_length(yaffs_Object *obj)
 {
        /* Dereference any hard linking */
-       obj = yaffs_GetEquivalentObject(obj);
+       obj = yaffs_get_equivalent_obj(obj);
 
        if (obj->variantType == YAFFS_OBJECT_TYPE_FILE)
                return obj->variant.fileVariant.fileSize;
@@ -4796,7 +4796,7 @@ int yaffs_GetObjectFileLength(yaffs_Object *obj)
        }
 }
 
-int yaffs_GetObjectLinkCount(yaffs_Object *obj)
+int yaffs_get_obj_link_count(yaffs_Object *obj)
 {
        int count = 0;
        struct ylist_head *i;
@@ -4810,16 +4810,16 @@ int yaffs_GetObjectLinkCount(yaffs_Object *obj)
        return count;
 }
 
-int yaffs_GetObjectInode(yaffs_Object *obj)
+int yaffs_get_obj_inode(yaffs_Object *obj)
 {
-       obj = yaffs_GetEquivalentObject(obj);
+       obj = yaffs_get_equivalent_obj(obj);
 
        return obj->objectId;
 }
 
-unsigned yaffs_GetObjectType(yaffs_Object *obj)
+unsigned yaffs_get_obj_type(yaffs_Object *obj)
 {
-       obj = yaffs_GetEquivalentObject(obj);
+       obj = yaffs_get_equivalent_obj(obj);
 
        switch (obj->variantType) {
        case YAFFS_OBJECT_TYPE_FILE:
@@ -4849,18 +4849,18 @@ unsigned yaffs_GetObjectType(yaffs_Object *obj)
        }
 }
 
-YCHAR *yaffs_GetSymlinkAlias(yaffs_Object *obj)
+YCHAR *yaffs_get_symlink_alias(yaffs_Object *obj)
 {
-       obj = yaffs_GetEquivalentObject(obj);
+       obj = yaffs_get_equivalent_obj(obj);
        if (obj->variantType == YAFFS_OBJECT_TYPE_SYMLINK)
-               return yaffs_CloneString(obj->variant.symLinkVariant.alias);
+               return yaffs_clone_str(obj->variant.symLinkVariant.alias);
        else
-               return yaffs_CloneString(_Y(""));
+               return yaffs_clone_str(_Y(""));
 }
 
 #ifndef CONFIG_YAFFS_WINCE
 
-int yaffs_SetAttributes(yaffs_Object *obj, struct iattr *attr)
+int yaffs_set_attribs(yaffs_Object *obj, struct iattr *attr)
 {
        unsigned int valid = attr->ia_valid;
 
@@ -4879,14 +4879,14 @@ int yaffs_SetAttributes(yaffs_Object *obj, struct iattr *attr)
                obj->yst_mtime = Y_TIME_CONVERT(attr->ia_mtime);
 
        if (valid & ATTR_SIZE)
-               yaffs_ResizeFile(obj, attr->ia_size);
+               yaffs_resize_file(obj, attr->ia_size);
 
-       yaffs_UpdateObjectHeader(obj, NULL, 1, 0, 0, NULL);
+       yaffs_update_oh(obj, NULL, 1, 0, 0, NULL);
 
        return YAFFS_OK;
 
 }
-int yaffs_GetAttributes(yaffs_Object *obj, struct iattr *attr)
+int yaffs_get_attribs(yaffs_Object *obj, struct iattr *attr)
 {
        unsigned int valid = 0;
 
@@ -4904,7 +4904,7 @@ int yaffs_GetAttributes(yaffs_Object *obj, struct iattr *attr)
        Y_TIME_CONVERT(attr->ia_mtime) = obj->yst_mtime;
        valid |= ATTR_MTIME;
 
-       attr->ia_size = yaffs_GetFileSize(obj);
+       attr->ia_size = yaffs_get_file_size(obj);
        valid |= ATTR_SIZE;
 
        attr->ia_valid = valid;
@@ -4915,9 +4915,9 @@ int yaffs_GetAttributes(yaffs_Object *obj, struct iattr *attr)
 #endif
 
 
-static int yaffs_DoXMod(yaffs_Object *obj, int set, const YCHAR *name, const void *value, int size, int flags)
+static int yaffs_do_xattrib_mod(yaffs_Object *obj, int set, const YCHAR *name, const void *value, int size, int flags)
 {
-       yaffs_XAttrMod xmod;
+       yaffs_xattr_mod xmod;
 
        int result;
 
@@ -4928,7 +4928,7 @@ static int yaffs_DoXMod(yaffs_Object *obj, int set, const YCHAR *name, const voi
        xmod.flags = flags;
        xmod.result = -ENOSPC;
 
-       result = yaffs_UpdateObjectHeader(obj, NULL, 0, 0, 0, &xmod);
+       result = yaffs_update_oh(obj, NULL, 0, 0, 0, &xmod);
 
        if(result > 0)
                return xmod.result;
@@ -4936,7 +4936,7 @@ static int yaffs_DoXMod(yaffs_Object *obj, int set, const YCHAR *name, const voi
                return -ENOSPC;
 }
 
-static int yaffs_ApplyXMod(yaffs_Object *obj, char *buffer, yaffs_XAttrMod *xmod)
+static int yaffs_apply_xattrib_mod(yaffs_Object *obj, char *buffer, yaffs_xattr_mod *xmod)
 {
        int retval = 0;
        int x_offs = sizeof(yaffs_ObjectHeader);
@@ -4958,7 +4958,7 @@ static int yaffs_ApplyXMod(yaffs_Object *obj, char *buffer, yaffs_XAttrMod *xmod
        return retval;
 }
 
-static int yaffs_DoXFetch(yaffs_Object *obj, const YCHAR *name, void *value, int size)
+static int yaffs_do_xattrib_fetch(yaffs_Object *obj, const YCHAR *name, void *value, int size)
 {
        char *buffer = NULL;
        int result;
@@ -4984,11 +4984,11 @@ static int yaffs_DoXFetch(yaffs_Object *obj, const YCHAR *name, void *value, int
                        return 0;
        }
 
-       buffer = (char *) yaffs_GetTempBuffer(dev, __LINE__);
+       buffer = (char *) yaffs_get_temp_buffer(dev, __LINE__);
        if(!buffer)
                return -ENOMEM;
 
-       result = yaffs_ReadChunkWithTagsFromNAND(dev,obj->hdrChunk, (__u8 *)buffer, &tags);
+       result = yaffs_rd_chunk_tags_nand(dev,obj->hdrChunk, (__u8 *)buffer, &tags);
 
        if(result != YAFFS_OK)
                retval = -ENOENT;
@@ -5005,46 +5005,46 @@ static int yaffs_DoXFetch(yaffs_Object *obj, const YCHAR *name, void *value, int
                else
                        retval = nval_list(x_buffer, x_size, value,size);
        }
-       yaffs_ReleaseTempBuffer(dev,(__u8 *)buffer,__LINE__);
+       yaffs_release_temp_buffer(dev,(__u8 *)buffer,__LINE__);
        return retval;
 }
 
-int yaffs_SetXAttribute(yaffs_Object *obj, const YCHAR *name, const void * value, int size, int flags)
+int yaffs_set_xattrib(yaffs_Object *obj, const YCHAR *name, const void * value, int size, int flags)
 {
-       return yaffs_DoXMod(obj, 1, name, value, size, flags);
+       return yaffs_do_xattrib_mod(obj, 1, name, value, size, flags);
 }
 
-int yaffs_RemoveXAttribute(yaffs_Object *obj, const YCHAR *name)
+int yaffs_remove_xattrib(yaffs_Object *obj, const YCHAR *name)
 {
-       return yaffs_DoXMod(obj, 0, name, NULL, 0, 0);
+       return yaffs_do_xattrib_mod(obj, 0, name, NULL, 0, 0);
 }
 
-int yaffs_GetXAttribute(yaffs_Object *obj, const YCHAR *name, void *value, int size)
+int yaffs_get_xattrib(yaffs_Object *obj, const YCHAR *name, void *value, int size)
 {
-       return yaffs_DoXFetch(obj, name, value, size);
+       return yaffs_do_xattrib_fetch(obj, name, value, size);
 }
 
-int yaffs_ListXAttributes(yaffs_Object *obj, char *buffer, int size)
+int yaffs_list_xattrib(yaffs_Object *obj, char *buffer, int size)
 {
-       return yaffs_DoXFetch(obj, NULL, buffer,size);
+       return yaffs_do_xattrib_fetch(obj, NULL, buffer,size);
 }
 
 
 
 #if 0
-int yaffs_DumpObject(yaffs_Object *obj)
+int yaffs_dump_obj(yaffs_Object *obj)
 {
        YCHAR name[257];
 
-       yaffs_GetObjectName(obj, name, YAFFS_MAX_NAME_LENGTH + 1);
+       yaffs_get_obj_name(obj, name, YAFFS_MAX_NAME_LENGTH + 1);
 
        T(YAFFS_TRACE_ALWAYS,
          (TSTR
           ("Object %d, inode %d \"%s\"\n dirty %d valid %d serial %d sum %d"
            " chunk %d type %d size %d\n"
-           TENDSTR), obj->objectId, yaffs_GetObjectInode(obj), name,
+           TENDSTR), obj->objectId, yaffs_get_obj_inode(obj), name,
           obj->dirty, obj->valid, obj->serial, obj->sum, obj->hdrChunk,
-          yaffs_GetObjectType(obj), yaffs_GetObjectFileLength(obj)));
+          yaffs_get_obj_type(obj), yaffs_get_obj_length(obj)));
 
        return YAFFS_OK;
 }
@@ -5052,7 +5052,7 @@ int yaffs_DumpObject(yaffs_Object *obj)
 
 /*---------------------------- Initialisation code -------------------------------------- */
 
-static int yaffs_CheckDevFunctions(const yaffs_Device *dev)
+static int yaffs_cehck_dev_fns(const yaffs_Device *dev)
 {
 
        /* Common functions, gotta have */
@@ -5085,7 +5085,7 @@ static int yaffs_CheckDevFunctions(const yaffs_Device *dev)
 }
 
 
-static int yaffs_CreateInitialDirectories(yaffs_Device *dev)
+static int yaffs_create_initial_dir(yaffs_Device *dev)
 {
        /* Initialise the unlinked, deleted, root and lost and found directories */
 
@@ -5093,33 +5093,33 @@ static int yaffs_CreateInitialDirectories(yaffs_Device *dev)
        dev->unlinkedDir = dev->deletedDir = NULL;
 
        dev->unlinkedDir =
-           yaffs_CreateFakeDirectory(dev, YAFFS_OBJECTID_UNLINKED, S_IFDIR);
+           yaffs_create_fake_dir(dev, YAFFS_OBJECTID_UNLINKED, S_IFDIR);
 
        dev->deletedDir =
-           yaffs_CreateFakeDirectory(dev, YAFFS_OBJECTID_DELETED, S_IFDIR);
+           yaffs_create_fake_dir(dev, YAFFS_OBJECTID_DELETED, S_IFDIR);
 
        dev->rootDir =
-           yaffs_CreateFakeDirectory(dev, YAFFS_OBJECTID_ROOT,
+           yaffs_create_fake_dir(dev, YAFFS_OBJECTID_ROOT,
                                      YAFFS_ROOT_MODE | S_IFDIR);
        dev->lostNFoundDir =
-           yaffs_CreateFakeDirectory(dev, YAFFS_OBJECTID_LOSTNFOUND,
+           yaffs_create_fake_dir(dev, YAFFS_OBJECTID_LOSTNFOUND,
                                      YAFFS_LOSTNFOUND_MODE | S_IFDIR);
 
        if (dev->lostNFoundDir && dev->rootDir && dev->unlinkedDir && dev->deletedDir) {
-               yaffs_AddObjectToDirectory(dev->rootDir, dev->lostNFoundDir);
+               yaffs_add_obj_to_dir(dev->rootDir, dev->lostNFoundDir);
                return YAFFS_OK;
        }
 
        return YAFFS_FAIL;
 }
 
-int yaffs_GutsInitialise(yaffs_Device *dev)
+int yaffs_guts_initialise(yaffs_Device *dev)
 {
        int init_failed = 0;
        unsigned x;
        int bits;
 
-       T(YAFFS_TRACE_TRACING, (TSTR("yaffs: yaffs_GutsInitialise()" TENDSTR)));
+       T(YAFFS_TRACE_TRACING, (TSTR("yaffs: yaffs_guts_initialise()" TENDSTR)));
 
        /* Check stuff that must be set */
 
@@ -5160,7 +5160,7 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
                return YAFFS_FAIL;
        }
 
-       if (yaffs_InitialiseNAND(dev) != YAFFS_OK) {
+       if (yaffs_init_nand(dev) != YAFFS_OK) {
                T(YAFFS_TRACE_ALWAYS,
                  (TSTR("yaffs: InitialiseNAND failed" TENDSTR)));
                return YAFFS_FAIL;
@@ -5173,7 +5173,7 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
                dev->nDataBytesPerChunk = dev->param.totalBytesPerChunk;
 
        /* Got the right mix of functions? */
-       if (!yaffs_CheckDevFunctions(dev)) {
+       if (!yaffs_cehck_dev_fns(dev)) {
                /* Function missing */
                T(YAFFS_TRACE_ALWAYS,
                  (TSTR
@@ -5183,9 +5183,9 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
        }
 
        /* This is really a compilation check. */
-       if (!yaffs_CheckStructures()) {
+       if (!yaffs_check_structures()) {
                T(YAFFS_TRACE_ALWAYS,
-                 (TSTR("yaffs_CheckStructures failed\n" TENDSTR)));
+                 (TSTR("yaffs_check_structures failed\n" TENDSTR)));
                return YAFFS_FAIL;
        }
 
@@ -5289,7 +5289,7 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
        dev->oldestDirtyBlock = 0;
 
        /* Initialise temporary buffers and caches. */
-       if (!yaffs_InitialiseTempBuffers(dev))
+       if (!yaffs_init_tmp_buffers(dev))
                init_failed = 1;
 
        dev->srCache = NULL;
@@ -5335,20 +5335,20 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
        if (dev->param.isYaffs2)
                dev->param.useHeaderFileSize = 1;
 
-       if (!init_failed && !yaffs_InitialiseBlocks(dev))
+       if (!init_failed && !yaffs_init_blocks(dev))
                init_failed = 1;
 
-       yaffs_InitialiseTnodesAndObjects(dev);
+       yaffs_init_tnodes_and_objs(dev);
 
-       if (!init_failed && !yaffs_CreateInitialDirectories(dev))
+       if (!init_failed && !yaffs_create_initial_dir(dev))
                init_failed = 1;
 
 
        if (!init_failed) {
                /* Now scan the flash. */
                if (dev->param.isYaffs2) {
-                       if (yaffs2_CheckpointRestore(dev)) {
-                               yaffs_CheckObjectDetailsLoaded(dev->rootDir);
+                       if (yaffs2_checkpt_restore(dev)) {
+                               yaffs_check_obj_details_loaded(dev->rootDir);
                                T(YAFFS_TRACE_ALWAYS,
                                  (TSTR("yaffs: restored from checkpoint" TENDSTR)));
                        } else {
@@ -5356,9 +5356,9 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
                                /* Clean up the mess caused by an aborted checkpoint load
                                 * and scan backwards.
                                 */
-                               yaffs_DeinitialiseBlocks(dev);
+                               yaffs_deinit_blocks(dev);
 
-                               yaffs_DeinitialiseTnodesAndObjects(dev);
+                               yaffs_deinit_tnodes_and_objs(dev);
 
                                dev->nErasedBlocks = 0;
                                dev->nFreeChunks = 0;
@@ -5368,32 +5368,32 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
                                dev->nUnlinkedFiles = 0;
                                dev->nBackgroundDeletions = 0;
 
-                               if (!init_failed && !yaffs_InitialiseBlocks(dev))
+                               if (!init_failed && !yaffs_init_blocks(dev))
                                        init_failed = 1;
 
-                               yaffs_InitialiseTnodesAndObjects(dev);
+                               yaffs_init_tnodes_and_objs(dev);
 
-                               if (!init_failed && !yaffs_CreateInitialDirectories(dev))
+                               if (!init_failed && !yaffs_create_initial_dir(dev))
                                        init_failed = 1;
 
-                               if (!init_failed && !yaffs2_ScanBackwards(dev))
+                               if (!init_failed && !yaffs2_scan_backwards(dev))
                                        init_failed = 1;
                        }
-               } else if (!yaffs1_Scan(dev))
+               } else if (!yaffs1_scan(dev))
                                init_failed = 1;
 
-               yaffs_StripDeletedObjects(dev);
-               yaffs_FixHangingObjects(dev);
+               yaffs_strip_deleted_objs(dev);
+               yaffs_fix_hanging_objs(dev);
                if(dev->param.emptyLostAndFound)
-                       yaffs_EmptyLostAndFound(dev);
+                       yaffs_empty_l_n_f(dev);
        }
 
        if (init_failed) {
                /* Clean up the mess */
                T(YAFFS_TRACE_TRACING,
-                 (TSTR("yaffs: yaffs_GutsInitialise() aborted.\n" TENDSTR)));
+                 (TSTR("yaffs: yaffs_guts_initialise() aborted.\n" TENDSTR)));
 
-               yaffs_Deinitialise(dev);
+               yaffs_deinitialise(dev);
                return YAFFS_FAIL;
        }
 
@@ -5406,26 +5406,26 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
 
        dev->nRetiredBlocks = 0;
 
-       yaffs_VerifyFreeChunks(dev);
-       yaffs_VerifyBlocks(dev);
+       yaffs_verify_free_chunks(dev);
+       yaffs_verify_blocks(dev);
 
        /* Clean up any aborted checkpoint data */
        if(!dev->isCheckpointed && dev->blocksInCheckpoint > 0)
-               yaffs2_InvalidateCheckpoint(dev);
+               yaffs2_checkpt_invalidate(dev);
 
        T(YAFFS_TRACE_TRACING,
-         (TSTR("yaffs: yaffs_GutsInitialise() done.\n" TENDSTR)));
+         (TSTR("yaffs: yaffs_guts_initialise() done.\n" TENDSTR)));
        return YAFFS_OK;
 
 }
 
-void yaffs_Deinitialise(yaffs_Device *dev)
+void yaffs_deinitialise(yaffs_Device *dev)
 {
        if (dev->isMounted) {
                int i;
 
-               yaffs_DeinitialiseBlocks(dev);
-               yaffs_DeinitialiseTnodesAndObjects(dev);
+               yaffs_deinit_blocks(dev);
+               yaffs_deinit_tnodes_and_objs(dev);
                if (dev->param.nShortOpCaches > 0 &&
                    dev->srCache) {
 
@@ -5451,7 +5451,7 @@ void yaffs_Deinitialise(yaffs_Device *dev)
        }
 }
 
-int yaffs_CountFreeChunks(yaffs_Device *dev)
+int yaffs_count_free_chunks(yaffs_Device *dev)
 {
        int nFree=0;
        int b;
@@ -5478,7 +5478,7 @@ int yaffs_CountFreeChunks(yaffs_Device *dev)
        return nFree;
 }
 
-int yaffs_GetNumberOfFreeChunks(yaffs_Device *dev)
+int yaffs_get_n_free_chunks(yaffs_Device *dev)
 {
        /* This is what we report to the outside world */
 
@@ -5490,7 +5490,7 @@ int yaffs_GetNumberOfFreeChunks(yaffs_Device *dev)
 #if 1
        nFree = dev->nFreeChunks;
 #else
-       nFree = yaffs_CountFreeChunks(dev);
+       nFree = yaffs_count_free_chunks(dev);
 #endif
 
        nFree += dev->nDeletedFiles;
@@ -5507,7 +5507,7 @@ int yaffs_GetNumberOfFreeChunks(yaffs_Device *dev)
        nFree -= ((dev->param.nReservedBlocks + 1) * dev->param.nChunksPerBlock);
 
        /* Now we figure out how much to reserve for the checkpoint and report that... */
-       blocksForCheckpoint = yaffs2_CalcCheckpointBlocksRequired(dev);
+       blocksForCheckpoint = yaffs_calc_checkpt_blocks_required(dev);
 
        nFree -= (blocksForCheckpoint * dev->param.nChunksPerBlock);
 
@@ -5521,7 +5521,7 @@ int yaffs_GetNumberOfFreeChunks(yaffs_Device *dev)
 
 /*---------------------------------------- YAFFS test code ----------------------*/
 
-#define yaffs_CheckStruct(structure, syze, name) \
+#define yaffs_check_struct(structure, syze, name) \
        do { \
                if (sizeof(structure) != syze) { \
                        T(YAFFS_TRACE_ALWAYS, (TSTR("%s should be %d but is %d\n" TENDSTR),\
@@ -5530,15 +5530,15 @@ int yaffs_GetNumberOfFreeChunks(yaffs_Device *dev)
                } \
        } while (0)
 
-static int yaffs_CheckStructures(void)
+static int yaffs_check_structures(void)
 {
-/*      yaffs_CheckStruct(yaffs_Tags,8,"yaffs_Tags"); */
-/*      yaffs_CheckStruct(yaffs_TagsUnion,8,"yaffs_TagsUnion"); */
-/*      yaffs_CheckStruct(yaffs_Spare,16,"yaffs_Spare"); */
-/*     yaffs_CheckStruct(yaffs_Tnode, 2 * YAFFS_NTNODES_LEVEL0, "yaffs_Tnode"); */
+/*      yaffs_check_struct(yaffs_Tags,8,"yaffs_Tags"); */
+/*      yaffs_check_struct(yaffs_TagsUnion,8,"yaffs_TagsUnion"); */
+/*      yaffs_check_struct(yaffs_Spare,16,"yaffs_Spare"); */
+/*     yaffs_check_struct(yaffs_Tnode, 2 * YAFFS_NTNODES_LEVEL0, "yaffs_Tnode"); */
 
 #ifndef CONFIG_YAFFS_WINCE
-       yaffs_CheckStruct(yaffs_ObjectHeader, 512, "yaffs_ObjectHeader");
+       yaffs_check_struct(yaffs_ObjectHeader, 512, "yaffs_ObjectHeader");
 #endif
        return YAFFS_OK;
 }
index 4dc70a2..3a00d5b 100644 (file)
@@ -827,79 +827,79 @@ typedef struct {
        int size;
        int flags;
        int result;
-}yaffs_XAttrMod;
+}yaffs_xattr_mod;
 
 
 /*----------------------- YAFFS Functions -----------------------*/
 
-int yaffs_GutsInitialise(yaffs_Device *dev);
-void yaffs_Deinitialise(yaffs_Device *dev);
+int yaffs_guts_initialise(yaffs_Device *dev);
+void yaffs_deinitialise(yaffs_Device *dev);
 
-int yaffs_GetNumberOfFreeChunks(yaffs_Device *dev);
+int yaffs_get_n_free_chunks(yaffs_Device *dev);
 
-int yaffs_RenameObject(yaffs_Object *oldDir, const YCHAR *oldName,
+int yaffs_rename_obj(yaffs_Object *oldDir, const YCHAR *oldName,
                       yaffs_Object *newDir, const YCHAR *newName);
 
 int yaffs_Unlink(yaffs_Object *dir, const YCHAR *name);
-int yaffs_DeleteObject(yaffs_Object *obj);
+int yaffs_del_obj(yaffs_Object *obj);
 
-int yaffs_GetObjectName(yaffs_Object *obj, YCHAR *name, int buffSize);
-int yaffs_GetObjectFileLength(yaffs_Object *obj);
-int yaffs_GetObjectInode(yaffs_Object *obj);
-unsigned yaffs_GetObjectType(yaffs_Object *obj);
-int yaffs_GetObjectLinkCount(yaffs_Object *obj);
+int yaffs_get_obj_name(yaffs_Object *obj, YCHAR *name, int buffSize);
+int yaffs_get_obj_length(yaffs_Object *obj);
+int yaffs_get_obj_inode(yaffs_Object *obj);
+unsigned yaffs_get_obj_type(yaffs_Object *obj);
+int yaffs_get_obj_link_count(yaffs_Object *obj);
 
-int yaffs_SetAttributes(yaffs_Object *obj, struct iattr *attr);
-int yaffs_GetAttributes(yaffs_Object *obj, struct iattr *attr);
+int yaffs_set_attribs(yaffs_Object *obj, struct iattr *attr);
+int yaffs_get_attribs(yaffs_Object *obj, struct iattr *attr);
 
 /* File operations */
-int yaffs_ReadDataFromFile(yaffs_Object *obj, __u8 *buffer, loff_t offset,
+int yaffs_file_rd(yaffs_Object *obj, __u8 *buffer, loff_t offset,
                                int nBytes);
-int yaffs_WriteDataToFile(yaffs_Object *obj, const __u8 *buffer, loff_t offset,
+int yaffs_wr_file(yaffs_Object *obj, const __u8 *buffer, loff_t offset,
                                int nBytes, int writeThrough);
-int yaffs_ResizeFile(yaffs_Object *obj, loff_t newSize);
+int yaffs_resize_file(yaffs_Object *obj, loff_t newSize);
 
-yaffs_Object *yaffs_MknodFile(yaffs_Object *parent, const YCHAR *name,
+yaffs_Object *yaffs_create_file(yaffs_Object *parent, const YCHAR *name,
                                __u32 mode, __u32 uid, __u32 gid);
 
-int yaffs_FlushFile(yaffs_Object *obj, int updateTime, int dataSync);
+int yaffs_flush_file(yaffs_Object *obj, int updateTime, int dataSync);
 
 /* Flushing and checkpointing */
-void yaffs_FlushEntireDeviceCache(yaffs_Device *dev);
+void yaffs_flush_whole_cache(yaffs_Device *dev);
 
-int yaffs_CheckpointSave(yaffs_Device *dev);
-int yaffs_CheckpointRestore(yaffs_Device *dev);
+int yaffs_checkpoint_save(yaffs_Device *dev);
+int yaffs_checkpoint_restore(yaffs_Device *dev);
 
 /* Directory operations */
-yaffs_Object *yaffs_MknodDirectory(yaffs_Object *parent, const YCHAR *name,
+yaffs_Object *yaffs_create_dir(yaffs_Object *parent, const YCHAR *name,
                                __u32 mode, __u32 uid, __u32 gid);
-yaffs_Object *yaffs_FindObjectByName(yaffs_Object *theDir, const YCHAR *name);
+yaffs_Object *yaffs_find_by_name(yaffs_Object *theDir, const YCHAR *name);
 int yaffs_ApplyToDirectoryChildren(yaffs_Object *theDir,
                                   int (*fn) (yaffs_Object *));
 
-yaffs_Object *yaffs_FindObjectByNumber(yaffs_Device *dev, __u32 number);
+yaffs_Object *yaffs_find_by_number(yaffs_Device *dev, __u32 number);
 
 /* Link operations */
 yaffs_Object *yaffs_Link(yaffs_Object *parent, const YCHAR *name,
                         yaffs_Object *equivalentObject);
 
-yaffs_Object *yaffs_GetEquivalentObject(yaffs_Object *obj);
+yaffs_Object *yaffs_get_equivalent_obj(yaffs_Object *obj);
 
 /* Symlink operations */
-yaffs_Object *yaffs_MknodSymLink(yaffs_Object *parent, const YCHAR *name,
+yaffs_Object *yaffs_create_symlink(yaffs_Object *parent, const YCHAR *name,
                                 __u32 mode, __u32 uid, __u32 gid,
                                 const YCHAR *alias);
-YCHAR *yaffs_GetSymlinkAlias(yaffs_Object *obj);
+YCHAR *yaffs_get_symlink_alias(yaffs_Object *obj);
 
 /* Special inodes (fifos, sockets and devices) */
-yaffs_Object *yaffs_MknodSpecial(yaffs_Object *parent, const YCHAR *name,
+yaffs_Object *yaffs_create_special(yaffs_Object *parent, const YCHAR *name,
                                 __u32 mode, __u32 uid, __u32 gid, __u32 rdev);
 
 
-int yaffs_SetXAttribute(yaffs_Object *obj, const YCHAR *name, const void * value, int size, int flags);
-int yaffs_GetXAttribute(yaffs_Object *obj, const YCHAR *name, void *value, int size);
-int yaffs_ListXAttributes(yaffs_Object *obj, char *buffer, int size);
-int yaffs_RemoveXAttribute(yaffs_Object *obj, const YCHAR *name);
+int yaffs_set_xattrib(yaffs_Object *obj, const YCHAR *name, const void * value, int size, int flags);
+int yaffs_get_xattrib(yaffs_Object *obj, const YCHAR *name, void *value, int size);
+int yaffs_list_xattrib(yaffs_Object *obj, char *buffer, int size);
+int yaffs_remove_xattrib(yaffs_Object *obj, const YCHAR *name);
 
 /* Special directories */
 yaffs_Object *yaffs_Root(yaffs_Device *dev);
@@ -910,60 +910,60 @@ yaffs_Object *yaffs_LostNFound(yaffs_Device *dev);
 void yfsd_WinFileTimeNow(__u32 target[2]);
 #endif
 
-void yaffs_HandleDeferedFree(yaffs_Object *obj);
+void yaffs_handle_defered_free(yaffs_Object *obj);
 
-void yaffs_UpdateDirtyDirectories(yaffs_Device *dev);
+void yaffs_update_dirty_dirs(yaffs_Device *dev);
 
-int yaffs_BackgroundGarbageCollect(yaffs_Device *dev, unsigned urgency);
+int yaffs_bg_gc(yaffs_Device *dev, unsigned urgency);
 
 /* Debug dump  */
-int yaffs_DumpObject(yaffs_Object *obj);
+int yaffs_dump_obj(yaffs_Object *obj);
 
-void yaffs_GutsTest(yaffs_Device *dev);
+void yaffs_guts_test(yaffs_Device *dev);
 
 /* A few useful functions to be used within the core files*/
-void yaffs_DeleteChunk(yaffs_Device *dev, int chunkId, int markNAND, int lyn);
-int yaffs_CheckFF(__u8 *buffer, int nBytes);
-void yaffs_HandleChunkError(yaffs_Device *dev, yaffs_BlockInfo *bi);
+void yaffs_chunk_del(yaffs_Device *dev, int chunkId, int markNAND, int lyn);
+int yaffs_check_ff(__u8 *buffer, int nBytes);
+void yaffs_handle_chunk_error(yaffs_Device *dev, yaffs_BlockInfo *bi);
 
-__u8 *yaffs_GetTempBuffer(yaffs_Device *dev, int lineNo);
-void yaffs_ReleaseTempBuffer(yaffs_Device *dev, __u8 *buffer, int lineNo);
+__u8 *yaffs_get_temp_buffer(yaffs_Device *dev, int lineNo);
+void yaffs_release_temp_buffer(yaffs_Device *dev, __u8 *buffer, int lineNo);
 
-yaffs_Object *yaffs_FindOrCreateObjectByNumber(yaffs_Device *dev,
+yaffs_Object *yaffs_find_or_create_by_number(yaffs_Device *dev,
                                                int number,
                                                yaffs_ObjectType type);
-int yaffs_PutChunkIntoFile(yaffs_Object *in, int chunkInInode,
+int yaffs_put_chunk_in_file(yaffs_Object *in, int chunkInInode,
                                int chunkInNAND, int inScan);
-void yaffs_SetObjectName(yaffs_Object *obj, const YCHAR *name);
-void yaffs_SetObjectNameFromOH(yaffs_Object *obj, const yaffs_ObjectHeader *oh);
-void yaffs_AddObjectToDirectory(yaffs_Object *directory,
+void yaffs_set_obj_name(yaffs_Object *obj, const YCHAR *name);
+void yaffs_set_obj_name_from_oh(yaffs_Object *obj, const yaffs_ObjectHeader *oh);
+void yaffs_add_obj_to_dir(yaffs_Object *directory,
                                        yaffs_Object *obj);
-YCHAR *yaffs_CloneString(const YCHAR *str);
-void yaffs_HardlinkFixup(yaffs_Device *dev, yaffs_Object *hardList);
-void yaffs_BlockBecameDirty(yaffs_Device *dev, int blockNo);
-int yaffs_UpdateObjectHeader(yaffs_Object *in, const YCHAR *name,
+YCHAR *yaffs_clone_str(const YCHAR *str);
+void yaffs_link_fixup(yaffs_Device *dev, yaffs_Object *hardList);
+void yaffs_block_became_dirty(yaffs_Device *dev, int blockNo);
+int yaffs_update_oh(yaffs_Object *in, const YCHAR *name,
                                int force, int isShrink, int shadows,
-                                yaffs_XAttrMod *xop);
-void yaffs_HandleShadowedObject(yaffs_Device *dev, int objId,
+                                yaffs_xattr_mod *xop);
+void yaffs_handle_shadowed_obj(yaffs_Device *dev, int objId,
                                int backwardScanning);
-int yaffs_CheckSpaceForAllocation(yaffs_Device *dev, int nChunks);
-yaffs_Tnode *yaffs_GetTnode(yaffs_Device *dev);
-yaffs_Tnode *yaffs_AddOrFindLevel0Tnode(yaffs_Device *dev,
+int yaffs_check_alloc_available(yaffs_Device *dev, int nChunks);
+yaffs_Tnode *yaffs_get_tnode(yaffs_Device *dev);
+yaffs_Tnode *yaffs_add_find_tnode_0(yaffs_Device *dev,
                                        yaffs_FileStructure *fStruct,
                                        __u32 chunkId,
                                        yaffs_Tnode *passedTn);
 
-int yaffs_DoWriteDataToFile(yaffs_Object *in, const __u8 *buffer, loff_t offset,
+int yaffs_do_file_wr(yaffs_Object *in, const __u8 *buffer, loff_t offset,
                        int nBytes, int writeThrough);
-void yaffs_ResizeDown( yaffs_Object *obj, loff_t newSize);
-void yaffs_SkipRestOfBlock(yaffs_Device *dev);
+void yaffs_resize_file_down( yaffs_Object *obj, loff_t newSize);
+void yaffs_skip_rest_of_block(yaffs_Device *dev);
 
-int yaffs_CountFreeChunks(yaffs_Device *dev);
+int yaffs_count_free_chunks(yaffs_Device *dev);
 
-yaffs_Tnode *yaffs_FindLevel0Tnode(yaffs_Device *dev,
+yaffs_Tnode *yaffs_find_tnode_0(yaffs_Device *dev,
                                yaffs_FileStructure *fStruct,
                                __u32 chunkId);
 
-__u32 yaffs_GetChunkGroupBase(yaffs_Device *dev, yaffs_Tnode *tn, unsigned pos);
+__u32 yaffs_get_group_base(yaffs_Device *dev, yaffs_Tnode *tn, unsigned pos);
 
 #endif
index ce059fd..5e08c07 100644 (file)
@@ -36,8 +36,8 @@ struct yaffs_LinuxContext {
        unsigned mount_id;
 };
 
-#define yaffs_DeviceToLC(dev) ((struct yaffs_LinuxContext *)((dev)->osContext))
-#define yaffs_DeviceToMtd(dev) ((struct mtd_info *)((dev)->driverContext))
+#define yaffs_dev_to_lc(dev) ((struct yaffs_LinuxContext *)((dev)->osContext))
+#define yaffs_dev_to_mtd(dev) ((struct mtd_info *)((dev)->driverContext))
 
 #endif
 
index d4205fa..3fdcc18 100644 (file)
@@ -40,7 +40,7 @@ typedef struct yaffs_AllocatorStruct yaffs_Allocator;
 
 int mount_id;
 
-void yaffs_DeinitialiseRawTnodesAndObjects(yaffs_Device *dev)
+void yaffs_deinit_raw_tnodes_and_objs(yaffs_Device *dev)
 {
        yaffs_Allocator *allocator = (yaffs_Allocator *)dev->allocator;
 
@@ -100,10 +100,10 @@ static void (*fake_ctor_list[10]) (void *) = {
        fake_ctor9,
 };