mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 10:37:35 +08:00
sd_bench: print errno on write failure
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/module.h>
|
||||
@@ -226,7 +227,7 @@ void write_test(int fd, sdb_config_t *cfg, uint8_t *block, int block_size)
|
||||
}
|
||||
|
||||
if ((int)written != block_size) {
|
||||
PX4_ERR("Write error");
|
||||
PX4_ERR("Write error: %d", errno);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user