Commit Graph

12548 Commits

Author SHA1 Message Date
Nick Kralevich 2548296384 am 5fc47aae: Merge "logd: Don\'t embed a flexible array member within another struct"
* commit '5fc47aae333520787d4373bc615a8ddcf58955ae':
  logd: Don't embed a flexible array member within another struct
2015-04-07 17:56:42 +00:00
Nick Kralevich 5fc47aae33 Merge "logd: Don't embed a flexible array member within another struct" 2015-04-07 17:46:23 +00:00
Nick Kralevich 58ba58a97c logd: Don't embed a flexible array member within another struct
C (but not C++) has a concept of a flexible array member, which
is documented at https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html .
Using a flexible array member indicates that the structure is
really a header for a variable length object.

In logd's case, the variable length structure android_event_string_t
was embedded within another structure called
android_log_event_string_t. This makes gcc's __builtin_object_size()
function really confused. When compiling with C++,
__builtin_object_size(android_log_event_string_t.payload.data, 1)
would return 0, whereas if you compiled the code with C, the same
call would (properly) return -1.

Code which does automatic bounds checking, such as the proposed
patch at https://android-review.googlesource.com/145411 , will
cause problems for logd if this syntax is used.

Don't try to embed a variable length structure within another
structure. This doesn't appear to be valid C nor C++, and
while it's worked, it seems problematic.

Instead, inline the structure so it's one big happy structure.

Change-Id: I8ac02b7142a4f6560f5f80df2effcf720f9896fc
2015-04-07 10:12:20 -07:00
Sami Tolvanen b6b66f8fde am 02f1d80a: Merge "Restore verity state when verified partition is reflashed"
* commit '02f1d80ae2da2436c4c2e2a4643866871f41d54f':
  Restore verity state when verified partition is reflashed
2015-04-07 09:31:41 +00:00
Sami Tolvanen ddaebb24f3 am 284c5cb2: Merge "Set verity mode as the verified property value"
* commit '284c5cb2a16d21e5d5123ae6a0d731dcc6beadca':
  Set verity mode as the verified property value
2015-04-07 09:31:39 +00:00
Sami Tolvanen 02f1d80ae2 Merge "Restore verity state when verified partition is reflashed" 2015-04-07 08:45:34 +00:00
Sami Tolvanen 284c5cb2a1 Merge "Set verity mode as the verified property value" 2015-04-07 08:45:24 +00:00
Mark Salyzyn 0bce68b421 am 33c2ad37: Merge "android_filesystem_config.h: use __BEGIN_DECLS and __END_DECLS"
* commit '33c2ad37cac1d85272bd0f8f869710cac73d3bb7':
  android_filesystem_config.h: use __BEGIN_DECLS and __END_DECLS
2015-04-06 22:43:22 +00:00
Mark Salyzyn 33c2ad37ca Merge "android_filesystem_config.h: use __BEGIN_DECLS and __END_DECLS" 2015-04-06 22:37:55 +00:00
Mark Salyzyn 16045614fd android_filesystem_config.h: use __BEGIN_DECLS and __END_DECLS
Change-Id: Idb050b9ef4e7947664295b173e1b09d65accd3e9
2015-04-06 14:15:58 -07:00
Dan Stoza dcc7aadb96 Merge "DO NOT MERGE Add ANativeWindow dataSpace; update graphics formats, color spaces" into stage-aosp-master 2015-04-06 18:09:56 +00:00
Mark Salyzyn 5b16ceaf88 am 08fe38e2: Merge "Allow inputflinger to have CAP_BLOCK_SUSPEND."
* commit '08fe38e23bad476be9dd46bf45ece1b5f3700178':
  Allow inputflinger to have CAP_BLOCK_SUSPEND.
2015-04-06 18:08:28 +00:00
Mark Salyzyn 08fe38e23b Merge "Allow inputflinger to have CAP_BLOCK_SUSPEND." 2015-04-06 18:01:39 +00:00
Tim Kilbourn 628620c7ba Allow inputflinger to have CAP_BLOCK_SUSPEND.
(Cherry picked from commit 83e6f2606b)

Resolved conflict in include/private/android_filesystem_config.h, content
already in libcutils/fs_config.c.

Change-Id: I817707721786e9b920fef14ebe836fdcd65a8606
2015-04-06 10:57:29 -07:00
Eino-Ville Talvala b2edfa514e DO NOT MERGE Add ANativeWindow dataSpace; update graphics formats, color spaces
First stage of adding a new dataSpace field for ANativeWindow,
for communicating format- (and endpoint-) dependent information
about graphics buffers. For most formats, dataSpace describes the
color space of the buffer, while format describes the memory layout.

For some formats, the dataSpace may also specify that the buffer
contains depth measurements, encoded images, or other kinds of
information that is not necessarily a simple 2D image.
Rename the existing colorspace enumeration to dataspace, with an added
dataspace for depth, and sRGB gamma-corrected and linear colorspaces.

