void sync(char const *path)

Sync now takes a path argument at VFS and File system interfaces.

Issue #1648
This commit is contained in:
Emery Hemingway
2015-10-07 17:02:52 +02:00
committed by Christian Helmuth
parent 96d021b9d4
commit 2da239d0c8
15 changed files with 29 additions and 29 deletions

View File

@ -514,10 +514,20 @@ class Vfs::Dir_file_system : public File_system
/**
* Synchronize all file systems
*/
void sync() override
void sync(char const *path) override
{
if (strcmp("/", path, 2) == 0) {
for (File_system *fs = _first_file_system; fs; fs = fs->next)
fs->sync("/");
return;
}
path = _sub_path(path);
if (!path)
return;
for (File_system *fs = _first_file_system; fs; fs = fs->next)
fs->sync();
fs->sync(path);
}