switch_root: zap the last directory for the mount point of new-root

Kang-Che Sung explorer09 at gmail.com
Fri Jul 19 14:28:03 UTC 2019


On Friday, July 19, 2019, Kang-Che Sung <explorer09 at gmail.com> wrote:
>
> There's side benefit for this patch: In case that overmount fails, we can
have
> a rootfs kept intact (instead of almost destroyed).
>

Correction. It's just a side effect, not a "benefit" worth talking about.

Speaking of, since we are now overmounting the root before zapping the
initramfs, I wonder if we can remove one check about whether the new root
is a mount point (this saves code size; mount() would fail with EINVAL in
that case).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20190719/033cae1e/attachment.html>


More information about the busybox mailing list