Add in a definition for Android depth point clouds as a
variable-length list of float-triplet coordinates, as the underlying
layout of buffers with format HAL_PIXEL_FORMAT_BLOB and dataSpace of
HAL_DATASPACE_DEPTH.

Also remove now-unnecessary sRGB HAL graphics formats, and remove the
alias RAW_SENSOR that was left in to ease transition to RAW16.

Cherry pick of I8797f67fb9c2b18da5975f2145303ca0bf98e62d with the
following diff to maintain source compatibility:

@@ -58,6 +58,11 @@ enum {
     HAL_PIXEL_FORMAT_RGB_565            = 4,
     HAL_PIXEL_FORMAT_BGRA_8888          = 5,

+    // Deprecated sRGB formats for source code compatibility
+    // Not for use in new code
+    HAL_PIXEL_FORMAT_sRGB_A_8888        = 0xC,
+    HAL_PIXEL_FORMAT_sRGB_X_8888        = 0xD,
+
     /*
      * 0x100 - 0x1FF
      *
@@ -189,6 +194,9 @@ enum {
      */
     HAL_PIXEL_FORMAT_RAW16 = 0x20,

+    // Temporary alias for source code compatibility; do not use in new code
+    HAL_PIXEL_FORMAT_RAW_SENSOR = HAL_PIXEL_FORMAT_RAW16,
+
     /*
      * Android RAW10 format:
      *

Change-Id: I5c5ba98b297436f950e06a181eb0ff955747680f
(cherry picked from commit b93343d199)
2015-04-06 10:48:30 -07:00
Mark Salyzyn fb3c6ac054 am b137dab4: Merge "android_filesystem_config: move fs_config to libcutils"
* commit 'b137dab48c26c7aedfe2ec753d2e600a6a122a74':
  android_filesystem_config: move fs_config to libcutils
2015-04-06 17:37:32 +00:00
Mark Salyzyn 8797b7a114 am d42df562: Merge "libcutils: add fs_config"
* commit 'd42df562413c75fd7cd5b8a1d920bde8a3c22735':
  libcutils: add fs_config
2015-04-06 17:37:31 +00:00
Mark Salyzyn b137dab48c Merge "android_filesystem_config: move fs_config to libcutils" 2015-04-06 17:33:47 +00:00
Mark Salyzyn d42df56241 Merge "libcutils: add fs_config" 2015-04-06 17:30:59 +00:00
Dan Albert 68c384fd4f am d1e90c01: Merge "Cleanup base/logging."
* commit 'd1e90c01f6409cd3babd2c38154aebf9272cd825':
  Cleanup base/logging.
2015-04-06 17:28:02 +00:00
Dan Albert d1e90c01f6 Merge "Cleanup base/logging." 2015-04-06 17:20:13 +00:00
Mark Salyzyn a21c29ee81 android_filesystem_config: move fs_config to libcutils
Bug: 19908228
Change-Id: Id51c0c50eb2677824d052882f4263193a08e1402
2015-04-06 10:04:16 -07:00
Mark Salyzyn 8b2c7dee59 libcutils: add fs_config
Bug: 19908228
Change-Id: I78e6a8d780e578a287ffdee7b7120ecc74797e80
2015-04-06 10:04:15 -07:00
Elliott Hughes 5605c10a87 am 101c57f7: Merge "Disable CR/LF translation for adb interactive shell."
* commit '101c57f71b401a5b35fd5f7117949cc03760e16d':
  Disable CR/LF translation for adb interactive shell.
2015-04-05 17:11:46 +00:00
Elliott Hughes 101c57f71b Merge "Disable CR/LF translation for adb interactive shell." 2015-04-05 17:03:38 +00:00
Alistair Buxton dfa09fd635 Disable CR/LF translation for adb interactive shell.
adb shell uses termios to disable canonical input processing in order to
get raw control codes but it does not disable CR/LF translation. The default
for Linux terminals is to convert CR to LF unless the running program
specifically asks for this to be disabled. Since adb does not, there is no
way to send a CR to any program run on adb shell. Many programs do in fact
differentiate and so are broken by this behaviour, notably nano. This patch
sets the termios flags to disable all line ending translation.

Change-Id: I8b950220f7cc52fefaed2ee37d97e0789b40a078
Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com>
2015-04-05 10:02:34 -07:00
Elliott Hughes d5fe0031f6 am 6d951c2c: Merge "Remove execonce."
* commit '6d951c2c3fd4af4459d86ce81068e01873aa2ea8':
  Remove execonce.
2015-04-04 15:49:59 +00:00
Elliott Hughes 6d951c2c3f Merge "Remove execonce." 2015-04-04 15:42:04 +00:00
Elliott Hughes 6a99ff0adf am 3a4aedfc: Merge "sdcard: Properly handle deleted nodes"
* commit '3a4aedfcd3354b903aa48a836cb55ee01db9f896':
  sdcard: Properly handle deleted nodes
2015-04-04 00:34:42 +00:00
Elliott Hughes 3a4aedfcd3 Merge "sdcard: Properly handle deleted nodes" 2015-04-04 00:27:46 +00:00
Dan Albert 7a87d05974 Cleanup base/logging.
Some of this code was unused, most didn't need to be exposed, and we
can just use basename(3).

Also use a better default program name than "unknown".

Change-Id: I62d990f64e4fd0c16aa4b7e907dd06e4f26ddcdd
2015-04-03 16:49:55 -07:00
Elliott Hughes a62eac5ca0 am 50f192fa: Merge "Fix "adb devices -l"."
* commit '50f192fafa7af2929c663a37dc4dc56610c07b41':
  Fix "adb devices -l".
2015-04-03 23:38:44 +00:00
Elliott Hughes 50f192fafa Merge "Fix "adb devices -l"." 2015-04-03 23:30:37 +00:00
Dan Albert de0e80d20d am f78ff16a: Merge "Support arbitrary loggers."
* commit 'f78ff16aeed0e997124dff594f1ddc193741a7b3':
  Support arbitrary loggers.
2015-04-03 23:28:40 +00:00
Dan Albert f78ff16aee Merge "Support arbitrary loggers." 2015-04-03 23:23:07 +00:00
Dan Albert b547c85b5b Support arbitrary loggers.
While the defaults (logd or stderr) make sense for most use cases,
there are places that can only log to the kernel, or need to log to a
file, etc.

Allow the user to pass in an arbitrary logging object, and provide
LogdLogger and StderrLogger as defaults.

Change-Id: I62368acc795ff313242bb205d65017404bf64e88
2015-04-03 16:22:39 -07:00
Elliott Hughes 09a45a1927 Fix "adb devices -l".
Change 055f1aa4ff switched to using isalnum(3)
but didn't take into account that isalnum has the opposite sense to the
function it replaced, so the tests should have been inverted.

Bug: http://b/20056546
Change-Id: I90630c0bea69ddbb4a95dc09f79f49d23fd497de
2015-04-03 16:12:15 -07:00
Elliott Hughes 7c1945254e am ea975880: Merge "Only Windows doesn\'t have %zd."
* commit 'ea975880112c27293800ede36e0323ff2a7b9322':
  Only Windows doesn't have %zd.
2015-04-03 20:30:46 +00:00
Elliott Hughes ea97588011 Merge "Only Windows doesn't have %zd." 2015-04-03 20:16:27 +00:00
Elliott Hughes 146c244613 Only Windows doesn't have %zd.
Change-Id: Ie09619df212cf7c8aa18a6d46c3e6b6ca3f478cf
2015-04-03 12:53:36 -07:00
Dan Albert f1c534b7d7 am eb560133: Merge "Share log writing code."
* commit 'eb56013348668a292fb7302e34752a2b9cbcb834':
  Share log writing code.
2015-04-03 18:00:55 +00:00
Dan Albert eb56013348 Merge "Share log writing code." 2015-04-03 17:51:13 +00:00
Dan Albert c7aadc49d3 Share log writing code.
__android_log_write() was just a special form of
__android_log_buf_write that used a default log ID and set the abort
message for fatal messages. Presumably the latter was intended to be
set for __android_log_buf_write as well.

Change-Id: I51cff7561a2754676b2088d95fa4f4505ac3c3c2
2015-04-03 10:41:59 -07:00
Dan Albert 199ef0a698 am 87eca3cb: Merge "Support logging to other log buffers."
* commit '87eca3cb4b1593d36945aad90cb179c4c5c906be':
  Support logging to other log buffers.
2015-04-03 17:30:42 +00:00
Dan Albert 87eca3cb4b Merge "Support logging to other log buffers." 2015-04-03 17:21:45 +00:00
Dan Albert 0c055863eb Support logging to other log buffers.
LOGTO(dest, severity) and PLOGTO(dest, severity) log to other log
buffers. For example, `LOGTO(SYSTEM, FATAL) << "Foobar";`.

Change-Id: Id1ca1c8fdae72d69b73945ae9b006525d0be1582
2015-04-03 10:14:48 -07:00
Dan Albert 5a50b16e38 am 8ea5dd8c: Merge "Remove LogMessage::LogLineLowStack."
* commit '8ea5dd8c6e14e889e917a7e51a1b62bd49ca1dab':
  Remove LogMessage::LogLineLowStack.
2015-04-03 16:59:21 +00:00
Dan Albert 90e737a484 am cc71951a: Merge "Don\'t show lint errors for rvalue references."
* commit 'cc71951a8a6ffac2bd70d99fe25860f7bb71c5ec':
  Don't show lint errors for rvalue references.
2015-04-03 16:59:20 +00:00
Dan Albert 8ea5dd8c6e Merge "Remove LogMessage::LogLineLowStack." 2015-04-03 16:52:02 +00:00
Dan Albert cc71951a8a Merge "Don't show lint errors for rvalue references." 2015-04-03 16:51:42 +00:00