Commit Graph

28810 Commits

Author SHA1 Message Date
Andreas Gampe 0daaa5aec8 Merge "Logd: Fix wrong parameters"
am: 913ad12543

Change-Id: I4046e79b452c4be8dc75e774aa7bb9264c602b10
2017-03-15 15:41:56 +00:00
Treehugger Robot 913ad12543 Merge "Logd: Fix wrong parameters" 2017-03-15 15:38:14 +00:00
Evgenii Stepanov 591b09650b Merge "Fix heap-buffer-overflow detected by ASAN."
am: 3d028f14c8

Change-Id: Ia3c137490fae9da00f73dedd414ba2b8cd04a975
2017-03-15 06:52:56 +00:00
Treehugger Robot 3d028f14c8 Merge "Fix heap-buffer-overflow detected by ASAN." 2017-03-15 06:46:28 +00:00
Andreas Gampe 34450d70c5 Logd: Fix wrong parameters
Better keep the right order, or ASAN will complain when you read
out of bounds.

Bug: 36234128
Test: m
Test: m && m SANITIZE_TARGET=address
Test: Sanitized device boots without ASAN crashes
Change-Id: Ifc09cb0ece6835d2b636a3ad2128e09ca9aa45c9
2017-03-14 20:43:43 -07:00
Todd Poynor 938f80838c Merge "libcutils: android_reboot: add thermal shutdown command"
am: 97a2c49a58

Change-Id: Id7d1731304324df4c6b770949b18aec5fc5f5aa4
2017-03-15 02:18:59 +00:00
Treehugger Robot 97a2c49a58 Merge "libcutils: android_reboot: add thermal shutdown command" 2017-03-15 02:11:40 +00:00
Todd Poynor 37bba3b88a libcutils: android_reboot: add thermal shutdown command
Add ANDROID_RB_THERMOFF command to android_reboot(), denoting a power
off due to thermal limits exceeded.  When this command is used, Android
may provide notification to the user about the potentially unexpected
power off at next boot.

Bug: 30994946
Test: Manual: setprop sys.powerctl thermal-shutdown
Change-Id: If2cde1b6a3c281a5750b50295412a4801ed5b2f2
2017-03-14 17:58:25 -07:00
Tom Cherry ef3017bdbd Merge "Remove extraneous .clang-format files"
am: 41c7bb5055

Change-Id: I5062d81a01cde71a9bbe7549f9e3c9198af955ae
2017-03-15 00:55:35 +00:00
Tom Cherry 41c7bb5055 Merge "Remove extraneous .clang-format files" 2017-03-15 00:46:44 +00:00
Evgenii Stepanov 03fc2fedd7 Fix heap-buffer-overflow detected by ASAN.
Bug: 34949125
Bug: 34606909
Test: Make sure Android boots when built with SANITIZE_TARGET='address'
Change-Id: I9c004e806f2025098aa72228284b05affd2c2802
2017-03-14 14:47:25 -07:00
Tom Cherry 5b4eb23cfd Remove extraneous .clang-format files
The .clang-format files in the base, debuggerd, adb, libprocinfo, and
fastboot subdirectories each differ slightly from the top level
.clang-format-2 and .clang-format-4, but not in a substantially
meaningful way, as the source files in those directories have not been
re-formatted with clang-format.  Therefore, let's reduce the
differences and use only the two top level clang-format files.

Secondly perform some small clean-up of the top level .clang-format
files.  AllowShortBlocksOnASingleLine is already false in the Google
style, so it can be removed.  AllowShortFunctionsOnASingleLine should
not change between the -2 and -4 versions, so leave it at the Google
default style in both, which is 'All'.

The diff stats for these changes are:

./base/
Old:
640 insertions(+), 531 deletions(-)
New:
563 insertions(+), 808 deletions(-)

./debuggerd/
Old:
910 insertions(+), 886 deletions(-)
New:
991 insertions(+), 1023 deletions(-)

./adb/
Old:
2623 insertions(+), 2886 deletions(-)
New:
2655 insertions(+), 3103 deletions(-)

./libprocinfo/
Old:
2 insertions(+), 1 deletion(-)
New:
4 insertions(+), 18 deletions(-)

./fastboot/
Old:
618 insertions(+), 743 deletions(-)
New:
726 insertions(+), 882 deletions(-)

./init/
Old:
1755 insertions(+), 1866 deletions(-)
New:
1715 insertions(+), 1952 deletions(-)

Test: Above clang-format stats
Change-Id: I3f7b8ab0660c8394c5008ba95ea15e70dd22b55b
2017-03-14 14:06:31 -07:00
Tom Cherry a968df9edb Merge "init: fix DumpState() logging"
am: f31abeb973

