15 Commits
Author SHA1 Message Date
Frédéric DesbiensandCopilot 3a17b07bf5 Flagged six FileX APIs as deprecated (#95)
Added #pragma message compile-time warnings and updated DESCRIPTION
blocks in:
  - fx_directory_long_name_get      -> use _extended (buffer size)
  - fx_directory_short_name_get     -> use _extended (buffer size)
  - fx_media_volume_get             -> use _extended (buffer size)
  - fx_unicode_length_get           -> use _extended (buffer size)
  - fx_unicode_name_get             -> use _extended (buffer size)
  - fx_unicode_short_name_get       -> use _extended (buffer size)

All six functions omit a destination buffer length parameter and use a
fixed or hardcoded limit, which can cause buffer overruns in the caller.
The corresponding _extended variants accept an explicit buffer size and
must be used instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-28 11:06:42 -04:00
Frédéric DesbiensandCopilot 7cbe022bab Added Win64/VS 2022 port for FileX (#94)
- New port: ports/win64/vs_2022/inc/fx_port.h
  - Based on the Win32 port; updated ALIGN_TYPE to ULONG64 for 64-bit
    pointers, added FX_REGRESSION_TEST hooks from the Linux port, and
    bumped the port name string to Win64/Visual.
- New CMake infrastructure: ports/win64/vs_2022/CMakeLists.txt
  - Exposes only the inc/ directory (port is header-only).
- Updated test/cmake/CMakeLists.txt
  - Added MSVC guards: skip -m32 / GCC coverage flags; locate VS 2022
    toolchain; build ThreadX from source alongside FileX via
    THREADX_SOURCE_DIR.
- Updated test/cmake/regression/CMakeLists.txt
  - Added MSVC-compatible compile options (/W3 /Zi instead of -Wall
    -fprofile-arcs); added win64_compat include path for standalone +
    MSVC builds; added per-test TIMEOUT overrides for the two inherently
    long-running fault-tolerant tests on Windows.
- Updated test/cmake/samples/CMakeLists.txt
  - Added MSVC-compatible flag handling.
- New PowerShell scripts: scripts/build_fx.ps1, scripts/test_fx.ps1,
  scripts/fx_windows_common.ps1
  - Support all 9 build configurations; -Clean, -Config, -Verbose flags;
    modelled on the ThreadX Win64 build/test scripts.
- New Windows compatibility shims for standalone builds:
  test/regression_test/win64_compat/pthread.h
  test/regression_test/win64_compat/unistd.h
  - Minimal pthreads (CreateThread / WaitForSingleObject / TerminateThread)
    and usleep (Sleep) shims so standalone test files compile on MSVC.
- Fixed test/regression_test/fx_ram_driver_test.c and .h
  - RAM driver: added bounds check so out-of-range sector READs use a
    safe scratch buffer instead of segfaulting.
  - MSVC: large test buffers (ram_disk_memory_large, large_data_buffer,
    and standalone-mode ram_disk_memory / ram_disk_memory1) moved from
    BSS to calloc() via a .CRT\ constructor.  This avoids the MSVC
    PE image 2 GB hard limit (LNK1248) and eliminates demand-zero page-
    fault overhead that would otherwise slow the test suite.
- Bulk-fixed 93 fault-tolerant test files
  - [FAULT_TOLERANT_SIZE] -> [FAULT_TOLERANT_SIZE > 0 ? FAULT_TOLERANT_SIZE : 1]
    so that MSVC C2466 (zero-length array) is not triggered when
    FX_ENABLE_FAULT_TOLERANT is not defined.
- Fixed filextestcontrol.c: standalone test runner thread exit
  - The Win64 pthread shim makes pthread_exit() a no-op so that
    test_control_thread_entry() proceeds to exit(failed_tests),
    giving ctest the correct process exit code.
- Fixed common/src/fx_utility_logical_sector_write.c
  - Added missing bounds guard to prevent sector-write past end of
    RAM disk during fault-tolerant interrupt simulation tests.

All 9 build configurations pass 136/136 regression tests on Win64/VS 2022.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-15 13:15:22 -04:00
Frédéric DesbiensandCopilot c3e1f15536 Release 6.5.1.202602 preparation (#91)
* Updated version number constants

* Updated port version strings

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-04 17:15:54 -04:00
Frédéric DesbiensandCopilot edc2427de6 Fixed flush call in fx_media_format to mirror fx_media_close pattern
- Added blank line after #ifndef FX_MEDIA_STATISTICS_DISABLE for style consistency
- Used local driver variable instead of media_ptr->fx_media_driver_entry
- Removed early return on flush failure so FX_DRIVER_UNINIT is always
  called after FX_DRIVER_INIT, preventing driver resource leaks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-02 11:42:41 -04:00
Thomas Friedel 339082886f Add flush call to fx_media_format
Adds a call to the I/O driver with FX_DRIVER_FLUSH to fx_media_format()
before uninitializing the driver.

Fixes Issue #88
2026-03-16 15:59:29 +01:00
Frédéric Desbiens 61b0b06c3e Updated copyright headers and removed revision history
* Updated version number constants

* Updated copyright headers and removed revision history
2026-03-05 08:39:33 +01:00
Jonathan Blanchard dfe5084ab8 Fixed potential file system corruption when truncating or overwriting file data with fault tolerant mode enabled (#78)
* _fx_fault_tolerant_cleanup_FAT_chain(): Add checks to prevent starting a new cluster deletion session in some corner cases where the end of the chain is reached.

* Fixed formatting of previous commit.
2026-02-10 09:31:41 -05:00
Frédéric Desbiens 1839526557 Updated version number constants 2026-01-12 17:44:19 -05:00
Haithem Rahmani 853f8a2431 Update media driver status initialization FX_DRIVER_INIT request
Main Changes
------------
- In fx_media_format(), set fx_media_driver_status to FX_MEDIA_INVALID
  to indicate the request originates from a format call.

- In fx_media_open(), set fx_media_driver_status to FX_MEDIA_NOT_OPEN
   to indicate the request originates from an open call.

Fixed issues
-------------
-Issue #79

Signed-off-by: Haithem Rahmani <haithem.rahmani@st.com>
2025-11-27 14:31:38 +01:00
Frédéric Desbiens 584c5fff0d Updated version number and added build number and hotfix. 2025-09-29 11:57:21 +01:00
nflandin 151b9158ee re: issue 47 by coran21
Correction of FSINFO trail signature in format function
2024-09-03 15:05:19 -07:00
nflandin ee280d9d14 Update fx_media_format.c
Correction to boot record signature writing; attempted to bring in line with design intent of variable length boot record as used earlier in function.
2024-06-21 10:50:48 -07:00
TiejunZhou 9173c4eb43 Update version number to 6.4.1 2024-02-27 06:32:42 +00:00
Bo Chen (from Dev Box) 8c3b71832c Update copyright. 2024-01-29 13:57:34 +08:00
TiejunZhou 14884808b5 Transition FileX to Eclipse Fundation 2024-01-02 07:35:14 +00:00