diff options
author | Elliott Hughes <enh@google.com> | 2020-07-24 15:47:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-07-24 15:47:03 +0000 |
commit | ba1bd64ca2af20d251fa9ee645d902c0a6480e34 (patch) | |
tree | 38cb29fcc9c0130c9a4bdab9125a835c55ae7e94 /debuggerd/libdebuggerd/utility.cpp | |
parent | d1bd5f20eb89c7c84599d0fd79e7e2a82f8f2b29 (diff) | |
parent | a660cb3f13ad369554678ea19753cbc7e92726f3 (diff) |
Merge "debuggerd: use One True timestamp function."
Diffstat (limited to 'debuggerd/libdebuggerd/utility.cpp')
-rw-r--r-- | debuggerd/libdebuggerd/utility.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/debuggerd/libdebuggerd/utility.cpp b/debuggerd/libdebuggerd/utility.cpp index c8032eb90..f43092c21 100644 --- a/debuggerd/libdebuggerd/utility.cpp +++ b/debuggerd/libdebuggerd/utility.cpp @@ -239,23 +239,6 @@ void dump_memory(log_t* log, unwindstack::Memory* memory, uint64_t addr, const s } } -void read_with_default(const char* path, char* buf, size_t len, const char* default_value) { - unique_fd fd(open(path, O_RDONLY | O_CLOEXEC)); - if (fd != -1) { - int rc = TEMP_FAILURE_RETRY(read(fd.get(), buf, len - 1)); - if (rc != -1) { - buf[rc] = '\0'; - - // Trim trailing newlines. - if (rc > 0 && buf[rc - 1] == '\n') { - buf[rc - 1] = '\0'; - } - return; - } - } - strcpy(buf, default_value); -} - void drop_capabilities() { __user_cap_header_struct capheader; memset(&capheader, 0, sizeof(capheader)); |