[PATCH] osmo-bts[master]: lc15-mgr: update parameter read/write

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Tue Jul 18 12:08:53 UTC 2017


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
---
M src/osmo-bts-litecell15/misc/lc15bts_par.c
M src/osmo-bts-litecell15/misc/lc15bts_par.h
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/72/3272/2

diff --git a/src/osmo-bts-litecell15/misc/lc15bts_par.c b/src/osmo-bts-litecell15/misc/lc15bts_par.c
index ab3e96b..13b0080 100644
--- a/src/osmo-bts-litecell15/misc/lc15bts_par.c
+++ b/src/osmo-bts-litecell15/misc/lc15bts_par.c
@@ -130,6 +130,8 @@
 		fclose(fp);
 		return -EIO;
 	}
+
+	fsync(fp);
 	fclose(fp);
 	return 0;
 }
@@ -161,6 +163,7 @@
 
         rc = fwrite(buf, 1, size, fp);
 
+        fsync(fp);
         fclose(fp);
 
         return rc;
diff --git a/src/osmo-bts-litecell15/misc/lc15bts_par.h b/src/osmo-bts-litecell15/misc/lc15bts_par.h
index b9fe740..dd869d3 100644
--- a/src/osmo-bts-litecell15/misc/lc15bts_par.h
+++ b/src/osmo-bts-litecell15/misc/lc15bts_par.h
@@ -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,

-- 
To view, visit https://gerrit.osmocom.org/3272
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iac150bf2ebffc5fa9544b0f3b19cd647996fc8b6
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list