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) |
---|
-
cpukit/libfs/src/dosfs/fat_fat_operations.c
old new 19 19 20 20 #include <rtems/libio_.h> 21 21 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" 24 26 25 27 /* fat_scan_fat_for_free_clusters -- 26 28 * Allocate chain of free clusters from Files Allocation Table … … 59 61 if (count == 0) 60 62 return rc; 61 63 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) 64 67 cl4find = fs_info->vol.next_cl; 65 68 66 69 /* … … 128 131 /* have we satisfied request ? */ 129 132 if (*cls_added == count) 130 133 { 131 if (fs_info->vol.type & FAT_FAT32)132 { 134 /*if (fs_info->vol.type & FAT_FAT32) 135 {*/ 133 136 fs_info->vol.next_cl = save_cln; 134 137 if (fs_info->vol.free_cls != 0xFFFFFFFF) 135 138 fs_info->vol.free_cls -= (*cls_added); 136 }139 /*}*/ 137 140 *last_cl = save_cln; 138 141 fat_buf_release(fs_info); 139 142 return rc; … … 145 148 cl4find = 2; 146 149 } 147 150 148 if (fs_info->vol.type & FAT_FAT32)149 { 151 /*if (fs_info->vol.type & FAT_FAT32) 152 {*/ 150 153 fs_info->vol.next_cl = save_cln; 151 154 if (fs_info->vol.free_cls != 0xFFFFFFFF) 152 155 fs_info->vol.free_cls -= (*cls_added); 153 } 156 /*}*/ 157 154 158 *last_cl = save_cln; 155 159 fat_buf_release(fs_info); 156 160 return RC_OK; … … 183 187 rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 184 188 if ( rc != RC_OK ) 185 189 { 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) 188 193 fs_info->vol.free_cls += freed_cls_cnt; 194 189 195 fat_buf_release(fs_info); 190 196 return rc; 191 197 } … … 198 204 cur_cln = next_cln; 199 205 } 200 206 201 if (fs_info->vol.type & FAT_FAT32)202 { 207 /*if (fs_info->vol.type & FAT_FAT32) 208 {*/ 203 209 fs_info->vol.next_cl = chain; 204 210 if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 205 211 fs_info->vol.free_cls += freed_cls_cnt; 206 }212 /*}*/ 207 213 208 214 fat_buf_release(fs_info); 209 215 if (rc1 != RC_OK)