Ticket #440: fastfat_4.6.0pre1.patch

File fastfat_4.6.0pre1.patch, 2.8 KB (added by thomas.doerfler, on 12/03/06 at 13:31:12)

fastfat_4.6.0pre1.patch

  • cpukit/libfs/src/dosfs/fat_fat_operations.c

    old new  
    1919
    2020#include <rtems/libio_.h>
    2121
    22 #include "fat.h"
    23 #include "fat_fat_operations.h"
     22/*#include "fat.h"*/
     23#include "../include/fat.h"
     24/*#include "fat_fat_operations.h"*/
     25#include "../include/fat_fat_operations.h"
    2426
    2527/* fat_scan_fat_for_free_clusters --
    2628 *     Allocate chain of free clusters from Files Allocation Table
     
    5961    if (count == 0)
    6062        return rc;
    6163       
    62     if ((fs_info->vol.type & FAT_FAT32) &&
    63         (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)) 
     64    /*if ((fs_info->vol.type & FAT_FAT32) &&
     65        (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE))*/
     66    if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
    6467        cl4find = fs_info->vol.next_cl; 
    6568
    6669    /*
     
    128131            /* have we satisfied request ? */
    129132            if (*cls_added == count)
    130133            {
    131                 if (fs_info->vol.type & FAT_FAT32)
    132                 {
     134                /*if (fs_info->vol.type & FAT_FAT32)
     135                {*/
    133136                    fs_info->vol.next_cl = save_cln;
    134137                    if (fs_info->vol.free_cls != 0xFFFFFFFF)
    135138                        fs_info->vol.free_cls -= (*cls_added);
    136                 }       
     139                /*}*/
    137140                *last_cl = save_cln;   
    138141                fat_buf_release(fs_info);
    139142                return rc; 
     
    145148            cl4find = 2;
    146149    }
    147150
    148     if (fs_info->vol.type & FAT_FAT32)
    149     { 
     151    /*if (fs_info->vol.type & FAT_FAT32)
     152    {*/
    150153        fs_info->vol.next_cl = save_cln;
    151154        if (fs_info->vol.free_cls != 0xFFFFFFFF)
    152155            fs_info->vol.free_cls -= (*cls_added);   
    153     }       
     156    /*}*/
     157
    154158    *last_cl = save_cln;
    155159    fat_buf_release(fs_info);
    156160    return RC_OK;   
     
    183187        rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
    184188        if ( rc != RC_OK )
    185189        {
    186             if ((fs_info->vol.type & FAT_FAT32) &&
    187                 (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE))
     190            /*if ((fs_info->vol.type & FAT_FAT32) &&
     191                (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE))*/
     192              if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
    188193                fs_info->vol.free_cls += freed_cls_cnt;
     194
    189195            fat_buf_release(fs_info);   
    190196            return rc;
    191197        }   
     
    198204        cur_cln = next_cln;
    199205    }
    200206
    201     if (fs_info->vol.type & FAT_FAT32)
    202     {
     207    /*if (fs_info->vol.type & FAT_FAT32)
     208    {*/
    203209        fs_info->vol.next_cl = chain;
    204210        if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
    205211            fs_info->vol.free_cls += freed_cls_cnt;
    206     }   
     212    /*}*/
    207213
    208214    fat_buf_release(fs_info);
    209215    if (rc1 != RC_OK)