[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: switch_root: zap the last directory for the mount point of new-root
From: 阿保 純一 <abo_junghichi () yahoo ! co ! jp>
Date: 2019-08-10 11:08:39
Message-ID: 20190810200839.d5ecac72bf7933df45b55dbb () yahoo ! co ! jp
[Download RAW message or body]
On Fri, 2 Aug 2019 22:40:01 +0800
Kang-Che Sung <explorer09@gmail.com> wrote:
> What I suggested is to remove these lines:
>
> if (st.st_dev == rootdev) {
> // Show usage, it says new root must be a mountpoint
> bb_show_usage();
> }
>
> Because mount(..., MS_MOVE) will do the same check before moving the mount
> point, and the check would be done before deleting anything if your patch
> is applied. (And there is no point to show the program usage when it's
> already PID 1. You would rather see error message of what specifically goes
> wrong. The kernel will panic when PID 1 dies, leaving you no option but
> reboot.)
Thank you for your suggestion.
["patch" (application/octet-stream)]
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic