From: Lennart Poettering Date: Fri, 20 Mar 2026 16:33:07 +0000 (+0100) Subject: bootctl: make sure "unlink" properly tracks "extra" files X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7ab31b4d1c90ffe41e29b60731742c3cdeed1bd;p=thirdparty%2Fsystemd.git bootctl: make sure "unlink" properly tracks "extra" files --- diff --git a/src/bootctl/bootctl-unlink.c b/src/bootctl/bootctl-unlink.c index 80e74926c6c..6e8e5c4bb17 100644 --- a/src/bootctl/bootctl-unlink.c +++ b/src/bootctl/bootctl-unlink.c @@ -146,6 +146,12 @@ static int boot_entry_ref_files( return r; } + FOREACH_ARRAY(x, e->local_extras.items, e->local_extras.n_items) { + r = ref_file(known_files, x->location, increment); + if (r < 0) + return r; + } + return 0; } @@ -294,6 +300,8 @@ int boot_entry_unlink( (void) unref_unlink_file(&known_files, root, root_fd, e->device_tree, dry_run); STRV_FOREACH(s, e->device_tree_overlay) (void) unref_unlink_file(&known_files, root, root_fd, *s, dry_run); + FOREACH_ARRAY(x, e->local_extras.items, e->local_extras.n_items) + (void) unref_unlink_file(&known_files, root, root_fd, x->location, dry_run); if (dry_run) log_info("Would remove \"%s\"", e->path);