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 | d66896d3649cd16950356551b70c5855288e27a0 (patch) | |
| tree | 38cb29fcc9c0130c9a4bdab9125a835c55ae7e94 /debuggerd/libdebuggerd/utility.cpp | |
| parent | f52019999ae54d49b407434df6d59770d5ec8d83 (diff) | |
| parent | f1a3d0b480bca46d51ea148516430664f0a1d554 (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 c8032eb90e..f43092c213 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)); |
