oc2g: fsync requires fd instead of file stream
Similar fix was done for lc15 in a8041edb
.
Change-Id: Idcd9dc48ea2e1f80bfdf5cf8b6bf55d8150fe0d2
This commit is contained in:
parent
f3fa1d384d
commit
546056c9c8
|
@ -151,7 +151,7 @@ int oc2gbts_par_set_int(enum oc2gbts_par par, int val)
|
|||
fclose(fp);
|
||||
return -EIO;
|
||||
}
|
||||
fsync(fp);
|
||||
fsync(fileno(fp));
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ int oc2gbts_par_set_buf(enum oc2gbts_par par, const uint8_t *buf,
|
|||
|
||||
rc = fwrite(buf, 1, size, fp);
|
||||
|
||||
fsync(fp);
|
||||
fsync(fileno(fp));
|
||||
fclose(fp);
|
||||
|
||||
return rc;
|
||||
|
@ -242,7 +242,7 @@ int oc2gbts_par_set_gps_fix(void *ctx, time_t val)
|
|||
fclose(fp);
|
||||
return -EIO;
|
||||
}
|
||||
fsync(fp);
|
||||
fsync(fileno(fp));
|
||||
fclose(fp);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue