diff mbox series

installer: cleanup $TMPDIR/boot-script

Message ID 20170928100533.12415-1-christian.storm@siemens.com
State Accepted
Headers show
Series installer: cleanup $TMPDIR/boot-script | expand

Commit Message

Storm, Christian Sept. 28, 2017, 10:05 a.m. UTC
In cleanup_files(), also cleanup $TMPDIR/boot-script
($TMPDIR/BOOT_SCRIPT_SUFFIX).

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 corelib/installer.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stefano Babic Oct. 2, 2017, 7:30 a.m. UTC | #1
On 28/09/2017 12:05, Christian Storm wrote:
> In cleanup_files(), also cleanup $TMPDIR/boot-script
> ($TMPDIR/BOOT_SCRIPT_SUFFIX).
> 
> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> ---
>  corelib/installer.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/corelib/installer.c b/corelib/installer.c
> index 5bdf4f0..cbf10f6 100644
> --- a/corelib/installer.c
> +++ b/corelib/installer.c
> @@ -431,6 +431,8 @@ void cleanup_files(struct swupdate_cfg *software) {
>  	LIST_FOREACH(bootvar, &software->bootloader, next) {
>  		dict_remove_entry(bootvar);
>  	}
> +	snprintf(fn, sizeof(fn), "%s%s", TMPDIR, BOOT_SCRIPT_SUFFIX);
> +	remove_sw_file(fn);
>  
>  	LIST_FOREACH(hw, &software->hardware, next) {
>  		LIST_REMOVE(hw, next);
> 

Applied to -master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/corelib/installer.c b/corelib/installer.c
index 5bdf4f0..cbf10f6 100644
--- a/corelib/installer.c
+++ b/corelib/installer.c
@@ -431,6 +431,8 @@  void cleanup_files(struct swupdate_cfg *software) {
 	LIST_FOREACH(bootvar, &software->bootloader, next) {
 		dict_remove_entry(bootvar);
 	}
+	snprintf(fn, sizeof(fn), "%s%s", TMPDIR, BOOT_SCRIPT_SUFFIX);
+	remove_sw_file(fn);
 
 	LIST_FOREACH(hw, &software->hardware, next) {
 		LIST_REMOVE(hw, next);