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:
Christian Helmuth 2018-05-29 11:39:33 +02:00
parent 30c69e73b3
commit e2559a822b
1 changed files with 0 additions and 4 deletions

View File

@ -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() { }