Do not show disk errors if they are expected.

An error shows up during boot if vold disk has different majors.
On some devices this is expected and set in config, so do not
confuse users and skip the error (as it ain't one)
Bonus: Better log for duplicate state. It was useless...

Change-Id: Ibc047729432e2f6746a9439b828d1443951ade1f
Add SELinux restorecon calls on ASEC containers.

This will allow fine-grained labeling of the
contents of ASEC containers. Some of the contents
need to be world readable and thus should be
distinguishable in policy.

Change-Id: Iefee74214d664acd262edecbb4f981d633ff96ce
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Avoid segv by checking argc in "storage user <mountpoint>"

Change-Id: Iffd67746e2e273c4c3f87741e5f13aa511ccb557
Signed-off-by: JP Abgrall <jpa@google.com>
Adding support of dm-req-crypt

Currently Android provides disk encryption support using dm-crypt
which is based on bios. dm-crypt uses 512 bytes packet size for
crypto operations. While 512 bytes size packet is ok for SW based
disk encryption, it is inefficient for HW based crypto engines.
dm-req-crypt is similar to dm-crypt except it uses block requests
rathe bios for crypto operations. block requests when unpacked
carries data upto 512KB. Hence, HW based crypto engine can be used
more efficiently.

Conflicts:
	cryptfs.c

Change-Id: Ic541d4d1b9db4ce32465e30c5f25619a80975767
vold: Honor mount options for ext4 mounts

Change-Id: Ie77e0d402c2c16d544251f7fdaeaad34d030d121
vold: Send UUID with list response

UUID defaults to 0 if not available

Change-Id: I59df514aeffa7d926a31d02589e6ff3031bde79e