vfs: count of written bytes in Fs_file_system

This commit is contained in:
Christian Helmuth 2016-04-04 15:00:43 +02:00
parent 7a64e0bb80
commit 579f4d4991

View File

@ -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: