Allow symlinks to be used in vold managed fstab entries

With device-tree kernels the sysfs path for SD cards varies depending on
device-tree layout and the actual card used. It is therefore impossible
to specify the sysfs path for the device in fstab.

However, there exists a symlink to the device which is created under a
generic path like '/sys/block/mmcblk0/device'. To use such a path with
vold we need to convert the symlinked path to the real path, which this
patch does.

Change-Id: I68e693772e70b758dab22fcd5f0eb4b9e84a2443
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Don't crash if EMULATED_STORAGE_SOURCE isn't set

Don't crash (by calling strncmp and strlen on a NULL pointer) if
EMULATED_STORAGE_SOURCE isn't set.

Change-Id: Ie60f9245170395f8d6dbd239749c6468272484b9
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Merge branch 'linaro' into HEAD