summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2016-03-08 18:18:26 -0600
committerMark Salyzyn2017-02-08 15:37:44 -0600
commit62d0d2d683f5d19cf9d451548bd03c4b4f53c42e (patch)
tree6df22a249f02d030b93b7b4db8b5eb815a41614a /liblog/fake_log_device.c
parent8f2492f5821f7163a13c58286de8d0d419fefddc (diff)
downloadplatform-system-core-62d0d2d683f5d19cf9d451548bd03c4b4f53c42e.tar.gz
platform-system-core-62d0d2d683f5d19cf9d451548bd03c4b4f53c42e.tar.xz
platform-system-core-62d0d2d683f5d19cf9d451548bd03c4b4f53c42e.zip
liblog: add logprint to host build
- cleanup of some style issues - resolve a few minor bugs - add -lrt for host so that clock_gettime can be issued - enable write-only logging, logprint and event list handling tests for host consumption. NB: CtsLiblogTestCases_list is only outlet for host testing of the interfaces, but it is not part of any automated testing Test: gTest liblog-unit-tests, liblog-benchmarks and CtsLiblogTestCases_list && build mmma system/core/liblog Bug: 27405083 Change-Id: I13db1f45f67569407587a5a909248de33809b8cf
Diffstat (limited to 'liblog/fake_log_device.c')
-rw-r--r--liblog/fake_log_device.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/liblog/fake_log_device.c b/liblog/fake_log_device.c
index 957129ed9..1d7a157ae 100644
--- a/liblog/fake_log_device.c
+++ b/liblog/fake_log_device.c
@@ -612,7 +612,12 @@ static ssize_t logWritev(int fd, const struct iovec* vector, int count)
612 612
613bail: 613bail:
614 unlock(); 614 unlock();
615 return vector[0].iov_len + vector[1].iov_len + vector[2].iov_len; 615 int len = 0;
616 for (i = 0; i < count; ++i) {
617 len += vector[i].iov_len;
618 }
619 return len;
620
616error: 621error:
617 unlock(); 622 unlock();
618 return -1; 623 return -1;