From 579f4d4991eafdf214b8f7a6356d0252ec1866ee Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 4 Apr 2016 15:00:43 +0200 Subject: [PATCH] vfs: count of written bytes in Fs_file_system --- repos/os/include/vfs/fs_file_system.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/repos/os/include/vfs/fs_file_system.h b/repos/os/include/vfs/fs_file_system.h index 41063298f9..119d21112b 100644 --- a/repos/os/include/vfs/fs_file_system.h +++ b/repos/os/include/vfs/fs_file_system.h @@ -132,16 +132,21 @@ class Vfs::Fs_file_system : public File_system /* pass packet to server side */ source.submit_packet(packet); - source.get_acked_packet(); + + /* obtain result packet descriptor with updated status info */ + ::File_system::Packet_descriptor const + packet_out = source.get_acked_packet(); /* * XXX check if acked packet belongs to request, * needed for thread safety */ + file_size const write_num_bytes = min(packet_out.length(), count); + source.release_packet(packet); - return count; + return write_num_bytes; } public: