mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
flashfs32: fix result handling (#24371)
We need to translate return values here, otherwise this complains being unsuccessful when it was actually ok.
This commit is contained in:
parent
b5f37c9fa6
commit
d4509a6cd4
@ -1128,6 +1128,11 @@ int parameter_flashfs_init(sector_descriptor_t *fconfig, uint8_t *buffer, uint16
|
||||
if (pf == NULL) {
|
||||
// Parameters can't be found, assume sector is corrupt or empty
|
||||
rv = parameter_flashfs_erase();
|
||||
|
||||
// A positive return value means flash space has been erased successfully.
|
||||
if (rv > 0) {
|
||||
rv = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user