init: Do not build logo.c when initlogo is disabled

PS2: Fix spacing.

"For now, logo.c was build even if TARGET_NO_INITLOGO was true.
Changing tty to KD_GRAPHICS is now done in init.c as it should be, when
the logo is not present."
This fixes weird framebuffer distortion on certain devices, if
TARGET_NO_INITLOGO is set to true in some device makefile.

Change-Id: I51153a6a7aa49013de82f625bd58a528da8b8115
init: Check for symlinks with lstat() not open()

Using open() with an O_NOFOLLOW flag will result in a file falsely
being determined to be a symlink if the open fails for another
reason.

For example, a character device that isn't ready due to the
underlying hardware not being initialized yet will fail to open()

An example of this are any CG2900 device files prior to
execution of ste-cg29xx_ctrl

This uses lstat() instead of open() with O_NOFOLLOW to check
whether a file is a symlink or not.

Change-Id: Ie0d8d94b426c84c29b1b04d41a4cc15536cb307c
init: Add vendor-specific initialization hooks

Allow optional vendor-specific initializations
within init.  This can be used for runtime
initialization setup that init rc scripts do
not support.

Change-Id: I7623a0d59b18f9ec8e3623958e2f7ccd72b877bf
(cherry picked from commit a36f7998a135a63934465889f089f96deefe7c42)
(cherry picked from commit 2ce27688b13bbc9a2237442ec2d6a554325ef658)
(cherry picked from commit 8e4dc4f79011bf0a8832e8d1251fc17b3e542057)
Merge changes Ie0d8d94b,I51153a6a into du44

* changes:
  init: Check for symlinks with lstat() not open()
  init: Do not build logo.c when initlogo is disabled
core: Add API to retrieve mtu size

Adding an API to libnetutils to retrieve mtu size of an interface
Made few utility functions from ifc_utils public

Change-Id: Iddec2dcd9f241b146d7f362e2df0724cf740d1f2
(cherry picked from commit 108cded7d96cc347f36b5b78c404c5ebccce13d7)
Use RECOVERY_PRE_COMMAND before calling __reboot() recovery

For the Power menu,
frameworks/base/core/jni/android_os_Power.cpp#L180
already uses RECOVERY_PRE_COMMAND if
TARGET_RECOVERY_PRE_COMMAND is defined in the
BoardConfig.mk for a device to make a system() call before
calling __reboot() for recovery. This commit adds
the same thing to the other places that we know we are
getting into recovery using __reboot(), namely,
adb reboot recovery, the reboot binary and init
in the case of errors.

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: If0a9c7f22de2aa187c921b60ad5edd77b49e095d
core: Fix permissions for data and cache

 - Add /data/radio
 - Set gateway property after DNS
 - Allow radio users to set properties associated with
   all rmnet interfaces. Not just rmnet0
 - Check Cache and Dalvik perm
 - Check selinux enforced booleans

Change-Id: Ia60fcb8f90aa73ffd40e839b93356ee50a9e5072
Merge "Use RECOVERY_PRE_COMMAND before calling __reboot() recovery" into du44
Merge "core: Add API to retrieve mtu size" into du44
Merge branch 'du44' of https://github.com/DirtyUnicorns-KitKat/system_core into HEAD

Conflicts:
	init/Android.mk
	libnetutils/ifc_utils.c