lc15-mgr: update parameter read/write

Better match upstream lc15 code:
* fsync on parameter write
* use permanent storage directly for parameters

Change-Id: Iac150bf2ebffc5fa9544b0f3b19cd647996fc8b6
Related: SYS#3728
This commit is contained in:
Max 2017-07-18 14:07:33 +02:00
parent f690e5d45c
commit 173a4f1f79
2 changed files with 4 additions and 1 deletions

View File

@ -130,6 +130,8 @@ int lc15bts_par_set_int(void *ctx, enum lc15bts_par par, int val)
fclose(fp);
return -EIO;
}
fsync(fp);
fclose(fp);
return 0;
}
@ -161,6 +163,7 @@ int lc15bts_par_set_buf(void *ctx, enum lc15bts_par par, const uint8_t *buf, uns
rc = fwrite(buf, 1, size, fp);
fsync(fp);
fclose(fp);
return rc;

View File

@ -4,7 +4,7 @@
#include <osmocom/core/utils.h>
#define FACTORY_ROM_PATH "/mnt/rom/factory"
#define USER_ROM_PATH "/mnt/rom/user"
#define USER_ROM_PATH "/mnt/storage/var/run/lc15bts-mgr"
enum lc15bts_par {
LC15BTS_PAR_TEMP_SUPPLY_MAX,