libusb hotplug callbacks are called with the libusb lock taken, and we
call into libusb with our local mutex, so we need to enforce an ordering
between the two. Instead of calling device_connected or
device_disconnected directly, enqueue them onto the main thread.
Bug: http://b/62200735
Test: manually hotplugged a device
Change-Id: Ic5d55db83b47f4bb60f124ce94ddfe06f5f1a0c6
Bug: 62114389
Test: boot bullhead, get/set properties with ':' via command line
Test: trigger an init trigger with a property containing a ':'
Change-Id: Ib51853a1ef9d4f79d510c8175c0d9684e2025e23
This patch adds two benchmarks that measure the performance of some
operations of libziparchive.
Both benchmarks are creating a temporary zip file containing file
names of uniformly distributed lengths. The creation of the zip
file is not timed in the benchmarks.
- FindEntry_no_match tries to find an inexisting entry in the files
of the zip archive, in order to force the code to examine all the
files in the archive.
- Iterate_all_files uses the iterate function to list all the files
in the archive.
Bug: N/A
Test: adb shell /data/ziparchive-benchmarks
Change-Id: Ibdb524ba1c5ae55caddf0416ebbc09f8b6df0021
For an fstab entry in device tree, fs_mgr now honors the status property
as done by linux. i.e. the node (in this case, the fstab entry) is
enabled if status is not set, "ok" or "okay". For every other value, the
node is considered as disabled.
Merged-In: I5ff8f710de2c54afc76b4af28108ca9075357ad1
Bug: 62127741
Test: Test sailfish w/ no status property, result: boots
Test: Test with status = "disabled", result: skips mounting /vendor
Test: Test with status = "ok", result: boots
Change-Id: I5ff8f710de2c54afc76b4af28108ca9075357ad1
Signed-off-by: Sandeep Patil <sspatil@google.com>
(cherry picked from commit be4302bf58)
This helps us have less false-positives.
We do this instead of `#undef NDEBUG`, since undefing NDEBUG actually
gave us more false-positives (...and build breakages) than simply
leaving it defined.
Bug: None
Test: Ran the static analyzer across internal master. 213 fewer warnings
(15 Medium, 2 Low, the remainder are 'Analyzer'). All of the dropped
warnings I audited were false-positives. It adds ~3 Tidy warnings.
Change-Id: Ibedab60ca7e9d2b0772896222b83d2e7ab064afe
devices.cpp handles too many things for creating one class. This
change breaks it up into various files and classes.
* Parsing is moved to ueventd_parser.cpp
* Reading from the uevent socket and Cold booting is moved to a
UeventListener class, in uevent_listener.cpp
* Firmware handling is moved to firmware_handler.cpp
* The remaining contents form a DeviceHandler class within devices.cpp
Bug: 33785894
Test: boot bullhead x40, observe no major differences in /dev and /sys
Test: boot sailfish x40, observe no major differences in /dev and /sys
Test: init unit tests
Change-Id: I846a2e5995fbb344c7a8e349065c18a934fa6aba
ANDROID_BUILD_TOP is only defined if envsetup.sh is sourced, the current
directory in make is the top of the source tree.
Test: <fresh terminal> make -j nothing
Change-Id: I24834a6eeb6ac11de0cc19d84650daa086995d99
/init.${ro.hardware}.rc would sometime rely on being parsed before other
.rc files. In this case all vendors are still able to have a .rc file
included before all the ones in /vendor/etc/init.
Merged-In: I3fb6df13a39204a516874ea94f5e5ad84bca42c6
Bug: 38301110
Change-Id: I3fb6df13a39204a516874ea94f5e5ad84bca42c6
(cherry picked from commit f7c34ad4bf)
Load vendor public libraries to sphal namespace
if it exists - preserve old behavior of loading
these libraries to default namespace if sphal
namespace is not present on the device.
Bug: http://b/37410104
Test: cts-tradefed run singleCommand cts --skip-preconditions -m CtsJniTestCases
on marlin (with enabled sphal configuration) and on angler where ld.config.txt
is not present.
Change-Id: Iaa3fa437ba2900acc2e5b9c78039fe1553e4c9dd
(cherry picked from commit af0264bbe9)