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

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Feb 20 20:39:50 UTC 2019


Harald Welte has submitted this change and it was merged. ( 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(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve



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: merged
Gerrit-Change-Id: Idcd9dc48ea2e1f80bfdf5cf8b6bf55d8150fe0d2
Gerrit-Change-Number: 12970
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190220/8c4d1fb1/attachment.htm>


More information about the gerrit-log mailing list