[PATCH] osmo-bts[master]: lc15-mgr: update parameter 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:05:49 UTC 2017


Review at  https://gerrit.osmocom.org/3272

lc15-mgr: update parameter write

Better match upstream lc15 code:
* fsync on parameter write
* use runtime dir for parameter storage

Change-Id: Iac150bf2ebffc5fa9544b0f3b19cd647996fc8b6
Related: SYS#3728
---
M contrib/sysmobts-mgr.service
M src/osmo-bts-litecell15/misc/lc15bts_par.c
M src/osmo-bts-litecell15/misc/lc15bts_par.h
3 files changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/contrib/sysmobts-mgr.service b/contrib/sysmobts-mgr.service
index 182e306..f5e244e 100644
--- a/contrib/sysmobts-mgr.service
+++ b/contrib/sysmobts-mgr.service
@@ -9,4 +9,3 @@
 
 [Install]
 WantedBy=multi-user.target
-
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: newchange
Gerrit-Change-Id: Iac150bf2ebffc5fa9544b0f3b19cd647996fc8b6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list