Commit graph

19372 commits

Author SHA1 Message Date
Elliott Hughes
9c9818374e Merge "fs_mgr: BLKGETSIZE causes memory corruption" 2016-02-16 18:16:42 +00:00
Tao Wu
bc31090b7a Don't go busy loop when waiting child process.
Before this change, code works like this: after gets POLLHUP from poll, it just
go a busy loop to do poll -> waitpid -> poll -> waitpid ... until child process
really exit. This doesn't make sense and is waste of CPU.

Change-Id: If6cd8b0245587d623e309c3ae27f162e1c7ef504
Signed-off-by: Tao Wu <lepton@google.com>
2016-02-16 10:13:48 -08:00
Keith Mok
d93adf55df fs_mgr: BLKGETSIZE causes memory corruption
BLKGETSIZE return unsigned long sector size,
but unsigned long is of 8 bytes in 64 bits system.
Passing an integar value will causes stack corruption.
Use BLKGETSIZE64 instead.

Change-Id: I60323e51c6692d4405cf2ed015ab4216c1591f68
2016-02-16 09:51:00 -08:00
Elliott Hughes
1c3d784030 Merge "Move libmemtrack headers into libmemtrack." 2016-02-16 17:14:11 +00:00
James Hawkins
06bfaa7078 Merge "bootstat: Add a few more bootreasons and rebase the index against index 1." 2016-02-13 21:46:21 +00:00
Elliott Hughes
8dccdbf3f8 Move libdiskconfig headers into libdiskconfig.
Change-Id: I5d8e29687dca39a2a134d92f311528479b4ea102
2016-02-13 12:48:23 -08:00
James Hawkins
6f74c0b843 bootstat: Add a few more bootreasons and rebase the index against index 1.
This is necessary to match the mapping in the internal infrastructure.

Bug: 21724738
Change-Id: I292166ff5c0dea7f3d771627120f16af4c56073b
2016-02-13 09:54:35 -08:00
Dimitry Ivanov
8b68829c06 Merge "Add missing liblog dependency" 2016-02-13 04:44:44 +00:00
Elliott Hughes
25aca65a93 Merge "Move libnativeloader headers into libnativeloader." 2016-02-13 03:35:44 +00:00
Dimitry Ivanov
01f21da732 Add missing liblog dependency
Bug: http://b/27171986
Change-Id: Ia7f03c72de9a8e5d61896bde6b4b1af396376f54
2016-02-12 18:40:29 -08:00
Elliott Hughes
ab5ed09924 Move libmemtrack headers into libmemtrack.
Change-Id: I6f695b4a965e924331d1a07fc45e9d8b6bc43d92
2016-02-12 18:16:48 -08:00
Elliott Hughes
8501751bdf Move libnetutils headers into libnetutils.
Change-Id: I8e51b369b7617e780db78c2f77c8e28d0fb93445
2016-02-12 18:10:06 -08:00
Elliott Hughes
e2b4e1e00c Move libnativeloader headers into libnativeloader.
Change-Id: I227676276da1b08a84486f29fb0e1502c8dbdf4a
2016-02-12 18:07:29 -08:00
Dimitry Ivanov
1697f4ee71 Merge "Add missing liblog dependency" 2016-02-13 00:45:29 +00:00
Dimitry Ivanov
0bb350a04c Add missing liblog dependency
Bug: http://b/27171986
Change-Id: I43fe595c05f5584e76d0359c42c8dc006bd3f5c5
2016-02-12 16:39:09 -08:00
Dimitry Ivanov
18214a8f32 Merge "Add dependency on liblog" 2016-02-12 23:51:43 +00:00
Josh Gao
519f9aea43 Merge "adb: sysdeps_win32: actually change ExitThread to _endthreadex." 2016-02-12 23:47:59 +00:00
Josh Gao
d7b3749202 adb: sysdeps_win32: actually change ExitThread to _endthreadex.
Forgot to amend this into b5fea14e.

