]> Gentwo Git Trees - linux/.git/commit
gen_init_cpio: write to fd instead of stdout stream
authorDavid Disseldorp <ddiss@suse.de>
Tue, 19 Aug 2025 03:05:44 +0000 (13:05 +1000)
committerNathan Chancellor <nathan@kernel.org>
Wed, 20 Aug 2025 23:02:55 +0000 (16:02 -0700)
commit1400227773201918f270dda48f20afcd613d9bc3
tree49bdc6b846bf1b4e50b7d0f01b8e23f22f4f873e
parent75a6b4595daa569bbc2899eef40372fc013b2d73
gen_init_cpio: write to fd instead of stdout stream

In preparation for more efficient archiving using copy_file_range(),
switch from writing archive data to stdout to using STDOUT_FILENO and
I/O via write(), dprintf(), etc.
Basic I/O error handling is added to cover cases such as ENOSPC. Partial
writes are treated as errors.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Link: https://lore.kernel.org/r/20250819032607.28727-2-ddiss@suse.de
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
usr/gen_init_cpio.c