linux/usr
Dmitry Safonov 38492c5743
gen_init_cpio: Ignore fsync() returning EINVAL on pipes
The reproducer:
echo | ./usr/gen_init_cpio /dev/stdin > /dev/null

fsync() on a pipe fd returns -EINVAL, which makes gen_init_cpio fail.
Ignore -EINVAL from fsync().

Fixes: ae18b94099 ("gen_init_cpio: support -o <output_file> parameter")
Cc: David Disseldorp <ddiss@suse.de>
Cc: Nicolas Schier <nsc@kernel.org>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Link: https://patch.msgid.link/20251007-gen_init_cpio-pipe-v2-1-b098ab94b58a@arista.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
2025-10-07 09:53:05 -07:00
..
dummy-include kbuild: prevent exported headers from including <stdlib.h>, <stdbool.h> 2022-05-13 10:56:10 +02:00
include kbuild: uapi: Strip comments before size type check 2025-10-06 11:31:19 -07:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig usr/Kconfig: fix typos of "its" 2023-12-20 15:02:58 -08:00
Makefile initramfs: shorten cmd_initfs in usr/Makefile 2024-07-16 01:07:52 +09:00
default_cpio_list initramfs: add default_cpio_list, and delete -d option support 2020-01-16 00:25:22 +09:00
gen_init_cpio.c gen_init_cpio: Ignore fsync() returning EINVAL on pipes 2025-10-07 09:53:05 -07:00
gen_initramfs.sh gen_initramfs.sh: use gen_init_cpio -o parameter 2025-08-20 16:02:56 -07:00
initramfs_data.S initramfs: refactor the initramfs build rules 2020-01-16 00:26:21 +09:00