summaryrefslogtreecommitdiffstats
path: root/early.c
AgeCommit message (Collapse)Author
2015-11-30Rename to unitd, clean up CMakeLists.txtMatthias Schiffer
2015-11-30Correctly setup early mountsMatthias Schiffer
2015-11-30Strip down procd to the necessary code, update copyrightMatthias Schiffer
2013-11-15debloat and reorganize codeJohn Crispin
split app into procd and init binaries remove log support, this is an external service now Signed-off-by: John Crispin <blogic@openwrt.org>
2013-11-09bind the console to /dev/null if the real console fails to come upJohn Crispin
this was reported on irc by oc80z Signed-off-by: John Crispin <blogic@openwrt.org>
2013-07-23Error and return when failing stat('/dev/console').Yousong Zhou
Since mkdev("*", 0600) has been called in early_dev just before early_console, no need to try checking it again. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2013-07-22early: remove superfluous close of stdio file descriptorsGabor Juhos
'man dup2' says: dup2() makes newfd be the copy of oldfd, closing newfd first if necessary, but note the following: * If oldfd is not a valid file descriptor, then the call fails, and newfd is not closed. * If oldfd is a valid file descriptor, and newfd has the same value as oldfd, then dup2() does nothing, and returns newfd. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-07-22early: keep stdio files openGabor Juhos
At the end of the 'early_console' function, the file descriptor is closed unconditionally. This 'close' call closes the stdio files if the fd returned by the 'open(dev/console)' call equals with any of the STD{IN,OUT,ERR}_FILENO values. When this happens, all subsequent accesses to the stdio files will fail and early console access won't work. To avoid this, don't close the file descriptor if that equals with any of the STD*_FILENO values. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-03-14fix up the mount options to match what openwrt had before using procd as pid 1John Crispin
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-03-13add early handlerJohn Crispin