Made parameter error messages pickier

This commit is contained in:
Lorenz Meier 2012-09-07 14:50:28 +02:00
parent 1538247a72
commit 2b9f3a4845
1 changed files with 3 additions and 3 deletions

View File

@ -189,9 +189,9 @@ static int mavlink_pm_save_eeprom()
int result = param_export(fd, false);
close(fd);
if (result < 0) {
if (result != 0) {
unlink(mavlink_parameter_file);
warn("error exporting parameters to '%s'", mavlink_parameter_file);
warn(result, "error exporting parameters to '%s'", mavlink_parameter_file);
return -2;
}
@ -218,7 +218,7 @@ mavlink_pm_load_eeprom()
int result = param_load(fd);
close(fd);
if (result < 0) {
if (result != 0) {
warn("error reading parameters from '%s'", mavlink_parameter_file);
return -2;
}