Commit Graph

19738 Commits

Author SHA1 Message Date
Josh Gao 6487e74a59 adb: add fd exhaustion test, fix errno reporting in sysdeps_win32.
Add a test for FD exhaustion, and fix cases where we weren't properly
setting errno.

Change-Id: I486055bb9ead31089ce76b210c11de9e973f3256
2016-02-19 11:24:51 -08:00
Josh Gao b6232b96dd adb: move win32 fd base to 2048, fix fd allocation.
Windows has a maximum fd limit of 2048, so we can avoid collision with
real file descriptors by starting from there. Also, fds would be
previously be allocated by a linear walk from the last allocated FD,
instead of the lowest available FD, as required by POSIX. Keep track of
the lowest available file descriptor to make things feel more familiar.

Change-Id: Id6ac1c54f4f7964a6cdfa8d3f4f96262e4881964
2016-02-19 11:24:51 -08:00
Josh Gao 3777d2ecc0 adb: don't emulate fdevent or socketpair on Windows.
Change-Id: I16cf7d4427eb79f36db39e91f85402a268fa72f5
2016-02-19 11:24:51 -08:00
Elliott Hughes 6da1353863 Remove dead code from debuggerd.
system/core/debuggerd/debuggerd.cpp:683:5: warning: Value stored to 'logsocket' is never read
    logsocket = -1;
    ^           ~~

Bug: http://b/27264392
Change-Id: I8eab8a02b67f219c32aea49e4d4957e5642df38f
2016-02-19 10:41:17 -08:00
James Hawkins 0f5d443d0c Merge "system/core: Cleanup direct calls to opendir by containing in a std::unique_ptr."
am: bd04bb0d29

* commit 'bd04bb0d297c1a7cd5aabdc258b1829905fb067d':
  system/core: Cleanup direct calls to opendir by containing in a std::unique_ptr.
2016-02-19 17:51:44 +00:00
James Hawkins bd04bb0d29 Merge "system/core: Cleanup direct calls to opendir by containing in a std::unique_ptr." 2016-02-19 17:49:13 +00:00
Yabin Cui a90f7761bf Merge "healthd: separate libbatterymonitor for use in recovery."
am: 219806bc7a

* commit '219806bc7a2b07de4655b3421149f32e2f729e01':
  healthd: separate libbatterymonitor for use in recovery.
2016-02-19 17:38:26 +00:00
Yabin Cui 219806bc7a Merge "healthd: separate libbatterymonitor for use in recovery." 2016-02-19 17:32:00 +00:00
Yabin Cui e98e177a34 healthd: separate libbatterymonitor for use in recovery.
Bug: 26879394

Change-Id: I97b5b4994c42988ce43f5085b8b4b25e9e80c9fa
2016-02-18 22:14:25 -08:00
Colin Cross 5e7b8ba391 Merge "imprecise mark and sweep native memory leak detector"
am: 6288b28fc7

* commit '6288b28fc794f1fbb5b667b74868b06ce35cac36':
  imprecise mark and sweep native memory leak detector
2016-02-19 04:29:00 +00:00
Colin Cross 6288b28fc7 Merge "imprecise mark and sweep native memory leak detector" 2016-02-19 04:19:41 +00:00
Samuel Tan 941d48f0ee Merge "libutils: add String8 and String16 std_string utility methods"
am: fb0670d650

* commit 'fb0670d65056ea26a9c57f62c5265b3958c88eff':
  libutils: add String8 and String16 std_string utility methods
2016-02-19 03:23:34 +00:00
Samuel Tan fb0670d650 Merge "libutils: add String8 and String16 std_string utility methods" 2016-02-19 03:18:31 +00:00
Samuel Tan 450b9b7068 Merge "libutils: remove whitespace from String8 files"
am: e771e846a8

* commit 'e771e846a815b70ad4dde169c636625ed0368bfa':
  libutils: remove whitespace from String8 files
2016-02-19 02:34:41 +00:00
Samuel Tan e771e846a8 Merge "libutils: remove whitespace from String8 files" 2016-02-19 01:07:47 +00:00
Samuel Tan 9ac4e005b4 libutils: add String8 and String16 std_string utility methods
Add utility methods that convert String16 and String8 into
std::string.

Also, remove a repeated include of <utils/Unicode.h> in
String16.h, since it is not used in that header file,
and is already included in String16.cpp.

BUG: 27200800
Change-Id: I5238aeb70689499763060a99dff9950fbb7adb3e
TEST: libutils builds successfully.
2016-02-18 17:04:23 -08:00
Samuel Tan 95fd527065 libutils: remove whitespace from String8 files
Remove trailing whitespace from String8 header and
cpp files.

BUG: None
Change-Id: Ie77da3f0fbce9cdce20225ce1310cf62295179a4
2016-02-18 17:04:20 -08:00
Josh Gao 728da79e9c Merge "adb: fix clang-format for access modifier dedent."
am: d5126ddf71

* commit 'd5126ddf7119461d1dbd549f832bfb944f109225':
  adb: fix clang-format for access modifier dedent.
2016-02-18 23:08:20 +00:00
Josh Gao d5126ddf71 Merge "adb: fix clang-format for access modifier dedent." 2016-02-18 23:00:51 +00:00
James Hawkins 588a2cad7f system/core: Cleanup direct calls to opendir by containing in a
std::unique_ptr.

Bug: 26643633
Change-Id: Ia3491fdbff086558da694ae949cf08e4c89d0307
2016-02-18 14:52:46 -08:00
Josh Gao 5da522ec45 adb: fix clang-format for access modifier dedent.
It was previously -1 (the default from Google style, since it uses 2
space indentation), instead of -2.

Change-Id: I1865505ce17a2cc13b85de58bda55c3b1dfcf08c
2016-02-18 14:52:07 -08:00
Elliott Hughes 71bb9c6a99 Merge "Remove logcat\'s false dependency on a libutils header file."
am: d3289ac581

* commit 'd3289ac581816861721b81f7100794fad075c497':
  Remove logcat's false dependency on a libutils header file.
2016-02-17 22:18:41 +00:00
Elliott Hughes d3289ac581 Merge "Remove logcat's false dependency on a libutils header file." 2016-02-17 22:10:35 +00:00
Todd Poynor 6355bc8d5b Merge "healthd: Add "No UI" operation for charger mode"
am: fdd26c961d

* commit 'fdd26c961d654df7ab068591a9fce7945719c90d':
  healthd: Add "No UI" operation for charger mode
2016-02-17 21:39:40 +00:00
Todd Poynor fdd26c961d Merge "healthd: Add "No UI" operation for charger mode" 2016-02-17 21:36:36 +00:00
Todd Poynor 7c5a3e12a4 healthd: Add "No UI" operation for charger mode
Boards can opt to have charger mode be passive, with no screen UI or key
processing, the same as for recovery mode, via BOARD_CHARGER_NO_UI.  The
minui and associated libs and charging image files are not built into the
executable in this case.

Always select charger No UI operation for Brillo devices.

Bug: 27170356
Change-Id: Ibe71498743353b01ce5b6521e42ed94d75547547
2016-02-17 21:35:03 +00:00
Mark Salyzyn c10b039d28 Merge "fake_log_device: long lived allocations"
am: 3fd5649424

* commit '3fd56494242a42d5a684f64e1292d8a354dc60c6':
  fake_log_device: long lived allocations
2016-02-17 21:22:19 +00:00
Mark Salyzyn 3fd5649424 Merge "fake_log_device: long lived allocations" 2016-02-17 21:19:48 +00:00
Elliott Hughes b3639658ed Merge "Remove two bogus libutils dependencies."
am: fd9619004b

* commit 'fd9619004b8ce5be093657142aef989bee14fb82':
  Remove two bogus libutils dependencies.
2016-02-17 20:24:12 +00:00
Elliott Hughes 0a475f8dd2 Merge "Remove libbase\'s libutils dependency."
am: b3a77b1198

* commit 'b3a77b119858b9f5a1267b7c41b6646032f12db9':
  Remove libbase's libutils dependency.
2016-02-17 20:24:04 +00:00
Mark Salyzyn 0085a135b9 fake_log_device: long lived allocations
Use static space for long lived allocations as they
will appear to act like a memory leak. Resort to a
larger on-stack iovec to reduce the chances of an
allocation. Fix bug in writer where not enough size
was available for "security" buffer name. Minor
transitions to more consistent coding style.

Bug: 27107691
Change-Id: I68c918e7b916b1ae3b04829d48b3eddaa0a7e739
2016-02-17 12:22:18 -08:00
Elliott Hughes fd9619004b Merge "Remove two bogus libutils dependencies." 2016-02-17 20:01:04 +00:00
Elliott Hughes b3a77b1198 Merge "Remove libbase's libutils dependency." 2016-02-17 20:00:38 +00:00
Elliott Hughes b9e53b4d2d Remove logcat's false dependency on a libutils header file.
Change-Id: Idf499d77e88d2ee7d5b1050eaf45ba29481793a4
2016-02-17 11:58:01 -08:00
Elliott Hughes ce927189a4 Remove two bogus libutils dependencies.
Change-Id: Idcc25ee1d039935f3218fb419bc73ffaa58242bb
2016-02-17 11:54:47 -08:00
Elliott Hughes 38e2b63db8 Remove libbase's libutils dependency.
Yuck.

Change-Id: If84758f25bc15d5b1a732eaccc226385f51cac13
2016-02-17 11:53:54 -08:00
Bill Yi 4409f1446c Merge commit '4352ee87fd74b931d4b58192fb8974e91aa899d0' into HEAD 2016-02-17 11:37:00 -08:00
Yabin Cui 2773d4f96a Merge "healthd: init members of BatteryMonitor." 2016-02-17 18:30:05 +00:00
David Pursell bcaeb78f63 Merge "fastboot: fix TCP protocol version check." 2016-02-17 18:16:12 +00:00
David Pursell aad72a533f fastboot: fix TCP protocol version check.
Currently the TCP handshake fails if the device TCP protocol version
doesn't match the host exactly, but the protocol is supposed to allow
for forwards compatibility by accepting any protocol version >= itself.
That way the other side can potentially lower its protocol to match and
keep going.

This CL fixes the protocol version check and adds corresponding unit
tests.

Bug: http://b/27220700
Change-Id: Ib17f0a55eb910105a27609bc94bf76a30442e92e
2016-02-17 10:00:09 -08:00
James Hawkins 8a97f88a6d Merge "bootstat: Record metrics for factory_reset and time_since_factory_reset." 2016-02-17 17:46:39 +00:00
Yabin Cui db04a49a6f healthd: init members of BatteryMonitor.
Bug: 26879394
Change-Id: I09a6c78137f91a0c88bf4ba1e8890b4ec31dcf2c
2016-02-16 17:19:23 -08:00
Samuel Tan 8c09555aac Merge "libutils: remove whitespaces in String16.cpp and String16.h" 2016-02-17 00:33:31 +00:00
James Hawkins 500d71566a bootstat: Record metrics for factory_reset and time_since_factory_reset.
Bug: 25448351
Change-Id: I9b3a557317bc256a078f76e2b65d16bc071e4a6a
2016-02-16 16:19:48 -08:00
Alex Deymo 753676a154 Merge "Add .clang-format symlink to Brillo's clang-format." 2016-02-16 23:38:29 +00:00
Samuel Tan f9d16ef106 libutils: remove whitespaces in String16.cpp and String16.h
Remove trailing whitespaces in both these files.

BUG: None
Change-Id: I18eca5162871b5b2bf7757a7ef36a4e80073798c
2016-02-16 15:21:34 -08:00
Alex Deymo 5e087e451c Add .clang-format symlink to Brillo's clang-format.
This patch replaces the locally defined clang-format with a symlink
to the one defined in build/tools.

Bug: 27121653
TEST=Ran clang-format.

Change-Id: I8810428d12b60c7463bc7f9a96228600ec8b425d
2016-02-16 14:39:56 -08:00
Sami Tolvanen d1ac932330 Merge "logd: enforce policy integrity" 2016-02-16 21:52:13 +00:00
Elliott Hughes d61ad3c44e Merge "Move libnetutils headers into libnetutils." 2016-02-16 21:25:52 +00:00
Elliott Hughes 0a3a46afea Merge "Remove unnecessary #include from <memtrack/memtrack.h>." 2016-02-16 21:24:18 +00:00