mirror of https://github.com/ArduPilot/ardupilot
AP_Filesystem: raise an internal error for fileop on main thread
#ecoefi.log
This commit is contained in:
parent
40a463f60c
commit
207f38dfaf
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "AP_Filesystem_Available.h"
|
||||
|
||||
#include <AP_InternalError/AP_InternalError.h>
|
||||
|
||||
// returned structure from a load_file() call
|
||||
class FileData {
|
||||
public:
|
||||
|
@ -84,4 +86,9 @@ protected:
|
|||
bool file_op_allowed(void) const;
|
||||
};
|
||||
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
#define FS_CHECK_ALLOWED(retfail) do { if (!file_op_allowed()) { INTERNAL_ERROR(AP_InternalError::error_t::flow_of_control); return retfail; } } while(0)
|
||||
#else
|
||||
#define FS_CHECK_ALLOWED(retfail) do { if (!file_op_allowed()) { return retfail; } } while(0)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue