mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 00:24:51 +00:00
server/fs_report: don't truncate file initially
fs_report truncated the report file on construction of the report session to mimic an "empty report". This prevented existing use cases where the initial state was already written to the file system by other means. I doubt that use cases exist where the inital empty-report mimic is needed and (if I'm wrong) there is still the race of the consumer reading the file just before the report session is constructed. Reporters that want to enforce an empty initial report should send it explicitly.
This commit is contained in:
parent
30c69e73b3
commit
e2559a822b
@ -135,10 +135,6 @@ class Fs_report::Session_component : public Genode::Rpc_object<Report::Session>
|
||||
_path(path_from_label<Path>(label.string()))
|
||||
{
|
||||
create_parent_dir(_vfs, _path, _alloc);
|
||||
|
||||
try {
|
||||
_file_op([&] (Vfs_handle *handle) { handle->fs().ftruncate(handle, 0); });
|
||||
} catch (...) { throw Service_denied(); }
|
||||
}
|
||||
|
||||
~Session_component() { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user