/FileX-v6.2.1/common/src/ |
D | fx_media_open.c | 139 UINT _fx_media_open(FX_MEDIA *media_ptr, CHAR *media_name, argument 170 _fx_utility_memory_set((UCHAR *)media_ptr, 0, sizeof(FX_MEDIA)); 173 media_ptr -> fx_media_memory_buffer_sector = (ULONG64)-1; 177 media_ptr -> fx_media_name = media_name; 178 media_ptr -> fx_media_driver_entry = media_driver; 179 media_ptr -> fx_media_memory_buffer = (UCHAR *)memory_ptr; 180 media_ptr -> fx_media_memory_size = memory_size; 182 media_ptr -> fx_media_disable_burst_cache = FX_FALSE; 183 media_ptr -> fx_media_FAT_type = 0; 192 media_ptr -> fx_media_directory_attributes_reads = 0; [all …]
|
D | fx_media_close.c | 92 UINT _fx_media_close(FX_MEDIA *media_ptr) in _fx_media_close() argument 105 if (media_ptr -> fx_media_id != FX_MEDIA_ID) in _fx_media_close() 113 FX_TRACE_IN_LINE_INSERT(FX_TRACE_MEDIA_CLOSE, media_ptr, 0, 0, 0, FX_TRACE_MEDIA_EVENTS, 0, 0) in _fx_media_close() 116 FX_TRACE_OBJECT_UNREGISTER(media_ptr) in _fx_media_close() 123 open_count = media_ptr -> fx_media_opened_file_count; in _fx_media_close() 124 file_ptr = media_ptr -> fx_media_opened_file_list; in _fx_media_close() 149 status = _fx_directory_entry_write(media_ptr, &(file_ptr -> fx_file_dir_entry)); in _fx_media_close() 159 _fx_media_abort(media_ptr); in _fx_media_close() 179 _fx_utility_FAT_flush(media_ptr); in _fx_media_close() 182 _fx_utility_FAT_map_flush(media_ptr); in _fx_media_close() [all …]
|
D | fx_utility_logical_sector_read.c | 104 UINT _fx_utility_logical_sector_read(FX_MEDIA *media_ptr, ULONG64 logical_sector, in _fx_utility_logical_sector_read() argument 125 media_ptr -> fx_media_fat_sector_reads++; in _fx_utility_logical_sector_read() 129 media_ptr -> fx_media_logical_sector_reads++; in _fx_utility_logical_sector_read() 137 if ((((UCHAR *)buffer_ptr) >= media_ptr -> fx_media_memory_buffer) && in _fx_utility_logical_sector_read() 138 (((UCHAR *)buffer_ptr) <= media_ptr -> fx_media_sector_cache_end)) in _fx_utility_logical_sector_read() 144 …cache_entry = _fx_utility_logical_sector_cache_entry_read(media_ptr, logical_sector, &previous_cac… in _fx_utility_logical_sector_read() 159 media_ptr -> fx_media_logical_sector_cache_read_misses++; in _fx_utility_logical_sector_read() 165 …TERNAL_LOG_SECTOR_CACHE_MISS, media_ptr, logical_sector, media_ptr -> fx_media_logical_sector_cach… in _fx_utility_logical_sector_read() 169 …_IN_LINE_INSERT(FX_TRACE_INTERNAL_LOG_SECTOR_CACHE_MISS, media_ptr, logical_sector, 0, media_ptr -… in _fx_utility_logical_sector_read() 184 media_ptr -> fx_media_driver_write_requests++; in _fx_utility_logical_sector_read() [all …]
|
D | fx_media_flush.c | 86 UINT _fx_media_flush(FX_MEDIA *media_ptr) in _fx_media_flush() argument 98 media_ptr -> fx_media_flushes++; in _fx_media_flush() 102 if (media_ptr -> fx_media_id != FX_MEDIA_ID) in _fx_media_flush() 110 FX_TRACE_IN_LINE_INSERT(FX_TRACE_MEDIA_FLUSH, media_ptr, 0, 0, 0, FX_TRACE_MEDIA_EVENTS, 0, 0) in _fx_media_flush() 116 if (media_ptr -> fx_media_driver_write_protect) in _fx_media_flush() 127 open_count = media_ptr -> fx_media_opened_file_count; in _fx_media_flush() 128 file_ptr = media_ptr -> fx_media_opened_file_list; in _fx_media_flush() 153 status = _fx_directory_entry_write(media_ptr, &(file_ptr -> fx_file_dir_entry)); in _fx_media_flush() 176 _fx_utility_FAT_flush(media_ptr); in _fx_media_flush() 179 _fx_utility_FAT_map_flush(media_ptr); in _fx_media_flush() [all …]
|
D | fx_utility_logical_sector_write.c | 95 UINT _fx_utility_logical_sector_write(FX_MEDIA *media_ptr, ULONG64 logical_sector, in _fx_utility_logical_sector_write() argument 114 media_ptr -> fx_media_fat_sector_writes++; in _fx_utility_logical_sector_write() 118 media_ptr -> fx_media_logical_sector_writes++; in _fx_utility_logical_sector_write() 126 if ((((UCHAR *)buffer_ptr) >= media_ptr -> fx_media_memory_buffer) && in _fx_utility_logical_sector_write() 127 (((UCHAR *)buffer_ptr) <= media_ptr -> fx_media_sector_cache_end)) in _fx_utility_logical_sector_write() 133 if (media_ptr -> fx_media_sector_cache_hashed) in _fx_utility_logical_sector_write() 137 …index = (ULONG)(logical_sector & media_ptr -> fx_media_sector_cache_hash_mask) * FX_SECTOR_CACHE_… in _fx_utility_logical_sector_write() 140 cache_entry = &(media_ptr -> fx_media_sector_cache[index]); in _fx_utility_logical_sector_write() 159 cache_size = media_ptr -> fx_media_sector_cache_size; in _fx_utility_logical_sector_write() 160 cache_entry = media_ptr -> fx_media_sector_cache_list_ptr; in _fx_utility_logical_sector_write() [all …]
|
D | fx_utility_FAT_entry_write.c | 79 UINT _fx_utility_FAT_entry_write(FX_MEDIA *media_ptr, ULONG cluster, ULONG next_cluster) in _fx_utility_FAT_entry_write() argument 89 if (media_ptr -> fx_media_fault_tolerant_enabled && in _fx_utility_FAT_entry_write() 90 (media_ptr -> fx_media_fault_tolerant_state & FX_FAULT_TOLERANT_STATE_STARTED)) in _fx_utility_FAT_entry_write() 93 if (!(media_ptr -> fx_media_fault_tolerant_state & FX_FAULT_TOLERANT_STATE_SET_FAT_CHAIN)) in _fx_utility_FAT_entry_write() 97 return(_fx_fault_tolerant_add_FAT_log(media_ptr, cluster, next_cluster)); in _fx_utility_FAT_entry_write() 101 FAT_sector = _fx_utility_FAT_sector_get(media_ptr, cluster); in _fx_utility_FAT_entry_write() 104 if (FAT_sector != media_ptr -> fx_media_fault_tolerant_cached_FAT_sector) in _fx_utility_FAT_entry_write() 108 if (media_ptr -> fx_media_fault_tolerant_cached_FAT_sector) in _fx_utility_FAT_entry_write() 113 _fx_utility_FAT_flush(media_ptr); in _fx_utility_FAT_entry_write() 118 media_ptr -> fx_media_fault_tolerant_cached_FAT_sector = FAT_sector; in _fx_utility_FAT_entry_write() [all …]
|
D | fx_ram_driver.c | 50 VOID _fx_ram_driver(FX_MEDIA *media_ptr); 112 VOID _fx_ram_driver(FX_MEDIA *media_ptr) in _fx_ram_driver() argument 200 switch (media_ptr -> fx_media_driver_request) in _fx_ram_driver() 209 source_buffer = ((UCHAR *)media_ptr -> fx_media_driver_info) + in _fx_ram_driver() 210 ((media_ptr -> fx_media_driver_logical_sector + in _fx_ram_driver() 211 media_ptr -> fx_media_hidden_sectors) * in _fx_ram_driver() 212 media_ptr -> fx_media_bytes_per_sector); in _fx_ram_driver() 215 _fx_utility_memory_copy(source_buffer, media_ptr -> fx_media_driver_buffer, in _fx_ram_driver() 216 media_ptr -> fx_media_driver_sectors * in _fx_ram_driver() 217 media_ptr -> fx_media_bytes_per_sector); in _fx_ram_driver() [all …]
|
D | fx_fault_tolerant_enable.c | 93 UINT _fx_fault_tolerant_enable(FX_MEDIA *media_ptr, VOID *memory_buffer, UINT memory_size) argument 114 bytes_per_sector = media_ptr -> fx_media_bytes_per_sector; 115 bytes_per_cluster = bytes_per_sector * media_ptr -> fx_media_sectors_per_cluster; 127 media_ptr -> fx_media_fault_tolerant_clusters = clusters; 140 if (media_ptr -> fx_media_FAT32_additional_info_sector) 150 …_fx_utility_logical_sector_flush(media_ptr, ((ULONG64) 1), (ULONG64) (media_ptr -> fx_media_total_… 153 …media_ptr -> fx_media_memory_buffer = media_ptr -> fx_media_sector_cache[0].fx_cached_sector_memor… 157 media_ptr -> fx_media_available_clusters = 0; 163 …for (i = 0; i < media_ptr -> fx_media_sectors_per_FAT; i = i + media_ptr -> fx_media_sector_cache_… 167 FAT_sector = media_ptr -> fx_media_reserved_sectors + i; [all …]
|
D | fx_utility_FAT_flush.c | 80 UINT _fx_utility_FAT_flush(FX_MEDIA *media_ptr) in _fx_utility_FAT_flush() argument 95 media_ptr -> fx_media_fat_cache_flushes++; in _fx_utility_FAT_flush() 103 if ((media_ptr -> fx_media_fat_cache[index].fx_fat_cache_entry_dirty) == 0) in _fx_utility_FAT_flush() 114 cluster = media_ptr -> fx_media_fat_cache[index].fx_fat_cache_entry_cluster; in _fx_utility_FAT_flush() 117 if (media_ptr -> fx_media_12_bit_FAT) in _fx_utility_FAT_flush() 124 FAT_sector = (byte_offset / media_ptr -> fx_media_bytes_per_sector) + in _fx_utility_FAT_flush() 125 (ULONG)media_ptr -> fx_media_reserved_sectors; in _fx_utility_FAT_flush() 134 status = _fx_utility_logical_sector_read(media_ptr, (ULONG64) FAT_sector, in _fx_utility_FAT_flush() 135 … media_ptr -> fx_media_memory_buffer, ((ULONG) 1), FX_FAT_SECTOR); in _fx_utility_FAT_flush() 153 FAT_ptr = (UCHAR *)media_ptr -> fx_media_memory_buffer; in _fx_utility_FAT_flush() [all …]
|
D | fx_media_volume_set.c | 77 UINT _fx_media_volume_set(FX_MEDIA *media_ptr, CHAR *volume_name) in _fx_media_volume_set() argument 88 if (media_ptr -> fx_media_id != FX_MEDIA_ID) in _fx_media_volume_set() 99 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_MEDIA_VOLUME_SET, media_ptr, volume_name, 0, 0, FX_TRACE_MEDIA_EV… in _fx_media_volume_set() 114 status = _fx_utility_logical_sector_read(media_ptr, ((ULONG64) 0), in _fx_media_volume_set() 115 … media_ptr -> fx_media_memory_buffer, ((ULONG) 1), FX_DATA_SECTOR); in _fx_media_volume_set() 131 media_ptr -> fx_media_driver_boot_read_requests++; in _fx_media_volume_set() 135 media_ptr -> fx_media_driver_request = FX_DRIVER_BOOT_READ; in _fx_media_volume_set() 136 media_ptr -> fx_media_driver_status = FX_IO_ERROR; in _fx_media_volume_set() 137 media_ptr -> fx_media_driver_buffer = media_ptr -> fx_media_memory_buffer; in _fx_media_volume_set() 138 media_ptr -> fx_media_driver_sectors = 1; in _fx_media_volume_set() [all …]
|
D | fx_directory_create.c | 97 UINT _fx_directory_create(FX_MEDIA *media_ptr, CHAR *directory_name) in _fx_directory_create() argument 118 media_ptr -> fx_media_directory_creates++; in _fx_directory_create() 155 dir_entry.fx_dir_entry_name = media_ptr -> fx_media_name_buffer + FX_MAX_LONG_NAME_LEN; in _fx_directory_create() 158 … search_directory.fx_dir_entry_name = media_ptr -> fx_media_name_buffer + FX_MAX_LONG_NAME_LEN * 2; in _fx_directory_create() 167 if (media_ptr -> fx_media_id != FX_MEDIA_ID) in _fx_directory_create() 175 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_DIRECTORY_CREATE, media_ptr, directory_name, 0, 0, FX_TRACE_DIREC… in _fx_directory_create() 181 if (media_ptr -> fx_media_driver_write_protect) in _fx_directory_create() 192 if (!media_ptr -> fx_media_available_clusters) in _fx_directory_create() 203 …status = _fx_directory_search(media_ptr, directory_name, &dir_entry, &search_directory, &work_ptr… in _fx_directory_create() 231 _fx_fault_tolerant_transaction_start(media_ptr); in _fx_directory_create() [all …]
|
D | fx_utility_logical_sector_flush.c | 83 UINT _fx_utility_logical_sector_flush(FX_MEDIA *media_ptr, ULONG64 starting_sector, ULONG64 sector… in _fx_utility_logical_sector_flush() argument 104 remaining_dirty = media_ptr -> fx_media_sector_cache_dirty_count; in _fx_utility_logical_sector_flush() 107 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_INTERNAL_MEDIA_FLUSH, media_ptr, media_ptr -> fx_media_sector_cac… in _fx_utility_logical_sector_flush() 110 if (media_ptr -> fx_media_sector_cache_hashed == FX_FALSE) in _fx_utility_logical_sector_flush() 117 cache_size = media_ptr -> fx_media_sector_cache_size; in _fx_utility_logical_sector_flush() 118 cache_entry = media_ptr -> fx_media_sector_cache_list_ptr; in _fx_utility_logical_sector_flush() 155 if (media_ptr -> fx_media_driver_write_protect == FX_FALSE) in _fx_utility_logical_sector_flush() 161 media_ptr -> fx_media_driver_write_requests++; in _fx_utility_logical_sector_flush() 165 media_ptr -> fx_media_driver_request = FX_DRIVER_WRITE; in _fx_utility_logical_sector_flush() 166 media_ptr -> fx_media_driver_status = FX_IO_ERROR; in _fx_utility_logical_sector_flush() [all …]
|
D | fx_media_boot_info_extract.c | 117 UINT _fx_media_boot_info_extract(FX_MEDIA *media_ptr) in _fx_media_boot_info_extract() argument 124 boot_sector = media_ptr -> fx_media_driver_buffer; in _fx_media_boot_info_extract() 127 …media_ptr -> fx_media_bytes_per_sector = _fx_utility_16_unsigned_read(&boot_sector[FX_BYTES_SEC… in _fx_media_boot_info_extract() 128 if (media_ptr -> fx_media_bytes_per_sector == 0) in _fx_media_boot_info_extract() 134 …media_ptr -> fx_media_sectors_per_track = _fx_utility_16_unsigned_read(&boot_sector[FX_SECTORS_P… in _fx_media_boot_info_extract() 137 … media_ptr -> fx_media_heads = _fx_utility_16_unsigned_read(&boot_sector[FX_HEADS]); in _fx_media_boot_info_extract() 140 …media_ptr -> fx_media_total_sectors = _fx_utility_16_unsigned_read(&boot_sector[FX_SECTORS]); in _fx_media_boot_info_extract() 141 if (media_ptr -> fx_media_total_sectors == 0) in _fx_media_boot_info_extract() 143 … media_ptr -> fx_media_total_sectors = _fx_utility_32_unsigned_read(&boot_sector[FX_HUGE_SECTORS]); in _fx_media_boot_info_extract() 146 if (media_ptr -> fx_media_total_sectors == 0) in _fx_media_boot_info_extract() [all …]
|
D | fx_file_write.c | 111 FX_MEDIA *media_ptr; in _fx_file_write() local 149 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_write() 154 media_ptr -> fx_media_file_writes++; in _fx_file_write() 168 insertion_back = media_ptr -> fx_media_fat_last; in _fx_file_write() 178 if (media_ptr -> fx_media_driver_write_protect) in _fx_file_write() 203 _fx_fault_tolerant_transaction_start(media_ptr); in _fx_file_write() 207 bytes_per_cluster = ((ULONG)media_ptr -> fx_media_bytes_per_sector) * in _fx_file_write() 208 ((ULONG)media_ptr -> fx_media_sectors_per_cluster); in _fx_file_write() 215 FX_FAULT_TOLERANT_TRANSACTION_FAIL(media_ptr); in _fx_file_write() 230 if (media_ptr -> fx_media_fault_tolerant_enabled) in _fx_file_write() [all …]
|
D | fx_file_extended_allocate.c | 101 FX_MEDIA *media_ptr; in _fx_file_extended_allocate() local 118 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_allocate() 123 media_ptr -> fx_media_file_allocates++; in _fx_file_extended_allocate() 144 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_allocate() 154 _fx_fault_tolerant_transaction_start(media_ptr); in _fx_file_extended_allocate() 158 if (media_ptr -> fx_media_driver_write_protect) in _fx_file_extended_allocate() 162 FX_FAULT_TOLERANT_TRANSACTION_FAIL(media_ptr); in _fx_file_extended_allocate() 173 bytes_per_cluster = ((ULONG)media_ptr -> fx_media_bytes_per_sector) * in _fx_file_extended_allocate() 174 ((ULONG)media_ptr -> fx_media_sectors_per_cluster); in _fx_file_extended_allocate() 181 FX_FAULT_TOLERANT_TRANSACTION_FAIL(media_ptr); in _fx_file_extended_allocate() [all …]
|
D | fx_directory_delete.c | 94 UINT _fx_directory_delete(FX_MEDIA *media_ptr, CHAR *directory_name) in _fx_directory_delete() argument 109 media_ptr -> fx_media_directory_deletes++; in _fx_directory_delete() 113 dir_entry.fx_dir_entry_name = media_ptr -> fx_media_name_buffer + FX_MAX_LONG_NAME_LEN; in _fx_directory_delete() 116 …search_directory.fx_dir_entry_name = media_ptr -> fx_media_name_buffer + FX_MAX_LONG_NAME_LEN * 2; in _fx_directory_delete() 119 search_entry.fx_dir_entry_name = media_ptr -> fx_media_name_buffer + FX_MAX_LONG_NAME_LEN * 3; in _fx_directory_delete() 127 if (media_ptr -> fx_media_id != FX_MEDIA_ID) in _fx_directory_delete() 135 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_DIRECTORY_DELETE, media_ptr, directory_name, 0, 0, FX_TRACE_DIREC… in _fx_directory_delete() 142 _fx_fault_tolerant_transaction_start(media_ptr); in _fx_directory_delete() 146 if (media_ptr -> fx_media_driver_write_protect) in _fx_directory_delete() 150 FX_FAULT_TOLERANT_TRANSACTION_FAIL(media_ptr); in _fx_directory_delete() [all …]
|
D | fx_fault_tolerant_create_log_file.c | 80 UINT _fx_fault_tolerant_create_log_file(FX_MEDIA *media_ptr) in _fx_fault_tolerant_create_log_file() argument 91 if (media_ptr -> fx_media_available_clusters < media_ptr -> fx_media_fault_tolerant_clusters) in _fx_fault_tolerant_create_log_file() 99 clusters = media_ptr -> fx_media_fault_tolerant_clusters; in _fx_fault_tolerant_create_log_file() 102 while (FAT_index <= (media_ptr -> fx_media_total_clusters - clusters + FX_FAT_ENTRY_START)) in _fx_fault_tolerant_create_log_file() 113 status = _fx_utility_FAT_entry_read(media_ptr, (FAT_index + i), &FAT_value); in _fx_fault_tolerant_create_log_file() 165 status = _fx_utility_FAT_entry_write(media_ptr, FAT_index + i, FAT_index + i + 1); in _fx_fault_tolerant_create_log_file() 178 …status = _fx_utility_FAT_entry_write(media_ptr, FAT_index + clusters - 1, media_ptr -> fx_media_f… in _fx_fault_tolerant_create_log_file() 192 _fx_utility_FAT_flush(media_ptr); in _fx_fault_tolerant_create_log_file() 197 …_fx_utility_32_unsigned_write(media_ptr -> fx_media_fault_tolerant_memory_buffer + FX_FAULT_TOLERA… in _fx_fault_tolerant_create_log_file() 200 media_ptr -> fx_media_driver_request = FX_DRIVER_BOOT_WRITE; in _fx_fault_tolerant_create_log_file() [all …]
|
D | fx_file_delete.c | 92 UINT _fx_file_delete(FX_MEDIA *media_ptr, CHAR *file_name) in _fx_file_delete() argument 107 media_ptr -> fx_media_file_deletes++; in _fx_file_delete() 111 dir_entry.fx_dir_entry_name = media_ptr -> fx_media_name_buffer + FX_MAX_LONG_NAME_LEN; in _fx_file_delete() 117 if (media_ptr -> fx_media_id != FX_MEDIA_ID) in _fx_file_delete() 125 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_DELETE, media_ptr, file_name, 0, 0, FX_TRACE_FILE_EVENTS, 0,… in _fx_file_delete() 132 _fx_fault_tolerant_transaction_start(media_ptr); in _fx_file_delete() 136 if (media_ptr -> fx_media_driver_write_protect) in _fx_file_delete() 140 FX_FAULT_TOLERANT_TRANSACTION_FAIL(media_ptr); in _fx_file_delete() 151 status = _fx_directory_search(media_ptr, file_name, &dir_entry, FX_NULL, FX_NULL); in _fx_file_delete() 158 FX_FAULT_TOLERANT_TRANSACTION_FAIL(media_ptr); in _fx_file_delete() [all …]
|
D | fx_media_abort.c | 75 UINT _fx_media_abort(FX_MEDIA *media_ptr) in _fx_media_abort() argument 86 media_ptr -> fx_media_aborts++; in _fx_media_abort() 90 if (media_ptr -> fx_media_id != FX_MEDIA_ID) in _fx_media_abort() 98 FX_TRACE_IN_LINE_INSERT(FX_TRACE_MEDIA_ABORT, media_ptr, 0, 0, 0, FX_TRACE_MEDIA_EVENTS, 0, 0) in _fx_media_abort() 104 open_count = media_ptr -> fx_media_opened_file_count; in _fx_media_abort() 105 file_ptr = media_ptr -> fx_media_opened_file_list; in _fx_media_abort() 118 media_ptr -> fx_media_driver_request = FX_DRIVER_ABORT; in _fx_media_abort() 119 media_ptr -> fx_media_driver_status = FX_IO_ERROR; in _fx_media_abort() 122 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_INTERNAL_IO_DRIVER_ABORT, media_ptr, 0, 0, 0, FX_TRACE_INTERNAL_E… in _fx_media_abort() 125 (media_ptr -> fx_media_driver_entry) (media_ptr); in _fx_media_abort() [all …]
|
D | fx_file_extended_truncate_release.c | 103 FX_MEDIA *media_ptr; in _fx_file_extended_truncate_release() local 127 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_truncate_release() 130 media_ptr -> fx_media_file_truncate_releases++; in _fx_file_extended_truncate_release() 134 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_truncate_release() 144 _fx_fault_tolerant_transaction_start(media_ptr); in _fx_file_extended_truncate_release() 152 FX_FAULT_TOLERANT_TRANSACTION_FAIL(media_ptr); in _fx_file_extended_truncate_release() 164 if (media_ptr -> fx_media_driver_write_protect) in _fx_file_extended_truncate_release() 168 FX_FAULT_TOLERANT_TRANSACTION_FAIL(media_ptr); in _fx_file_extended_truncate_release() 179 bytes_per_cluster = ((ULONG)media_ptr -> fx_media_bytes_per_sector) * in _fx_file_extended_truncate_release() 180 ((ULONG)media_ptr -> fx_media_sectors_per_cluster); in _fx_file_extended_truncate_release() [all …]
|
D | fx_file_extended_best_effort_allocate.c | 102 FX_MEDIA *media_ptr; in _fx_file_extended_best_effort_allocate() local 121 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_best_effort_allocate() 124 media_ptr -> fx_media_file_best_effort_allocates++; in _fx_file_extended_best_effort_allocate() 148 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_best_effort_allocate() 158 _fx_fault_tolerant_transaction_start(media_ptr); in _fx_file_extended_best_effort_allocate() 162 if (media_ptr -> fx_media_driver_write_protect) in _fx_file_extended_best_effort_allocate() 166 FX_FAULT_TOLERANT_TRANSACTION_FAIL(media_ptr); in _fx_file_extended_best_effort_allocate() 177 bytes_per_cluster = ((ULONG)media_ptr -> fx_media_bytes_per_sector) * in _fx_file_extended_best_effort_allocate() 178 ((ULONG)media_ptr -> fx_media_sectors_per_cluster); in _fx_file_extended_best_effort_allocate() 185 FX_FAULT_TOLERANT_TRANSACTION_FAIL(media_ptr); in _fx_file_extended_best_effort_allocate() [all …]
|
D | fx_media_format.c | 128 UINT _fx_media_format(FX_MEDIA *media_ptr, VOID (*driver)(FX_MEDIA *media), VOID *driver_info_ptr,… in _fx_media_format() argument 142 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_MEDIA_FORMAT, media_ptr, directory_entries, total_sectors, sector… in _fx_media_format() 153 media_ptr -> fx_media_driver_entry = driver; in _fx_media_format() 154 media_ptr -> fx_media_memory_buffer = (UCHAR *)memory_ptr; in _fx_media_format() 155 media_ptr -> fx_media_memory_size = memory_size; in _fx_media_format() 158 media_ptr -> fx_media_bytes_per_sector = bytes_per_sector; in _fx_media_format() 159 media_ptr -> fx_media_sectors_per_track = sectors_per_track; in _fx_media_format() 160 media_ptr -> fx_media_heads = heads; in _fx_media_format() 161 media_ptr -> fx_media_hidden_sectors = hidden_sectors; in _fx_media_format() 165 media_ptr -> fx_media_driver_request = FX_DRIVER_INIT; in _fx_media_format() [all …]
|
D | fx_utility_FAT_entry_read.c | 87 UINT _fx_utility_FAT_entry_read(FX_MEDIA *media_ptr, ULONG cluster, ULONG *entry_ptr) in _fx_utility_FAT_entry_read() argument 102 if (media_ptr -> fx_media_fault_tolerant_enabled && in _fx_utility_FAT_entry_read() 103 (media_ptr -> fx_media_fault_tolerant_state & FX_FAULT_TOLERANT_STATE_STARTED)) in _fx_utility_FAT_entry_read() 107 …status = _fx_fault_tolerant_read_FAT(media_ptr, cluster, entry_ptr, FX_FAULT_TOLERANT_FAT_LOG_TYPE… in _fx_utility_FAT_entry_read() 119 media_ptr -> fx_media_fat_entry_reads++; in _fx_utility_FAT_entry_read() 120 media_ptr -> fx_media_fat_entry_cache_read_hits++; in _fx_utility_FAT_entry_read() 130 cache_entry_ptr = &media_ptr -> fx_media_fat_cache[index]; in _fx_utility_FAT_entry_read() 206 if (media_ptr -> fx_media_fat_cache[index + 3].fx_fat_cache_entry_dirty) in _fx_utility_FAT_entry_read() 210 status = _fx_utility_FAT_flush(media_ptr); in _fx_utility_FAT_entry_read() 227 media_ptr -> fx_media_fat_entry_cache_read_hits--; in _fx_utility_FAT_entry_read() [all …]
|
D | fx_directory_free_search.c | 87 UINT _fx_directory_free_search(FX_MEDIA *media_ptr, FX_DIR_ENTRY *directory_ptr, FX_DIR_ENTRY *ent… in _fx_directory_free_search() argument 111 media_ptr -> fx_media_directory_free_searches++; in _fx_directory_free_search() 301 directory_entries = (ULONG)media_ptr -> fx_media_root_directory_entries; in _fx_directory_free_search() 318 status = _fx_directory_entry_read(media_ptr, search_dir_ptr, &directory_index, entry_ptr); in _fx_directory_free_search() 345 status = _fx_directory_entry_write(media_ptr, entry_ptr); in _fx_directory_free_search() 420 … sectors = ((total_entries * FX_DIR_ENTRY_SIZE) + (media_ptr -> fx_media_bytes_per_sector - 1))/ in _fx_directory_free_search() 421 … media_ptr -> fx_media_bytes_per_sector; in _fx_directory_free_search() 424 …clusters_needed = (sectors + (media_ptr -> fx_media_sectors_per_cluster - 1)) / media_ptr -> fx_me… in _fx_directory_free_search() 428 …if (((search_dir_ptr) || (media_ptr -> fx_media_32_bit_FAT)) && (media_ptr -> fx_media_available_c… in _fx_directory_free_search() 433 total_clusters = media_ptr -> fx_media_total_clusters; in _fx_directory_free_search() [all …]
|
/FileX-v6.2.1/test/regression_test/ |
D | fx_ram_driver_test.c | 94 UINT (*driver_write_callback)(FX_MEDIA *media_ptr, UINT sector_type, UCHAR *block_ptr, UINT *operat… 95 VOID (*driver_fault_tolerant_enable_callback)(FX_MEDIA *media_ptr, 98 VOID (*driver_fault_tolerant_apply_log_callback)(FX_MEDIA *media_ptr, 103 UINT _filex_fault_tolerant_log_check(FX_MEDIA *media_ptr); 106 VOID _fx_ram_driver(FX_MEDIA *media_ptr); 199 VOID _fx_ram_driver(FX_MEDIA *media_ptr) in _fx_ram_driver() argument 298 media_ptr -> fx_media_driver_status = FX_IO_ERROR; in _fx_ram_driver() 306 switch(media_ptr -> fx_media_driver_request) in _fx_ram_driver() 315 source_buffer = ((UCHAR *) media_ptr -> fx_media_driver_info) + in _fx_ram_driver() 316 …((media_ptr -> fx_media_driver_logical_sector + media_ptr -> fx_media_hidden_sectors) * media_ptr … in _fx_ram_driver() [all …]
|