diff options
author | mukesh agrawal <quiche@google.com> | 2016-10-06 15:11:59 -0700 |
---|---|---|
committer | mukesh agrawal <quiche@google.com> | 2016-10-11 18:25:04 -0700 |
commit | b8f8f6ab38fe147fa7aed5cdd9f9ce0e5a3a2e2f (patch) | |
tree | 72dd9c0b1bbab2dd4e4830711a47d88e07a15038 /raw_os.cpp | |
parent | fde5bda852c87fa190002b14fed511b7d4a65a50 (diff) | |
download | wifilogd-b8f8f6ab38fe147fa7aed5cdd9f9ce0e5a3a2e2f.tar.gz |
Os: add Write() method
If we're going to dump log messages, we need to
be able to write to a file descriptor. Plumb up
write(), via Os::Write().
Bug: 31997280
Test: ./runtests.sh
Change-Id: I0ebdf2f33dd1f458116e9bbf51ae82e51d107d42
Diffstat (limited to 'raw_os.cpp')
-rw-r--r-- | raw_os.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -15,6 +15,7 @@ */ #include <time.h> +#include <unistd.h> #include "wifilogd/raw_os.h" @@ -32,5 +33,9 @@ int RawOs::ClockGettime(clockid_t clock_id, struct timespec* ts) const { return clock_gettime(clock_id, ts); } +ssize_t RawOs::Write(int fd, const void* buf, size_t buflen) { + return write(fd, buf, buflen); +} + } // namespace wifilogd } // namespace android |