Many places use stat() only to test for existence of a file without being interested in the struct stat returned. Add a convenience helper for that and convert users throughout the tree.
Signed-off-by: Sascha Hauer <[email protected]> --- Sascha Hauer (2): libfile: add file_exists() helper treewise: use file_exists() arch/arm/boards/raspberry-pi/rpi-common.c | 7 ++----- arch/arm/mach-k3/r5.c | 4 +--- commands/bfetch.c | 6 +++--- commands/cp.c | 7 ++----- commands/edit.c | 3 +-- commands/fiptool.c | 7 ------- commands/readlink.c | 4 ++-- common/bbu.c | 3 +-- common/blspec.c | 4 +--- common/boot.c | 3 +-- common/complete.c | 5 ++--- common/environment.c | 5 +---- common/file-list.c | 4 ++-- common/firmware.c | 8 +++----- common/menutree.c | 3 +-- common/startup.c | 21 +++++++------------- drivers/usb/gadget/function/dfu.c | 4 +--- include/libfile.h | 13 ++++++++++++ lib/glob.c | 5 ++--- lib/libbb.c | 4 ++-- lib/libfile.c | 33 +++++++++++++++++++++++++++---- net/ifup.c | 13 ++++-------- 22 files changed, 81 insertions(+), 85 deletions(-) --- base-commit: df53c88dfd4ad18837d25b5b07555fa65873cba8 change-id: 20261030-file-exists-4e26fdf6ff96 Best regards, -- Sascha Hauer <[email protected]>
