logger:log_writer_file Do not try to store ulog name on systems without hardfault logging

This commit is contained in:
David Sidrane
2021-09-29 13:08:25 -07:00
committed by Daniel Agar
parent f56701e72f
commit 25a27d26e0
+1 -1
View File
@@ -254,7 +254,7 @@ void LogWriterFile::start_log(LogType type, const char *filename)
int LogWriterFile::hardfault_store_filename(const char *log_file)
{
#ifdef __PX4_NUTTX
#if defined(__PX4_NUTTX) && defined(px4_savepanic)
int fd = open(HARDFAULT_ULOG_PATH, O_TRUNC | O_WRONLY | O_CREAT);
if (fd < 0) {