Change-Id: I6cacbecb42b594073659960c1d1bd9dea5281b82
2017-03-14 20:16:26 +00:00
Christopher Ferris 880f129d36 Merge "Use the clang format 2 space as default."
am: 1252eba600

Change-Id: Ia83d9a096b66b5cea9be84bdc2ed35fdb09c8983
2017-03-14 20:16:14 +00:00
Tom Cherry f31abeb973 Merge "init: fix DumpState() logging" 2017-03-14 20:12:48 +00:00
Christopher Ferris 1252eba600 Merge "Use the clang format 2 space as default." 2017-03-14 20:11:32 +00:00
Christopher Ferris 87bf2082cf Use the clang format 2 space as default.
Test: NA
Change-Id: I97418804086b83cfba1765eb0bee3e7ca18fb4ea
2017-03-14 13:06:19 -07:00
Jeremy Compostella 4d003658ec Merge "ueventd: support by-name symlinks for virtual block devices"
am: 0b4d34e31c

Change-Id: If1d76eab6f535e0296247d7a4c8c56dcf73f24dd
2017-03-14 19:38:13 +00:00
Treehugger Robot 0b4d34e31c Merge "ueventd: support by-name symlinks for virtual block devices" 2017-03-14 19:29:35 +00:00
Tom Cherry e4275b52a8 Merge "init: enable C++17"
am: e3aef3dd99

Change-Id: I2b23cfad2c5a199c48dea513e200bea1f6257253
2017-03-14 17:21:32 +00:00
Tom Cherry e3aef3dd99 Merge "init: enable C++17" 2017-03-14 17:17:40 +00:00
Christopher Ferris c05ae4824d Merge "Add a binary to dump demangled names."
am: 26afd16917

Change-Id: I5aed9fd1577f8e8223c87050bb11ee3fccd3d30c
2017-03-14 16:49:33 +00:00
Christopher Ferris 26afd16917 Merge "Add a binary to dump demangled names." 2017-03-14 16:44:01 +00:00
Mark Salyzyn 3790880b9d Merge changes Iaddc4e1b,I57d84af2
am: fa05eaa968

Change-Id: Ie83a8c5c72ca15067d2809efdef4b7ff8fe0c4cf
2017-03-14 14:52:26 +00:00
Treehugger Robot fa05eaa968 Merge changes Iaddc4e1b,I57d84af2
* changes:
  liblog: test: __android_log_btwrite__android_log_close precharge
  logcat: test -v epoch tail time
2017-03-14 14:43:53 +00:00
Tom Cherry f2ee4c8e4b Merge "init: Remove custom clang-format"
am: e6b05dc683

Change-Id: I167ead68a8cf23083f3fa240f70fcfe6690a5b9a
2017-03-14 01:05:24 +00:00
Treehugger Robot e6b05dc683 Merge "init: Remove custom clang-format" 2017-03-14 01:00:37 +00:00
Mark Salyzyn c500abb40b liblog: test: __android_log_btwrite__android_log_close precharge
TEST_PREFIX missing before operations on
liblog*.__android_log_btwrite__android_log_close tests

Test: gTest liblog-unit-tests
Bug: 27405083
Change-Id: Iaddc4e1b1f9afcfd8231c3921605fecefd2b56bf
2017-03-13 16:29:04 -07:00
Mark Salyzyn 210095136d logcat: test -v epoch tail time
Test: gTest logcat-unit-tests
Bug: 35373582
Change-Id: I57d84af2eb5d1fce8753539edf3133bfe0bb7213
2017-03-13 16:29:04 -07:00
Tom Cherry 62a9f32344 init: Remove custom clang-format
Use a symlink to .clang-format-4 from the parent directory now that we
have it, instead of the custom .clang-format in this directory.

The changes between these files are,
Old:
ConstructorInitializerAllOnOneLineOrOnePerLine: false
TabWidth: 8
New:
ConstructorInitializerAllOnOneLineOrOnePerLine: true
TabWidth: 4

There is no reason to keep a custom .clang-format for these two
changes, and setting ConstructorInitializerAllOnOneLineOrOnePerLine to
true will be beneficial.

Test: Run clang-format and see that its output is sane
Change-Id: I5b357949eb02a60577cf57a783c0a80997b24e75
2017-03-13 16:23:20 -07:00
Christopher Ferris a11dc8f962 Add a binary to dump demangled names.
Test: Ran the executable and verified names get demangled.
Test: Ran with the -c option to verify it compares demangled names.
Change-Id: I9118ccc4398980346d26f615cdfed0bb756b52fe
2017-03-13 16:10:08 -07:00
Josh Gao 8412dac88c Merge "crash_dump: fix warnings, turn on -Werror."
am: c5933ed960

