vfs_trace: report correct size for value files

File size must be the same as the number of bytes that can be read from
the file. Otherwise, this will trigger a `Truncated_during_read`
exception.

Fixes genodelabs/genode#4240
This commit is contained in:
Johannes Schlatow 2021-07-29 18:19:45 +02:00 committed by Christian Helmuth
parent e648e7255a
commit 0840cfe834

View File

@ -196,7 +196,7 @@ class Vfs::Value_file_system : public Vfs::Single_file_system
Stat_result stat(char const *path, Stat &out) override
{
Stat_result result = Single_file_system::stat(path, out);
out.size = BUF_SIZE + 1;
out.size = _buffer.length();
return result;
}