mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
The cmsfs_write function only writes a single record in line mode and returns the number of bytes it consumed from the input buffer. This is valid behaviour as the write system call can always return with a partial write. But there are tools that ignore the return value of the write and just assume that a single write call is sufficient to write many lines aka records on the cmsfs filesystem. Enhance the cmsfs_write function to loop until all lines from the input buffer have been consumed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>