mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] uimage: Fix deleting of temporary file
@ 2012-10-30 14:00 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2012-10-30 14:00 UTC (permalink / raw)
  To: barebox

the uImage support may generate a temporary file which ought to be deleted
after usage. Due to the wrong filename this never happened. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/uimage.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/uimage.c b/common/uimage.c
index c72db41..3a97534 100644
--- a/common/uimage.c
+++ b/common/uimage.c
@@ -225,8 +225,8 @@ void uimage_close(struct uimage_handle *handle)
 	free(handle->name);
 	free(handle);
 
-	if (IS_BUILTIN(CONFIG_FS_TFTP) && !stat("/.uimage_tmp", &s))
-		unlink("/.uimage_tmp");
+	if (IS_BUILTIN(CONFIG_FS_TFTP) && !stat(uimage_tmp, &s))
+		unlink(uimage_tmp);
 }
 EXPORT_SYMBOL(uimage_close);
 
-- 
1.7.10.4


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-30 14:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-30 14:00 [PATCH] uimage: Fix deleting of temporary file Sascha Hauer

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