From 294b975335d4d4fab75813607c2b2069e7be73d8 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 7 Jun 2023 12:38:55 +1000 Subject: [PATCH] AP_Filesystem: correct detection of feature AP_FILESYSTEM_FORMAT_ENABLED --- libraries/AP_Filesystem/AP_Filesystem.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libraries/AP_Filesystem/AP_Filesystem.cpp b/libraries/AP_Filesystem/AP_Filesystem.cpp index b7a1cf79af..224fd42d0d 100644 --- a/libraries/AP_Filesystem/AP_Filesystem.cpp +++ b/libraries/AP_Filesystem/AP_Filesystem.cpp @@ -285,26 +285,20 @@ bool AP_Filesystem::fgets(char *buf, uint8_t buflen, int fd) return true; } +#if AP_FILESYSTEM_FORMAT_ENABLED // format filesystem bool AP_Filesystem::format(void) { -#if AP_FILESYSTEM_FORMAT_ENABLED if (hal.util->get_soft_armed()) { return false; } return LOCAL_BACKEND.fs.format(); -#else - return false; -#endif } AP_Filesystem_Backend::FormatStatus AP_Filesystem::get_format_status(void) const { -#if AP_FILESYSTEM_FORMAT_ENABLED return LOCAL_BACKEND.fs.get_format_status(); -#else - return AP_Filesystem_Backend::FormatStatus::NOT_STARTED; -#endif } +#endif namespace AP {