kernel: implement POSIX fsync through the shared file API

This commit is contained in:
nmzik
2026-10-18 20:15:53 +02:00
parent 831862a50b
commit 7675579e79
5 changed files with 56 additions and 10 deletions
+1 -1
View File
@@ -367,7 +367,7 @@ bool SysFileDeleteFile(const std::filesystem::path& name) {
bool SysFileFlush(sys_file_t& f) {
if (f.type == SYS_FILE_FILE && f.f != nullptr) {
return (fflush(f.f) == 0);
return fflush(f.f) == 0 && fsync(fileno(f.f)) == 0;
}
return false;