Change-Id: Id658632ea8fedc8598b5ac6939e7e9bf0bd0d22e
2017-03-13 22:43:59 +00:00
Treehugger Robot c5933ed960 Merge "crash_dump: fix warnings, turn on -Werror." 2017-03-13 22:38:44 +00:00
Mark Salyzyn b784ff72ff Merge "logd: specify clang format"
am: eb4a9d9588

Change-Id: Idc8bfe87e590bfc59be8743daddf4b12fb3c1190
2017-03-13 22:20:55 +00:00
Mark Salyzyn eb4a9d9588 Merge "logd: specify clang format" 2017-03-13 22:13:32 +00:00
Josh Gao c7fe0600cc crash_dump: fix warnings, turn on -Werror.
Test: mma
Change-Id: I0722fef7b513be976cbbe89f73e8bb7138a80442
2017-03-13 14:13:29 -07:00
Christopher Ferris 6f237fda00 Merge "Restore errno in signal handlers."
am: f161e00289

Change-Id: If0b02199d99a7ec67613ee819ef284be89f037e4
2017-03-13 20:58:03 +00:00
Christopher Ferris f161e00289 Merge "Restore errno in signal handlers." 2017-03-13 20:50:20 +00:00
Christopher Ferris 9cd41b3798 Merge "Implement a simple demangler."
am: 3f4f1a1a4a

Change-Id: I744cd4fcb5f731bb1f5ed32e3dcde2ff303ee9f4
2017-03-13 19:45:51 +00:00
Christopher Ferris 3f4f1a1a4a Merge "Implement a simple demangler." 2017-03-13 19:39:41 +00:00
Tom Cherry d8a7257b14 init: fix DumpState() logging
Fix two formatting issues in Action::DumpState(),

Old:
on ro.crypto.state=encrypted ro.crypto.type=file zygote-start
New:
on ro.crypto.state=encrypted && ro.crypto.type=file && zygote-start

Old:
on boot
  %sifup lo
  %shostname localhost
  %sdomainname localdomain
  %swrite /proc/sys/vm/overcommit_memory 1
New:
on boot
  ifup lo
  hostname localhost
  domainname localdomain
  write /proc/sys/vm/overcommit_memory 1

Also, now that we're importing many small rc files, it no longer makes
sense to call Parser::DumpState() after each import.  Therefore, move
the conditional to call Parser::DumpState() to after /init.rc and its
imports are parsed and after the late imports are parsed.

Test: Boot bullhead with DumpState() enabled and check the output
Change-Id: I0b81305b8938aa1a7133d7dd2055f34f47609cf9
2017-03-13 12:24:49 -07:00
Tom Cherry 2bc00140be init: enable C++17
Test: Boot bullhead
Change-Id: I40961ff765461e8aef211d27158ffb7c4be76493
2017-03-13 11:58:58 -07:00
Mark Salyzyn 501c373916 logd: specify clang format
Switch _all_ file's coding style to match to ease all future changes.

SideEffects: None
Test: compile
Bug: 35373582
Change-Id: I470cb17f64fa48f14aafc02f574e296bffe3a3f3
2017-03-13 10:31:09 -07:00
NIEJuhu 21a33342af Merge "fs_mgr: fix errno setted by mount_with_alternatives"
am: 488525b47b

Change-Id: I4aaba5b3a047b3a6d2cf24557794ec45c007eb13
2017-03-12 03:30:37 +00:00
Treehugger Robot 488525b47b Merge "fs_mgr: fix errno setted by mount_with_alternatives" 2017-03-12 03:27:14 +00:00
Steven Moreland 2ebb1e5404 Merge "libutils: String\d+ make std_string private"
am: 76850afa52

Change-Id: I1d8278c7545c67a916977983d38ea82756a17403
2017-03-11 08:59:48 +00:00
Treehugger Robot 76850afa52 Merge "libutils: String\d+ make std_string private" 2017-03-11 08:55:10 +00:00
Steven Moreland 2aac335128 libutils: String\d+ make std_string private
This method is still used by prebuilts, but making it private to start
the process of removing it from everywhere.

Test: pass
Bug: 35363681
Change-Id: I4d53f68d10c9abcca32023c4d930e99912afa697
2017-03-10 22:51:55 -08:00
Bowgo Tsai 4ba84b2dd2 Merge "adb: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()"
am: eca92a5a6f

Change-Id: I192ac96673a3c7e8b4f81c7b27fd761d445556ee
2017-03-11 03:54:23 +00:00
Treehugger Robot eca92a5a6f Merge "adb: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()" 2017-03-11 03:48:49 +00:00