Skip to content

Add and use file_exists() helper

Sascha Hauer barebox 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected] change-id 20261030-file-exists-4e26fdf6ff96

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2libfile: add file_exists() helpercommands/fiptool.c common/firmware.c include/libfile.h +1 more+44 -120 replies
2/2treewise: use file_exists()arch/arm/boards/raspberry-pi/rpi-common.c arch/arm/mach-k3/r5.c commands/bfetch.c +16 more+37 -730 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Add and use file_exists() helper

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.

---
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,

Signature · 1 line
Sascha Hauer <[email protected]>