parameters: perform verification pass twice

- on NuttX with MTD storage this is to ensure we are verifying what's
actually stored on ramtron or eeprom, not just what's cached by bchlib
This commit is contained in:
Daniel Agar
2022-01-17 10:49:38 -05:00
parent cdb6a437a0
commit ece09064c4
3 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2012-2021 PX4 Development Team. All rights reserved.
* Copyright (c) 2012-2022 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -1212,7 +1212,7 @@ int param_save_default()
if (res == PX4_OK) {
// reopen file to verify
int fd_verify = ::open(filename, O_RDONLY, PX4_O_MODE_666);
res = param_verify(fd_verify);
res = param_verify(fd_verify) || lseek(fd_verify, 0, SEEK_SET) || param_verify(fd_verify);
::close(fd_verify);
}
}