* [PATCH] file-list: fix file_list_detect_all()
@ 2025-01-20 13:26 Sascha Hauer
2025-01-22 7:41 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2025-01-20 13:26 UTC (permalink / raw)
To: Barebox List
Call detect on a device file when it doesn't exist, not when already
exists.
Fixes: 00e5e596df ("file_list: add file_list_detect_all()")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/file-list.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/file-list.c b/common/file-list.c
index 40ccfa97ec..6298f8f82d 100644
--- a/common/file-list.c
+++ b/common/file-list.c
@@ -287,7 +287,7 @@ int file_list_detect_all(const struct file_list *files)
int i = 0;
list_for_each_entry(fentry, &files->list, list) {
- if (stat(fentry->filename, &s))
+ if (!stat(fentry->filename, &s))
continue;
if (device_detect_by_name(devpath_to_name(fentry->filename)) == 0)
i++;
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] file-list: fix file_list_detect_all()
2025-01-20 13:26 [PATCH] file-list: fix file_list_detect_all() Sascha Hauer
@ 2025-01-22 7:41 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2025-01-22 7:41 UTC (permalink / raw)
To: Barebox List, Sascha Hauer
On Mon, 20 Jan 2025 14:26:25 +0100, Sascha Hauer wrote:
> Call detect on a device file when it doesn't exist, not when already
> exists.
>
>
Applied, thanks!
[1/1] file-list: fix file_list_detect_all()
https://git.pengutronix.de/cgit/barebox/commit/?id=1a3be5bdf632 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-22 7:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-20 13:26 [PATCH] file-list: fix file_list_detect_all() Sascha Hauer
2025-01-22 7:41 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox