mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-12 20:28:20 +00:00
void sync(char const *path)
Sync now takes a path argument at VFS and File system interfaces. Issue #1648
This commit is contained in:
committed by
Christian Helmuth
parent
96d021b9d4
commit
2da239d0c8
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user