]> git.ipfire.org Git - thirdparty/systemd.git/commit
bootctl: do not fail on removing unfied kernel image
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 Aug 2025 16:43:10 +0000 (01:43 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 26 Aug 2025 13:45:44 +0000 (15:45 +0200)
commit37d1f1573b859e61df46bed4648fa60da5b60102
tree95f5092afdccc93f983f2d5e51addb9a2657a935
parent3ef74e44b81add0191a59c624a0119a7aaca2ea2
bootctl: do not fail on removing unfied kernel image

A boot loader entry for a unified kernel image has
BootEntry.kernel : path to the image relative to ESP or XBOOTLDR,
BootEntry.path   : path to the image.
Hence, these two effectively point to the same file.

Hence, by unlink command, the image is removed by
```
deref_unlink_file(&known_files, e->kernel, e->root);
```
then later tried again by
```
r = chase_and_unlink(e->path, root, ...);
```
and of course it fails with -ENOENT.

Let's ignore the failure there. We already ignore ENOENT on removal
at various places, especially in deref_unlink_file().

Fixes #38706.
Follow-ups for 8702496bfb0205764569782a9a2ebd11fd80e5e8.
src/bootctl/bootctl-status.c