AP_Filesystem: enable filesystem format on all boards

this works in ChibiOS 21.xx
This commit is contained in:
Andrew Tridgell 2023-06-03 17:25:53 +10:00
parent 6f469c48e7
commit 2703928fb2

View File

@ -51,12 +51,7 @@ struct dirent {
#include <unistd.h> #include <unistd.h>
#ifndef AP_FILESYSTEM_FORMAT_ENABLED #ifndef AP_FILESYSTEM_FORMAT_ENABLED
// only enable for SDMMC filesystems for now as other types can't query #define AP_FILESYSTEM_FORMAT_ENABLED 1
// block size
#ifndef HAL_USE_SDMMC
#define HAL_USE_SDMMC 0
#endif
#define AP_FILESYSTEM_FORMAT_ENABLED HAL_USE_SDMMC
#endif #endif
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_SITL
@ -69,10 +64,6 @@ struct dirent {
#include "AP_Filesystem_backend.h" #include "AP_Filesystem_backend.h"
#ifndef AP_FILESYSTEM_FORMAT_ENABLED
#define AP_FILESYSTEM_FORMAT_ENABLED 0
#endif
class AP_Filesystem { class AP_Filesystem {
private: private:
struct DirHandle { struct DirHandle {