mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH 0/2] Add and use file_exists() helper
Date: Fri, 30 Oct 2026 08:16:20 +0100	[thread overview]
Message-ID: <20261030-file-exists-v1-0-34035d7392e5@pengutronix.de> (raw)

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 <s.hauer@pengutronix.de>
---
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 <s.hauer@pengutronix.de>




             reply	other threads:[~2026-10-30  7:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30  7:16 Sascha Hauer [this message]
2026-10-30  7:16 ` [PATCH 1/2] libfile: add " Sascha Hauer
2026-10-30  7:16 ` [PATCH 2/2] treewise: use file_exists() Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261030-file-exists-v1-0-34035d7392e5@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox