Home
last modified time | relevance | path

Searched refs:file_ptr (Results 1 – 25 of 40) sorted by relevance

12

/FileX-v6.2.1/common/src/
Dfx_file_open.c84 UINT _fx_file_open(FX_MEDIA *media_ptr, FX_FILE *file_ptr, CHAR *file_name, UINT open_type) in _fx_file_open() argument
123 file_ptr -> fx_file_write_notify = FX_NULL; in _fx_file_open()
157 FX_TRACE_OBJECT_REGISTER(FX_TRACE_OBJECT_TYPE_FILE, file_ptr, file_name, 0, 0) in _fx_file_open()
160 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_OPEN, media_ptr, file_ptr, file_name, open_type, FX_TRACE_FI… in _fx_file_open()
166 file_ptr -> fx_file_dir_entry.fx_dir_entry_name = file_ptr -> fx_file_name_buffer; in _fx_file_open()
167 file_ptr -> fx_file_dir_entry.fx_dir_entry_short_name[0] = 0; in _fx_file_open()
170 …status = _fx_directory_search(media_ptr, file_name, &(file_ptr -> fx_file_dir_entry), FX_NULL, FX… in _fx_file_open()
184 if (file_ptr -> fx_file_dir_entry.fx_dir_entry_attributes & not_a_file_attr) in _fx_file_open()
208 file_ptr -> fx_file_dir_entry.fx_dir_entry_log_sector) && in _fx_file_open()
210 file_ptr -> fx_file_dir_entry.fx_dir_entry_byte_offset) && in _fx_file_open()
[all …]
Dfx_file_close.c75 UINT _fx_file_close(FX_FILE *file_ptr) in _fx_file_close() argument
84 if (file_ptr -> fx_file_id != FX_FILE_ID) in _fx_file_close()
92 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_close()
101 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_CLOSE, file_ptr, file_ptr -> fx_file_current_file_size, 0, 0… in _fx_file_close()
106 FX_TRACE_OBJECT_UNREGISTER(file_ptr) in _fx_file_close()
111 if (file_ptr == file_ptr -> fx_file_opened_next) in _fx_file_close()
121 (file_ptr -> fx_file_opened_next) -> fx_file_opened_previous = in _fx_file_close()
122 file_ptr -> fx_file_opened_previous; in _fx_file_close()
123 (file_ptr -> fx_file_opened_previous) -> fx_file_opened_next = in _fx_file_close()
124 file_ptr -> fx_file_opened_next; in _fx_file_close()
[all …]
Dfx_file_write.c94 UINT _fx_file_write(FX_FILE *file_ptr, VOID *buffer_ptr, ULONG size) in _fx_file_write() argument
141 if (file_ptr -> fx_file_id != FX_FILE_ID) in _fx_file_write()
149 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_write()
158 if (file_ptr -> fx_file_current_file_offset + size > 0xFFFFFFFFULL) in _fx_file_write()
172 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_WRITE, file_ptr, buffer_ptr, size, 0, FX_TRACE_FILE_EVENTS, … in _fx_file_write()
189 if (file_ptr -> fx_file_open_mode != FX_OPEN_FOR_WRITE) in _fx_file_write()
233 if (file_ptr -> fx_file_current_file_offset == file_ptr -> fx_file_current_file_size) in _fx_file_write()
239 else if (file_ptr -> fx_file_current_file_offset == file_ptr -> fx_file_maximum_size_used) in _fx_file_write()
246 … else if (((file_ptr -> fx_file_current_file_offset / media_ptr -> fx_media_bytes_per_sector) == in _fx_file_write()
247 …((file_ptr -> fx_file_current_file_offset + size - 1) / media_ptr -> fx_media_bytes_per_sector)) && in _fx_file_write()
[all …]
Dfx_file_read.c83 UINT _fx_file_read(FX_FILE *file_ptr, VOID *buffer_ptr, ULONG request_size, ULONG *actual_size) in _fx_file_read() argument
101 if (file_ptr -> fx_file_id != FX_FILE_ID) in _fx_file_read()
110 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_read()
117 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_read()
120 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_READ, file_ptr, buffer_ptr, request_size, 0, FX_TRACE_FILE_E… in _fx_file_read()
126 if (file_ptr -> fx_file_current_file_offset >= in _fx_file_read()
127 file_ptr -> fx_file_current_file_size) in _fx_file_read()
147 (file_ptr -> fx_file_current_file_size - file_ptr -> fx_file_current_file_offset)) in _fx_file_read()
151 …request_size = (ULONG)(file_ptr -> fx_file_current_file_size - file_ptr -> fx_file_current_file_o… in _fx_file_read()
162 if ((file_ptr -> fx_file_current_logical_offset) || in _fx_file_read()
[all …]
Dfx_file_extended_seek.c80 UINT _fx_file_extended_seek(FX_FILE *file_ptr, ULONG64 byte_offset) in _fx_file_extended_seek() argument
94 if (file_ptr -> fx_file_id != FX_FILE_ID) in _fx_file_extended_seek()
103 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_seek()
110 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_seek()
113 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_SEEK, file_ptr, byte_offset, file_ptr -> fx_file_current_fil… in _fx_file_extended_seek()
119 if (byte_offset == file_ptr -> fx_file_current_file_offset) in _fx_file_extended_seek()
145 if (byte_offset > file_ptr -> fx_file_current_file_size) in _fx_file_extended_seek()
149 byte_offset = file_ptr -> fx_file_current_file_size; in _fx_file_extended_seek()
153 … if (byte_offset >= (ULONG64)file_ptr -> fx_file_consecutive_cluster * (ULONG64)bytes_per_cluster) in _fx_file_extended_seek()
160 …if ((ULONG64)file_ptr -> fx_file_current_relative_cluster * (ULONG64)bytes_per_cluster < byte_offs… in _fx_file_extended_seek()
[all …]
Dfx_file_extended_relative_seek.c83 UINT _fx_file_extended_relative_seek(FX_FILE *file_ptr, ULONG64 byte_offset, UINT seek_from) in _fx_file_extended_relative_seek() argument
90 if (file_ptr -> fx_file_id != FX_FILE_ID) in _fx_file_extended_relative_seek()
98 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_relative_seek()
105 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_RELATIVE_SEEK, file_ptr, byte_offset, seek_from, file_ptr ->… in _fx_file_extended_relative_seek()
113 return(_fx_file_extended_seek(file_ptr, byte_offset)); in _fx_file_extended_relative_seek()
123 if (byte_offset >= file_ptr -> fx_file_current_file_size) in _fx_file_extended_relative_seek()
127 return(_fx_file_extended_seek(file_ptr, ((ULONG64) 0))); in _fx_file_extended_relative_seek()
133 … return(_fx_file_extended_seek(file_ptr, file_ptr -> fx_file_current_file_size - byte_offset)); in _fx_file_extended_relative_seek()
141 … return(_fx_file_extended_seek(file_ptr, file_ptr -> fx_file_current_file_offset + byte_offset)); in _fx_file_extended_relative_seek()
148 if (byte_offset >= file_ptr -> fx_file_current_file_offset) in _fx_file_extended_relative_seek()
[all …]
Dfx_file_extended_allocate.c91 UINT _fx_file_extended_allocate(FX_FILE *file_ptr, ULONG64 size) in _fx_file_extended_allocate() argument
110 if (file_ptr -> fx_file_id != FX_FILE_ID) in _fx_file_extended_allocate()
118 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_allocate()
127 if (file_ptr -> fx_file_open_mode != FX_OPEN_FOR_WRITE) in _fx_file_extended_allocate()
144 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_allocate()
147 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_ALLOCATE, file_ptr, size, file_ptr -> fx_file_current_availa… in _fx_file_extended_allocate()
226 …if (((file_ptr -> fx_file_current_available_size + (((ULONG64) clusters) * ((ULONG64) bytes_per_cl… in _fx_file_extended_allocate()
227 …((file_ptr -> fx_file_current_available_size + (((ULONG64) clusters) * ((ULONG64) bytes_per_cluste… in _fx_file_extended_allocate()
313 … _fx_fault_tolerant_set_FAT_chain(media_ptr, FX_FALSE, file_ptr -> fx_file_last_physical_cluster, in _fx_file_extended_allocate()
372 if (file_ptr -> fx_file_total_clusters) in _fx_file_extended_allocate()
[all …]
Dfx_file_extended_truncate_release.c93 UINT _fx_file_extended_truncate_release(FX_FILE *file_ptr, ULONG64 size) in _fx_file_extended_truncate_release() argument
118 if (file_ptr -> fx_file_id != FX_FILE_ID) in _fx_file_extended_truncate_release()
127 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_truncate_release()
134 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_truncate_release()
137 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_TRUNCATE_RELEASE, file_ptr, size, file_ptr -> fx_file_curren… in _fx_file_extended_truncate_release()
148 if (file_ptr -> fx_file_open_mode != FX_OPEN_FOR_WRITE) in _fx_file_extended_truncate_release()
198 if (size < file_ptr -> fx_file_current_available_size) in _fx_file_extended_truncate_release()
204file_ptr -> fx_file_current_available_size = ((size + bytes_per_cluster - 1) / bytes_per_cluster)… in _fx_file_extended_truncate_release()
207 if (size < file_ptr -> fx_file_current_file_size) in _fx_file_extended_truncate_release()
211 file_ptr -> fx_file_current_file_size = size; in _fx_file_extended_truncate_release()
[all …]
Dfx_file_extended_truncate.c85 UINT _fx_file_extended_truncate(FX_FILE *file_ptr, ULONG64 size) in _fx_file_extended_truncate() argument
109 if (file_ptr -> fx_file_id != FX_FILE_ID) in _fx_file_extended_truncate()
118 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_truncate()
125 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_truncate()
128 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_TRUNCATE, file_ptr, size, file_ptr -> fx_file_current_file_s… in _fx_file_extended_truncate()
134 if (file_ptr -> fx_file_open_mode != FX_OPEN_FOR_WRITE) in _fx_file_extended_truncate()
157 if (size < file_ptr -> fx_file_current_file_size) in _fx_file_extended_truncate()
161 file_ptr -> fx_file_current_file_size = size; in _fx_file_extended_truncate()
164 file_ptr -> fx_file_modified = FX_TRUE; in _fx_file_extended_truncate()
173 …T_UPDATE(trace_event, trace_timestamp, FX_TRACE_FILE_TRUNCATE, 0, 0, 0, file_ptr -> fx_file_curren… in _fx_file_extended_truncate()
[all …]
Dfx_file_extended_best_effort_allocate.c92 UINT _fx_file_extended_best_effort_allocate(FX_FILE *file_ptr, ULONG64 size, ULONG64 *actual_size_… in _fx_file_extended_best_effort_allocate() argument
112 if (file_ptr -> fx_file_id != FX_FILE_ID) in _fx_file_extended_best_effort_allocate()
121 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_best_effort_allocate()
128 if (file_ptr -> fx_file_open_mode != FX_OPEN_FOR_WRITE) in _fx_file_extended_best_effort_allocate()
148 media_ptr = file_ptr -> fx_file_media_ptr; in _fx_file_extended_best_effort_allocate()
151 …FX_TRACE_IN_LINE_INSERT(FX_TRACE_FILE_BEST_EFFORT_ALLOCATE, file_ptr, size, 0, 0, FX_TRACE_FILE_EV… in _fx_file_extended_best_effort_allocate()
233 …if (((file_ptr -> fx_file_current_available_size + (((ULONG64) clusters) * ((ULONG64) bytes_per_cl… in _fx_file_extended_best_effort_allocate()
234 …((file_ptr -> fx_file_current_available_size + (((ULONG64) clusters) * ((ULONG64) bytes_per_cluste… in _fx_file_extended_best_effort_allocate()
344 … _fx_fault_tolerant_set_FAT_chain(media_ptr, FX_FALSE, file_ptr -> fx_file_last_physical_cluster, in _fx_file_extended_best_effort_allocate()
403 if (file_ptr -> fx_file_total_clusters) in _fx_file_extended_best_effort_allocate()
[all …]
Dfx_media_flush.c91 FX_FILE *file_ptr; in _fx_media_flush() local
128 file_ptr = media_ptr -> fx_media_opened_file_list; in _fx_media_flush()
134 if ((file_ptr -> fx_file_open_mode == FX_OPEN_FOR_WRITE) && in _fx_media_flush()
135 (file_ptr -> fx_file_modified)) in _fx_media_flush()
142 file_ptr -> fx_file_dir_entry.fx_dir_entry_time = _fx_system_time; in _fx_media_flush()
143 file_ptr -> fx_file_dir_entry.fx_dir_entry_date = _fx_system_date; in _fx_media_flush()
149 file_ptr -> fx_file_dir_entry.fx_dir_entry_file_size = in _fx_media_flush()
150 file_ptr -> fx_file_current_file_size; in _fx_media_flush()
153 status = _fx_directory_entry_write(media_ptr, &(file_ptr -> fx_file_dir_entry)); in _fx_media_flush()
167 file_ptr -> fx_file_modified = FX_FALSE; in _fx_media_flush()
[all …]
Dfx_media_close.c99 FX_FILE *file_ptr; in _fx_media_close() local
124 file_ptr = media_ptr -> fx_media_opened_file_list; in _fx_media_close()
130 if ((file_ptr -> fx_file_open_mode == FX_OPEN_FOR_WRITE) && in _fx_media_close()
131 (file_ptr -> fx_file_modified)) in _fx_media_close()
138 file_ptr -> fx_file_dir_entry.fx_dir_entry_time = _fx_system_time; in _fx_media_close()
139 file_ptr -> fx_file_dir_entry.fx_dir_entry_date = _fx_system_date; in _fx_media_close()
145 file_ptr -> fx_file_dir_entry.fx_dir_entry_file_size = in _fx_media_close()
146 file_ptr -> fx_file_current_file_size; in _fx_media_close()
149 status = _fx_directory_entry_write(media_ptr, &(file_ptr -> fx_file_dir_entry)); in _fx_media_close()
166 file_ptr -> fx_file_modified = FX_FALSE; in _fx_media_close()
[all …]
Dfx_media_abort.c80 FX_FILE *file_ptr; in _fx_media_abort() local
105 file_ptr = media_ptr -> fx_media_opened_file_list; in _fx_media_abort()
110 file_ptr -> fx_file_id = FX_FILE_ABORTED_ID; in _fx_media_abort()
113 file_ptr = file_ptr -> fx_file_opened_next; in _fx_media_abort()
Dfxe_file_close.c72 UINT _fxe_file_close(FX_FILE *file_ptr) in _fxe_file_close() argument
79 if (file_ptr == FX_NULL) in _fxe_file_close()
88 status = _fx_file_close(file_ptr); in _fxe_file_close()
Dfxe_file_open.c77 UINT _fxe_file_open(FX_MEDIA *media_ptr, FX_FILE *file_ptr, CHAR *file_name, UINT open_type, UINT … in _fxe_file_open() argument
86 …if ((media_ptr == FX_NULL) || (media_ptr -> fx_media_id != FX_MEDIA_ID) || (file_ptr == FX_NULL) |… in _fxe_file_open()
113 if (file_ptr == current_file) in _fxe_file_open()
131 status = _fx_file_open(media_ptr, file_ptr, file_name, open_type); in _fxe_file_open()
Dfxe_file_extended_seek.c73 UINT _fxe_file_extended_seek(FX_FILE *file_ptr, ULONG64 byte_offset) in _fxe_file_extended_seek() argument
80 if (file_ptr == FX_NULL) in _fxe_file_extended_seek()
89 status = _fx_file_extended_seek(file_ptr, byte_offset); in _fxe_file_extended_seek()
Dfxe_file_extended_truncate.c73 UINT _fxe_file_extended_truncate(FX_FILE *file_ptr, ULONG64 size) in _fxe_file_extended_truncate() argument
80 if (file_ptr == FX_NULL) in _fxe_file_extended_truncate()
89 status = _fx_file_extended_truncate(file_ptr, size); in _fxe_file_extended_truncate()
Dfxe_file_truncate.c73 UINT _fxe_file_truncate(FX_FILE *file_ptr, ULONG size) in _fxe_file_truncate() argument
80 if (file_ptr == FX_NULL) in _fxe_file_truncate()
89 status = _fx_file_truncate(file_ptr, size); in _fxe_file_truncate()
Dfxe_file_seek.c73 UINT _fxe_file_seek(FX_FILE *file_ptr, ULONG byte_offset) in _fxe_file_seek() argument
80 if (file_ptr == FX_NULL) in _fxe_file_seek()
89 status = _fx_file_seek(file_ptr, byte_offset); in _fxe_file_seek()
Dfxe_file_extended_truncate_release.c74 UINT _fxe_file_extended_truncate_release(FX_FILE *file_ptr, ULONG64 size) in _fxe_file_extended_truncate_release() argument
81 if (file_ptr == FX_NULL) in _fxe_file_extended_truncate_release()
90 status = _fx_file_extended_truncate_release(file_ptr, size); in _fxe_file_extended_truncate_release()
Dfxe_file_allocate.c73 UINT _fxe_file_allocate(FX_FILE *file_ptr, ULONG size) in _fxe_file_allocate() argument
80 if (file_ptr == FX_NULL) in _fxe_file_allocate()
89 status = _fx_file_allocate(file_ptr, size); in _fxe_file_allocate()
Dfxe_file_extended_allocate.c73 UINT _fxe_file_extended_allocate(FX_FILE *file_ptr, ULONG64 size) in _fxe_file_extended_allocate() argument
80 if (file_ptr == FX_NULL) in _fxe_file_extended_allocate()
89 status = _fx_file_extended_allocate(file_ptr, size); in _fxe_file_extended_allocate()
Dfxe_file_truncate_release.c74 UINT _fxe_file_truncate_release(FX_FILE *file_ptr, ULONG size) in _fxe_file_truncate_release() argument
81 if (file_ptr == FX_NULL) in _fxe_file_truncate_release()
90 status = _fx_file_truncate_release(file_ptr, size); in _fxe_file_truncate_release()
Dfxe_file_write_notify_set.c76 UINT _fxe_file_write_notify_set(FX_FILE *file_ptr, VOID (*file_write_notify)(FX_FILE *file)) in _fxe_file_write_notify_set() argument
81 if (file_ptr == FX_NULL) in _fxe_file_write_notify_set()
90 status = _fx_file_write_notify_set(file_ptr, file_write_notify); in _fxe_file_write_notify_set()
/FileX-v6.2.1/common/inc/
Dfx_file.h58 UINT _fx_file_allocate(FX_FILE *file_ptr, ULONG size);
64 UINT _fx_file_best_effort_allocate(FX_FILE *file_ptr, ULONG size, ULONG *actual_size_allocated);
65 UINT _fx_file_close(FX_FILE *file_ptr);
70 UINT _fx_file_open(FX_MEDIA *media_ptr, FX_FILE *file_ptr, CHAR *file_name,
72 UINT _fx_file_read(FX_FILE *file_ptr, VOID *buffer_ptr, ULONG request_size, ULONG *actual_size);
74 UINT _fx_file_relative_seek(FX_FILE *file_ptr, ULONG byte_offset, UINT seek_from);
80 UINT _fx_file_seek(FX_FILE *file_ptr, ULONG byte_offset);
81 UINT _fx_file_truncate(FX_FILE *file_ptr, ULONG size);
82 UINT _fx_file_truncate_release(FX_FILE *file_ptr, ULONG size);
88 UINT _fx_file_write(FX_FILE *file_ptr, VOID *buffer_ptr, ULONG size);
[all …]

12