From 0840cfe834af312c6bfd989354b095560a68522f Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Thu, 29 Jul 2021 18:19:45 +0200 Subject: [PATCH] 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 --- repos/gems/src/lib/vfs/trace/value_file_system.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/src/lib/vfs/trace/value_file_system.h b/repos/gems/src/lib/vfs/trace/value_file_system.h index f498fde057..31d613d9c6 100644 --- a/repos/gems/src/lib/vfs/trace/value_file_system.h +++ b/repos/gems/src/lib/vfs/trace/value_file_system.h @@ -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; }