MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _sys_ensure

Function _sys_ensure

components/libc/compilers/armlibc/syscalls.c:255–263  ·  view source on GitHub ↗

* Flush any OS buffers associated with fh, ensuring that the file * is up to date on disk. Result is >=0 if OK, negative for an * error. * This function is deprecated. It is never called by any other library function, * and you are not required to re-implement it if you are retargeting standard I/O (stdio). */

Source from the content-addressed store, hash-verified

253 * and you are not required to re-implement it if you are retargeting standard I/O (stdio).
254 */
255int _sys_ensure(FILEHANDLE fh)
256{
257#ifdef DFS_USING_POSIX
258 return fsync(fh);
259#else
260 LOG_W("%s: %s", __func__, _WARNING_WITHOUT_FS);
261 return 0; /* error */
262#endif /* DFS_USING_POSIX */
263}
264
265/*
266 * Move the file position to a given offset from the file start.

Callers

nothing calls this directly

Calls 1

fsyncFunction · 0.50

Tested by

no test coverage detected