]> git.karo-electronics.de Git - karo-tx-linux.git/commit
init: make init failures more explicit
authorMichael Opdenacker <michael.opdenacker@free-electrons.com>
Tue, 5 Nov 2013 05:57:03 +0000 (16:57 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:57:03 +0000 (16:57 +1100)
commit33175a0e231baee6e475008510fcf3c51e80a69e
treeeb076768442d036bb78e0a2afc636d4b51002d16
parent3201cee2849f976aa39c5d962e579c134129ac7d
init: make init failures more explicit

This patch proposes to make init failures more explicit.

Before this, the "No init found" message didn't help much.  It could
sometimes be misleading and actually mean "No *working* init found".

This message could hide many different issues:
- no init program candidates found at all
- some init program candidates exist but can't be executed
  (missing execute permissions, failed to load shared libraries,
  executable compiled for an unknown architecture...)

This patch notifies the kernel user when a candidate init program is found
but can't be executed.  In each failure situation, the error code is
displayed, to quickly find the root cause.  "No init found" is also
replaced by "No working init found", which is more correct.

This will help embedded Linux developers (especially the newcomers),
regularly making and debugging new root filesystems.

Credits to Geert Uytterhoeven and Janne Karhunen for their improvement
suggestions.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Janne Karhunen <Janne.Karhunen@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
init/main.c