mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] libfile: copy_file: prevent spurious error message
@ 2019-10-15 15:59 Robert Karszniewicz
  2019-10-16 11:26 ` [PATCH v2] " Robert Karszniewicz
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Karszniewicz @ 2019-10-15 15:59 UTC (permalink / raw)
  To: barebox

Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de>
---
 lib/libfile.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/libfile.c b/lib/libfile.c
index 3f3ec21..319e66b 100644
--- a/lib/libfile.c
+++ b/lib/libfile.c
@@ -349,6 +349,7 @@ int copy_file(const char *src, const char *dst, int verbose)
 	ret = stat(dst, &dststat);
 	if (ret && ret != -ENOENT)
 		goto out;
+	ret = 0;
 
 	/* Set O_TRUNC only if file exist and is a regular file */
 	if (!ret && S_ISREG(dststat.st_mode))
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-23  7:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 15:59 [PATCH] libfile: copy_file: prevent spurious error message Robert Karszniewicz
2019-10-16 11:26 ` [PATCH v2] " Robert Karszniewicz
2019-10-18 11:45   ` Sascha Hauer
2019-10-18 17:10     ` [PATCH v3] " Robert Karszniewicz
2019-10-18 17:15       ` Robert Karszniewicz
2019-10-21  7:37         ` Sascha Hauer
2019-10-22 13:47           ` [PATCH v4] libfile: copy_file: fix error handling Robert Karszniewicz
2019-10-23  7:16             ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox