summaryrefslogtreecommitdiff
path: root/debuggerd/libdebuggerd/utility.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-07-24 15:47:03 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-07-24 15:47:03 +0000
commitba1bd64ca2af20d251fa9ee645d902c0a6480e34 (patch)
tree38cb29fcc9c0130c9a4bdab9125a835c55ae7e94 /debuggerd/libdebuggerd/utility.cpp
parentd1bd5f20eb89c7c84599d0fd79e7e2a82f8f2b29 (diff)
parenta660cb3f13ad369554678ea19753cbc7e92726f3 (diff)
Merge "debuggerd: use One True timestamp function."
Diffstat (limited to 'debuggerd/libdebuggerd/utility.cpp')
-rw-r--r--debuggerd/libdebuggerd/utility.cpp17
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));