These images do not have GPL-ed binaries like /system/bin/e2fsck so
avoid running the program when we detect that we're running inside
one of them.
Note that this does not affect other emulator-based build products
(e..g full-eng instead of sdk-eng), which do have the binaries.
BUG=13057123
Change-Id: Ia42f1d02a3845fbf4b2f9d95818f35d760711a12
We have benchmarking for memset in bionic itself, and a benchmarking
framework for other native benchmarking.
Change-Id: I241a288a96d3b2d37f3d51b04a519ac23f18a989
There have been issues with sdcard data corruption even after
successfully calling fsync for /sdcard. This is caused by
the sdcard daemon doing nothing in this case.
Change-Id: I48149ceabdac79ac535b35c2598bb1fbb5410883
Eliminates various warnings from SELinux-related code.
Bug: 12587913
Change-Id: I28921f0ebd934324436609540d95ccef58552b64
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This depends on change I137588013ed1750315702c0dbe088ce3e4a29e83.
Change-Id: I5a4fef9affd6cddf98d72dc9d54899be25741779
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
It is not enough to align the read buffer only, because
consequent writes might still fail with EINVAL. The write
buffer should be also aligned according to the write(2)
manual page.
Change-Id: I7547dec5208732c56f4466c1b0c88f36dabacf5b
If a file is opened in direct I/O mode (with O_DIRECT flag),
the read buffer addess must be aligned to memory page size
boundary. The Direct I/O is not needed for normal files,
however, some special hardware access (e.g. smart SD cards)
will not work without it.
Change-Id: I42babeee86dba1880fd23e2592fddd7060da3e20
Some functions in minui reference a global extern char *locale. None
of them are used by charger, but the bfd linker cannot optimize them
out and fails to link charger. Define char *locale in charger.c
so it can resolve the symbol.
Change-Id: I738daf95d24356bf96bd226d91a5dc64b5d4dc9b
cacheflush doesn't exist on LP64 any more, and gcc's
__builtin___clear_cache is better in every way. Use it instead.
Change-Id: Ibbf6facbdefc15b6dda51d014e1c44fb7aa2b17d
Wrap the call in a if (0) when verbose logging is disabled
to provide compile time checking.
Also add a printf format attribute to the function to warn
if parameters are incorrect.
Change-Id: Ic77edeadcc4d886ca0f8b434f8550e18e22d5901
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>
Extend the libselinux restorecon implementation to allow reuse
by the toolbox restorecon command. This simply requires adding
support for the nochange (-n) and verbose (-v) options to the
libselinux functions and rewriting the toolbox restorecon command
to use the libselinux functions. Also add a force (-F) option to
support forcing a restorecon_recursive even if the restorecon_last
attribute matches the current file_contexts hash so that we can
continue to force a restorecon via the toolbox command for testing
or when we know something else has changed (e.g. for when we support
relabeling /data/data and package information has changed).
Change-Id: I92bb3259790a7195ba56a5e9555c3b6c76ceb862
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>