Author SHA1 Message Date
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 0462b027a1 Merge pull request #83 from spir6s/master
Provided ports for Renesas RXv1/GNU, RXv2/GNU and RXv3/GNU
2026-02-05 11:00:52 -05:00
Frédéric Desbiens 1839526557 Updated version number constants 2026-01-12 17:44:19 -05:00
Sebastian Paarz 1f3d7aec33 Merge remote-tracking branch 'github/master' 2026-01-09 17:41:50 +01:00
Frédéric Desbiens 693d5f7964 Merge pull request #81 from rahmanih/fix_issue_79
Update media driver status initialization FX_DRIVER_INIT request
2025-11-27 17:31:30 -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
Sebastian Paarz 5aa3aa40f1 Added gnu folders for RX ports 2025-03-11 23:54:03 +01:00
Sebastian Paarz d43d5bddbb Added missing RX ports 2025-03-11 22:51:42 +01:00
10 changed files with 121 additions and 10 deletions
+3 -3
View File
@@ -138,9 +138,9 @@ extern "C" {
#define AZURE_RTOS_FILEX
#define FILEX_MAJOR_VERSION 6
#define FILEX_MINOR_VERSION 4
#define FILEX_PATCH_VERSION 2
#define FILEX_BUILD_VERSION 202503
#define FILEX_HOTFIX_VERSION ''
#define FILEX_PATCH_VERSION 5
#define FILEX_BUILD_VERSION 202504
#define FILEX_HOTFIX_VERSION ' '
/* Define the following symbols for backward compatibility */
#define EL_PRODUCT_FILEX
@@ -207,7 +207,7 @@ ULONG last_FAT_sector;
/* At this point, the head_cluster points to the cluster chain that is to be removed. */
/* Tail cluster points to the back of the origianal FAT chain where the new chain is attached to.
/* Tail cluster points to the back of the original FAT chain where the new chain is attached to.
The remove process terminates once this cluster is encountered. */
tail_cluster = _fx_utility_32_unsigned_read((UCHAR *)&FAT_chain -> fx_fault_tolerant_FAT_chain_insertion_back);
@@ -262,7 +262,11 @@ ULONG last_FAT_sector;
{
if (head_cluster == next_session || next_session == FX_FREE_CLUSTER)
{
next_session = next_cluster;
/* Do not start another session if this is the end of the chain. */
if (next_cluster != tail_cluster)
{
next_session = next_cluster;
}
}
break;
}
@@ -277,7 +281,11 @@ ULONG last_FAT_sector;
/* Get next session. */
if (cache_count == cache_max)
{
next_session = next_cluster;
/* Do not start another session if this is the end of the chain. */
if (next_cluster != tail_cluster)
{
next_session = next_cluster;
}
}
/* Update head cluster and next session into log file. */
+4 -2
View File
@@ -161,9 +161,11 @@ UINT sectors_per_fat, f, s;
media_ptr -> fx_media_hidden_sectors = hidden_sectors;
/* Initialize the supplied media I/O driver. First, build the
initialize driver request. */
initialize driver request. Set the fx_media_driver_status to FX_MEDIA_INVALID
to let the driver know that the request is issued from a fx_media_format() call
*/
media_ptr -> fx_media_driver_request = FX_DRIVER_INIT;
media_ptr -> fx_media_driver_status = FX_IO_ERROR;
media_ptr -> fx_media_driver_status = FX_MEDIA_INVALID;
media_ptr -> fx_media_driver_info = driver_info_ptr;
media_ptr -> fx_media_driver_write_protect = FX_FALSE;
media_ptr -> fx_media_driver_free_sector_update = FX_FALSE;
+4 -2
View File
@@ -261,9 +261,11 @@ FX_INT_SAVE_AREA
FX_TRACE_IN_LINE_INSERT(FX_TRACE_MEDIA_OPEN, media_ptr, media_driver, memory_ptr, memory_size, FX_TRACE_MEDIA_EVENTS, 0, 0)
/* Initialize the supplied media I/O driver. First, build the
initialize driver request. */
initialize driver request. Set the fx_media_driver_status to FX_MEDIA_NOT_OPEN
to let the driver understand that the request is issued from a fx_media_open() call.
*/
media_ptr -> fx_media_driver_request = FX_DRIVER_INIT;
media_ptr -> fx_media_driver_status = FX_IO_ERROR;
media_ptr -> fx_media_driver_status = FX_MEDIA_NOT_OPEN;
media_ptr -> fx_media_driver_info = driver_info_ptr;
media_ptr -> fx_media_driver_write_protect = FX_FALSE;
media_ptr -> fx_media_driver_free_sector_update = FX_FALSE;
+9
View File
@@ -0,0 +1,9 @@
target_sources(${PROJECT_NAME} PRIVATE
# {{BEGIN_TARGET_SOURCES}}
# {{END_TARGET_SOURCES}}
)
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/inc
)
+24
View File
@@ -0,0 +1,24 @@
/***************************************************************************
* Copyright (c) 2024 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
*
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** FileX Component */
/** */
/** Port Specific */
/** */
/**************************************************************************/
/**************************************************************************/
/* Include the generic version of fx_port.h. */
#include "../../../generic/inc/fx_port.h"
+9
View File
@@ -0,0 +1,9 @@
target_sources(${PROJECT_NAME} PRIVATE
# {{BEGIN_TARGET_SOURCES}}
# {{END_TARGET_SOURCES}}
)
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/inc
)
+24
View File
@@ -0,0 +1,24 @@
/***************************************************************************
* Copyright (c) 2024 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
*
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** FileX Component */
/** */
/** Port Specific */
/** */
/**************************************************************************/
/**************************************************************************/
/* Include the generic version of fx_port.h. */
#include "../../../generic/inc/fx_port.h"
+9
View File
@@ -0,0 +1,9 @@
target_sources(${PROJECT_NAME} PRIVATE
# {{BEGIN_TARGET_SOURCES}}
# {{END_TARGET_SOURCES}}
)
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/inc
)
+24
View File
@@ -0,0 +1,24 @@
/***************************************************************************
* Copyright (c) 2024 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
*
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** FileX Component */
/** */
/** Port Specific */
/** */
/**************************************************************************/
/**************************************************************************/
/* Include the generic version of fx_port.h. */
#include "../../../generic/inc/fx_port.h"