Change in osmo-bts[master]: oc2g: fsync requires fd instead of file stream

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Tue Feb 19 22:48:26 UTC 2019


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/12970


Change subject: oc2g: fsync requires fd instead of file stream
......................................................................

oc2g: fsync requires fd instead of file stream

Similar fix was done for lc15 in a8041edb.

Change-Id: Idcd9dc48ea2e1f80bfdf5cf8b6bf55d8150fe0d2
---
M src/osmo-bts-oc2g/misc/oc2gbts_par.c
1 file changed, 3 insertions(+), 3 deletions(-)



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

diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_par.c b/src/osmo-bts-oc2g/misc/oc2gbts_par.c
index f355024..7dc77c9 100644
--- a/src/osmo-bts-oc2g/misc/oc2gbts_par.c
+++ b/src/osmo-bts-oc2g/misc/oc2gbts_par.c
@@ -151,7 +151,7 @@
 		fclose(fp);
 		return -EIO;
 	}
-	fsync(fp);
+	fsync(fileno(fp));
 	fclose(fp);
 	return 0;
 }
@@ -201,7 +201,7 @@
 
         rc = fwrite(buf, 1, size, fp);
 
-        fsync(fp);
+        fsync(fileno(fp));
         fclose(fp);
 
         return rc;
@@ -242,7 +242,7 @@
 		fclose(fp);
 		return -EIO;
 	}
-	fsync(fp);
+	fsync(fileno(fp));
 	fclose(fp);
 
 	return 0;

-- 
To view, visit https://gerrit.osmocom.org/12970
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcd9dc48ea2e1f80bfdf5cf8b6bf55d8150fe0d2
Gerrit-Change-Number: 12970
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190219/40d45687/attachment.htm>


More information about the gerrit-log mailing list