Change-Id: Id04e639eb87043901681db789d7a7925300fa867
2016-02-12 15:47:19 -08:00
Mark Salyzyn
2aae509b4f Merge "liblog: test: newline space prefix and max length print tests" 2016-02-12 23:44:56 +00:00
Josh Gao
69c81c75df Merge "adb: make adb_thread_func_t return void, add adb_thread_exit." 2016-02-12 23:42:49 +00:00
Josh Gao
b5fea14e13 adb: make adb_thread_func_t return void, add adb_thread_exit.
Windows restricts the return value of threads to 32-bits, even on 64-bit
platforms. Since we don't actually return meaningful values from thread,
resolve this inconsistency with POSIX by making adb's thread abstraction
only take void functions.

Change-Id: I5c23b4432314f13bf16d606fd5e6b6b7b6ef98b5
2016-02-12 15:23:54 -08:00
Josh Gao
7fea044de9 Merge "adb: mkdirs fixes" 2016-02-12 23:18:36 +00:00
Dimitry Ivanov
3042d6d040 Add dependency on liblog
Bug: http://b/27171986
Change-Id: I4af3b4b9f17972327b926ad9ee0d03672d1d4a64
2016-02-12 14:56:40 -08:00
Josh Gao
e8a974091a Merge "adb: redact reference to secret internal time machine." 2016-02-12 19:47:50 +00:00
Josh Gao
6b42a2bfd5 adb: redact reference to secret internal time machine.
Change-Id: Ic6744cc7c858576d7e6172460b32902e007b6fd3
2016-02-12 11:33:53 -08:00
Mark Salyzyn
663687270c liblog: test: newline space prefix and max length print tests
Add some more tests for logprint library

Bug: 27091726
Change-Id: I264c0607967e0121fefb1b8698f9b02b1463c662
2016-02-11 10:43:14 -08:00
Dimitry Ivanov
361b147776 Merge "Preload public native libraries" 2016-02-11 18:35:08 +00:00
Dimitry Ivanov
55bbb0d88a Preload public native libraries
Preload libraries needed by the public namespace
at the earlier stage. This saves time on
InitPublicNamespace and saves memory because
the libraries are linked before zygote fork.

Bug: http://b/26409579
Change-Id: I59153a4180b930f31b542d8d2cb17b5d63c36774
(cherry picked from commit d68c8e9f84)
2016-02-11 10:33:35 -08:00
Josh Gao
dda68c0fcf Merge "adb: sysdeps: add support for joining threads." 2016-02-11 01:10:12 +00:00
Yabin Cui
c30c065373 Merge "libbacktrace: support building static libraries on target." 2016-02-11 00:42:02 +00:00
Alex Deymo
c7f65d2859 Merge "Fix UploadService unittests." 2016-02-11 00:09:37 +00:00
Yabin Cui
9946a8f755 libbacktrace: support building static libraries on target.
Bug: 27125711

Change-Id: I28a49e3e128fa4291815a54cf942452bd1f9f756
2016-02-10 15:20:44 -08:00
Spencer Low
85c45bd5a1 adb: mkdirs fixes
Fix pathological case where the directory to be created can't be created
because there is already a file there. This was previously returning
success because the wrong var was passed to directory_exists().

Fix test to exercise this situation. Also clarify tests.

Change-Id: I0dc0f14084e0eda4e1498874d4ab2a6445d322ac
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2016-02-10 15:03:50 -08:00
Josh Gao
3b3e10d046 adb: sysdeps: add support for joining threads.
Bug: http://b/27105824
Change-Id: I44e4edbb2a59565c35f1f3e6a6394ac258591f95
2016-02-10 14:22:58 -08:00
Josh Gao
76d3308dd2 Merge "adb: allow wine's output for sysdeps_win32 strerror test." 2016-02-10 21:39:31 +00:00
Josh Gao
22554c9167 adb: allow wine's output for sysdeps_win32 strerror test.
Change-Id: Ia5d04a2347df1bcd8c7efcc1da9cec9725007a58
2016-02-10 13:38:32 -08:00
Alex Deymo
de4497ef3d Fix UploadService unittests.
The unittest was creating a brillo::Daemon in a smart pointer and then
resetting it to a newly created different brillo::Daemon instance. This
creates two brillo::Daemon instances for a short period of time, which
both setup global context (the default message loop).

This patch fixes this situation by deleting the service before creating
a new one.

Bug: 27121855
TEST=`/data/nativetest/metricsd_tests/metricsd_tests` on edison-eng

Change-Id: I3b60cbfcdba77febbfa6104aa0ecad60a29afec5
2016-02-10 11:57:55 -08:00
David Pursell
c7f43c6ae1 Merge "fastboot: add UDP protocol." 2016-02-10 19:05:08 +00:00
Mark Salyzyn
ac02db3bda Merge "liblog: add gTests for logging with leading newline" 2016-02-10 18:32:11 +00:00
Mark Salyzyn
d18a6d4764 Merge "logd: use ro.debuggable instead of ro.build.type" 2016-02-10 18:26:42 +00:00
Mark Salyzyn
d1f41d606b logd: use ro.debuggable instead of ro.build.type
Change-Id: Ic644f1f78e68094f700834675f4acc63386a6b92
2016-02-10 10:23:03 -08:00
David Pursell
4601c978ca fastboot: add UDP protocol.
Implements a UDP protocol for fastboot, documented in
fastboot_protocol.txt.

This version of the protocol does not include multi-packet windowing,
which will likely be needed to achieve reasonable speeds over WiFi.
Since we don't have any WiFi use cases yet, we'd like to get this in
now and update the protocol later if it becomes necessary.

Usage:
  fastboot -s udp:<hostname>[:port] <command>

Bug: http://b/26154914
Change-Id: Ia5bbae6bcd6405671f594d7120b3994746d234d3
2016-02-10 10:21:30 -08:00
Mark Salyzyn
3f94122ced liblog: add gTests for logging with leading newline
Bug: 27091726
Change-Id: Idff0e4e7c025426002c6381c3afb00e12d9fc1b5
2016-02-10 09:52:13 -08:00
Yabin Cui
250f5956d6 Merge "adb: setsid() for adb host server." 2016-02-10 04:34:53 +00:00
James Hawkins
5cb07147e4 Merge "bootstat: Add support for logging the boot_reason metric." 2016-02-10 00:25:43 +00:00
Yabin Cui
6bf323b97a adb: setsid() for adb host server.
To create a daemon for adb host server, we should call setsid()
for the daemon process. However, previously we call setsid() for
the adb client process, which results in nothing but EPERM error.

Bug: 26982628
Change-Id: I2763ae3d5a243706927d7ef6af5095138c0ce2d8
2016-02-09 16:15:56 -08:00
James Hawkins
a4a1a4ac85 bootstat: Add support for logging the boot_reason metric.
This value is read from the ro.boot.bootreason system property.

Bug: 21724738
Change-Id: I43bef3d85ba9c8d87669a91da1aa675d9a86e348
2016-02-09 15:32:38 -08:00
Elliott Hughes
dc5bd3a1b9 Merge "Fix generation of event labels for getevent." 2016-02-09 19:17:38 +00:00
Mark Salyzyn
37adf180c7 Merge "logd: add internal prdebug function" 2016-02-09 16:01:24 +00:00
Mark Salyzyn
d048f113a3 logd: add internal prdebug function
Usage: android::prdebug(const char *fmt, ...) __printflike(1, 2);

Will add logd prefix tag, log as debug priority in kernel logs,
and will suffix a newline if one is not supplied. To be used to
aid debugging of the logger only.

Change-Id: I217326ef34dc4eb0ea076bacb7a7a8b564c931c3
2016-02-09 07:46:39 -08:00