[PATCH] uimage: Fix deleting of temporary file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux