On Friday 05 June 2009 13:54:00 Denys Vlasenko wrote: > On Thu, Jun 4, 2009 at 4:43 PM, Nickolay Chokoev<[email protected]> wrote: > > Hi, > > > > When I use switch_root I have an error "not rootfs", which comes from the > > condition !S_ISREG(st1.st_mode). When I remove this condition, all seems > > to work fine (or at least I think so). > > > > What is this check for? > > It checks that /init is a file (not a link, not a directory, etc).
I forget why that moved from stat() to lstat(). I vaguely recall there was a reason (although I thought it had moved the _other_ way?), but git's user interface is so utterly horrible that digging through the current source control archive to find the commits that changed it is beyond what I'm willing to do as a volunteer. (I'm all in favor of distributed source control, but git's UI is actually worse than subversion's, and for some reason using "hg convert" on the busybox git archive gives me a totally corrupted mercurial archive.) Google finds this: http://www.busybox.net/downloads/patches/svn-14577.patch Still, that first link says the problem came up around March 19, 2006, and checking the archive finds two different threads about people saying /init being a symlink was a problem _before_ that was committed... Odd, the man page says stat() follows symlinks and lstat() doesn't, but the change moves it to lstat in _response_ to: http://lists.busybox.net/pipermail/busybox/2006-March/053435.html http://lists.busybox.net/pipermail/busybox/2006-March/019322.html Odd. The _intent_ is clear, anyway... Rob -- Latency is more important than throughput. It's that simple. - Linus Torvalds _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
