Updated copyright headers and removed revision history

* Updated version number constants

* Updated copyright headers and removed revision history
This commit is contained in:
Frédéric Desbiens
2026-03-05 08:39:33 +01:00
committed by GitHub
parent dfe5084ab8
commit 61b0b06c3e
372 changed files with 14882 additions and 16676 deletions
@@ -1,6 +1,6 @@
/* In this test point: */
/* Send null pointer to generate an error in fxe_fault_tolerant_enable */
/* Register an invalid cluster number for fault_tolerant log file and enable the Fault-tolerant feature. */
/* Register an invalid cluster number for fault_tolerant log file and enable the Fault-tolerant feature. */
/* Register an invalid cluster number for fault_tolerant log file and enable the Fault-tolerant feature, but 0xffffffff this time. */
/* Enable fault tolerant and make an IO ERROR while reading the FAT entry log file. */
/* Enable fault tolerant and make an IO ERROR while reading log file. */
@@ -18,15 +18,15 @@
#include "tx_thread.h"
#include "tx_timer.h"
#endif
#include "fx_api.h"
#include "fx_api.h"
#include "fx_utility.h"
#include "fx_fault_tolerant.h"
#include <stdio.h>
#include <string.h>
#include "fx_ram_driver_test.h"
#include "fx_ram_driver_test.h"
extern void test_control_return(UINT status);
void filex_fault_tolerant_enable_1_test_application_define(void *first_unused_memory);
#if defined (FX_ENABLE_FAULT_TOLERANT) && defined (FX_FAULT_TOLERANT)
#define DEMO_STACK_SIZE 4096
@@ -56,9 +56,9 @@ static UCHAR fault_tolerant_buffer[FAULT_TOLERANT_SIZE];
/* Define thread prototypes. */
static void ftest_0_entry(ULONG thread_input);
static void ftest_0_entry(ULONG thread_input);
extern void _fx_ram_driver(FX_MEDIA *media_ptr);
extern void test_control_return(UINT status);
extern void test_control_return(UINT status);
/* Define what the initial system looks like. */
@@ -71,20 +71,20 @@ void filex_fault_tolerant_enable_1_test_application_define(void *first_unused
{
#ifndef FX_STANDALONE_ENABLE
/* Setup the working pointer. */
pointer = (UCHAR *) first_unused_memory;
/* Create the main thread. */
tx_thread_create(&ftest_0, "thread 0", ftest_0_entry, 0,
pointer, DEMO_STACK_SIZE,
tx_thread_create(&ftest_0, "thread 0", ftest_0_entry, 0,
pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
pointer = pointer + DEMO_STACK_SIZE;
/* Setup memory for the RAM disk and the sector cache. */
/* Setup memory for the RAM disk and the sector cache. */
cache_buffer = pointer;
pointer += CACHE_SIZE;
fault_tolerant_buffer = pointer;
@@ -97,7 +97,7 @@ void filex_fault_tolerant_enable_1_test_application_define(void *first_unused
ftest_0_entry(0);
#endif
}
/* Define the test threads. */
@@ -105,7 +105,7 @@ static void ftest_0_entry(ULONG thread_input)
{
UINT status;
UCHAR buffer[2048];
UCHAR buffer[2048];
ULONG clusters;
ULONG bytes_per_cluster;
FX_FILE my_file;
@@ -115,22 +115,22 @@ FX_LOCAL_PATH local_path;
/* Print out some test information banners. */
printf("FileX Test: Fault Tolerant Enable 1 Test...........................");
/* Format the media with FAT16. This needs to be done before opening it! */
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
ram_disk_memory_large, // RAM disk memory pointer
cache_buffer, // Media buffer pointer
CACHE_SIZE, // Media buffer size
CACHE_SIZE, // Media buffer size
"MY_RAM_DISK", // Volume Name
1, // Number of FATs
32, // Directory Entries
0, // Hidden sectors
4200 * 8, // Total sectors
256, // Sector size
4200 * 8, // Total sectors
256, // Sector size
8, // Sectors per cluster
1, // Heads
1); // Sectors per track
1); // Sectors per track
status += fx_media_open(&ram_disk, "RAM DISK", _fx_ram_driver, ram_disk_memory_large, cache_buffer, CACHE_SIZE);
return_if_fail( status == FX_SUCCESS);
@@ -147,7 +147,7 @@ FX_LOCAL_PATH local_path;
#endif /* FX_DISABLE_ERROR_CHECKING */
/* Register an invalid cluster number for fault_tolerant log file and enable the Fault-tolerant feature. */
/* Register an invalid cluster number for fault_tolerant log file and enable the Fault-tolerant feature. */
_fx_utility_32_unsigned_write((UCHAR *)ram_disk.fx_media_driver_info + FX_FAULT_TOLERANT_BOOT_INDEX, (ULONG)1);
status = fx_fault_tolerant_enable(&ram_disk, fault_tolerant_buffer, FAULT_TOLERANT_SIZE);
return_if_fail( status == FX_SUCCESS);
@@ -156,20 +156,20 @@ FX_LOCAL_PATH local_path;
return_if_fail( status == FX_SUCCESS);
/* Format the media with FAT16. This needs to be done before opening it! */
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
ram_disk_memory_large, // RAM disk memory pointer
cache_buffer, // Media buffer pointer
CACHE_SIZE, // Media buffer size
CACHE_SIZE, // Media buffer size
"MY_RAM_DISK", // Volume Name
1, // Number of FATs
32, // Directory Entries
0, // Hidden sectors
4200 * 8, // Total sectors
256, // Sector size
4200 * 8, // Total sectors
256, // Sector size
8, // Sectors per cluster
1, // Heads
1); // Sectors per track
1); // Sectors per track
status += fx_media_open(&ram_disk, "RAM DISK", _fx_ram_driver, ram_disk_memory_large, cache_buffer, CACHE_SIZE);
return_if_fail( status == FX_SUCCESS);
@@ -182,20 +182,20 @@ FX_LOCAL_PATH local_path;
return_if_fail( status == FX_SUCCESS);
/* Format the media with FAT16. This needs to be done before opening it! */
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
ram_disk_memory_large, // RAM disk memory pointer
cache_buffer, // Media buffer pointer
CACHE_SIZE, // Media buffer size
CACHE_SIZE, // Media buffer size
"MY_RAM_DISK", // Volume Name
1, // Number of FATs
32, // Directory Entries
0, // Hidden sectors
4200 * 8, // Total sectors
256, // Sector size
4200 * 8, // Total sectors
256, // Sector size
12, // Sectors per cluster
1, // Heads
1); // Sectors per track
1); // Sectors per track
status += fx_media_open(&ram_disk, "RAM DISK", _fx_ram_driver, ram_disk_memory_large, cache_buffer, CACHE_SIZE);
return_if_fail( status == FX_SUCCESS);
@@ -209,20 +209,20 @@ FX_LOCAL_PATH local_path;
return_if_fail( status == FX_SUCCESS);
/* Format the media with FAT16 and enable fault tolerant. */
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
ram_disk_memory_large, // RAM disk memory pointer
cache_buffer, // Media buffer pointer
CACHE_SIZE, // Media buffer size
CACHE_SIZE, // Media buffer size
"MY_RAM_DISK", // Volume Name
1, // Number of FATs
32, // Directory Entries
0, // Hidden sectors
4200 * 8, // Total sectors
256, // Sector size
4200 * 8, // Total sectors
256, // Sector size
8, // Sectors per cluster
1, // Heads
1); // Sectors per track
1); // Sectors per track
status += fx_media_open( &ram_disk, "RAM DISK", _fx_ram_driver, ram_disk_memory_large, cache_buffer, CACHE_SIZE);
status += fx_fault_tolerant_enable(&ram_disk, fault_tolerant_buffer, FAULT_TOLERANT_SIZE);
status += fx_media_close( &ram_disk);
@@ -251,20 +251,20 @@ FX_LOCAL_PATH local_path;
return_if_fail( status == FX_SUCCESS);
/* Format the media with FAT16 and enable fault tolerant. */
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
ram_disk_memory_large, // RAM disk memory pointer
cache_buffer, // Media buffer pointer
CACHE_SIZE, // Media buffer size
CACHE_SIZE, // Media buffer size
"MY_RAM_DISK", // Volume Name
1, // Number of FATs
32, // Directory Entries
0, // Hidden sectors
4200 * 8, // Total sectors
256, // Sector size
4200 * 8, // Total sectors
256, // Sector size
8, // Sectors per cluster
1, // Heads
1); // Sectors per track
1); // Sectors per track
status += fx_media_open( &ram_disk, "RAM DISK", _fx_ram_driver, ram_disk_memory_large, cache_buffer, CACHE_SIZE);
status += fx_fault_tolerant_enable(&ram_disk, fault_tolerant_buffer, FAULT_TOLERANT_SIZE);
status += fx_media_close( &ram_disk);
@@ -303,20 +303,20 @@ FX_LOCAL_PATH local_path;
return_if_fail( status == FX_SUCCESS);
/* Format the media with FAT16 and enable fault tolerant. */
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
ram_disk_memory_large, // RAM disk memory pointer
cache_buffer, // Media buffer pointer
CACHE_SIZE, // Media buffer size
CACHE_SIZE, // Media buffer size
"MY_RAM_DISK", // Volume Name
1, // Number of FATs
32, // Directory Entries
0, // Hidden sectors
4200 * 8, // Total sectors
256, // Sector size
4200 * 8, // Total sectors
256, // Sector size
8, // Sectors per cluster
1, // Heads
1); // Sectors per track
1); // Sectors per track
status += fx_media_open( &ram_disk, "RAM DISK", _fx_ram_driver, ram_disk_memory_large, cache_buffer, CACHE_SIZE);
return_if_fail( status == FX_SUCCESS);
@@ -346,20 +346,20 @@ FX_LOCAL_PATH local_path;
return_if_fail( status == FX_SUCCESS);
/* Format the media with FAT16 and enable fault tolerant. */
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
ram_disk_memory_large, // RAM disk memory pointer
cache_buffer, // Media buffer pointer
CACHE_SIZE, // Media buffer size
CACHE_SIZE, // Media buffer size
"MY_RAM_DISK", // Volume Name
1, // Number of FATs
32, // Directory Entries
0, // Hidden sectors
4200 * 8, // Total sectors
256, // Sector size
4200 * 8, // Total sectors
256, // Sector size
8, // Sectors per cluster
1, // Heads
1); // Sectors per track
1); // Sectors per track
status += fx_media_open( &ram_disk, "RAM DISK", _fx_ram_driver, ram_disk_memory_large, cache_buffer, CACHE_SIZE);
return_if_fail( status == FX_SUCCESS);
@@ -397,20 +397,20 @@ FX_LOCAL_PATH local_path;
return_if_fail( status == FX_SUCCESS);
/* Format the media with FAT16 and enable fault tolerant. */
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
ram_disk_memory_large, // RAM disk memory pointer
cache_buffer, // Media buffer pointer
CACHE_SIZE, // Media buffer size
CACHE_SIZE, // Media buffer size
"MY_RAM_DISK", // Volume Name
1, // Number of FATs
32, // Directory Entries
0, // Hidden sectors
4200 * 8, // Total sectors
256, // Sector size
4200 * 8, // Total sectors
256, // Sector size
8, // Sectors per cluster
1, // Heads
1); // Sectors per track
1); // Sectors per track
status += fx_media_open( &ram_disk, "RAM DISK", _fx_ram_driver, ram_disk_memory_large, cache_buffer, CACHE_SIZE);
return_if_fail( status == FX_SUCCESS);
@@ -440,20 +440,20 @@ FX_LOCAL_PATH local_path;
return_if_fail( status == FX_SUCCESS);
/* Enable fault tolerant with buffer size larger than required. */
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
status = fx_media_format(&ram_disk,
_fx_ram_driver, // Driver entry
ram_disk_memory_large, // RAM disk memory pointer
cache_buffer, // Media buffer pointer
CACHE_SIZE, // Media buffer size
CACHE_SIZE, // Media buffer size
"MY_RAM_DISK", // Volume Name
1, // Number of FATs
32, // Directory Entries
0, // Hidden sectors
4200 * 8, // Total sectors
256, // Sector size
4200 * 8, // Total sectors
256, // Sector size
4, // Sectors per cluster
1, // Heads
1); // Sectors per track
1); // Sectors per track
/* Create files in a subdir to fill user data area. */
status += fx_media_open( &ram_disk, "RAM DISK", _fx_ram_driver, ram_disk_memory_large, cache_buffer, CACHE_SIZE);
@@ -467,12 +467,12 @@ FX_LOCAL_PATH local_path;
status = fx_media_close( &ram_disk);
return_if_fail( status == FX_SUCCESS);
/* Output successful. */
/* Output successful. */
printf("SUCCESS!\n");
test_control_return(0);
}
}
#else
#else
#ifdef CTEST
void test_application_define(void *first_unused_memory)
@@ -480,11 +480,11 @@ void test_application_define(void *first_unused_memory)
void filex_fault_tolerant_enable_1_test_application_define(void *first_unused_memory)
#endif
{
FX_PARAMETER_NOT_USED(first_unused_memory);
/* Print out some test information banners. */
printf("FileX Test: Fault Tolerant Enable 1 Test...........................N/A\n");
printf("FileX Test: Fault Tolerant Enable 1 Test...........................N/A\n");
test_control_return(255);
}