* [PATCH] usb: gadget: fastboot: delete temporary file
@ 2017-04-12 10:10 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2017-04-12 10:10 UTC (permalink / raw)
To: Barebox List
After we have copied the data to its final destination there is
no need to keep the temporary file around. Remove it when done
with it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/usb/gadget/f_fastboot.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index ef5f7ec6e0..598637619d 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -758,6 +758,9 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req, const char *cmd
copy:
ret = copy_file(FASTBOOT_TMPFILE, filename, 1);
+
+ unlink(FASTBOOT_TMPFILE);
+
if (ret) {
fastboot_tx_print(f_fb, "FAILwrite partition: %s", strerror(-ret));
return;
--
2.11.0
_______________________________________________
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:[~2017-04-12 10:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12 10:10 [PATCH] usb: gadget: fastboot: delete 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