Dumping stack traces to proto.
Bug: 72177715
Test: flash device and check incident.proto output
Change-Id: Id2a15e0fc62b66efe875949af97f0eb651c7e322
(cherry picked from commit 5c804e2b9893c7892900148229cf19fa6268e7dc)
diff --git a/cmds/incidentd/src/FdBuffer.h b/cmds/incidentd/src/FdBuffer.h
index 66a3de1..34ebcf5 100644
--- a/cmds/incidentd/src/FdBuffer.h
+++ b/cmds/incidentd/src/FdBuffer.h
@@ -41,6 +41,12 @@
status_t read(int fd, int64_t timeoutMs);
/**
+ * Read the data until we hit eof.
+ * Returns NO_ERROR if there were no errors.
+ */
+ status_t readFully(int fd);
+
+ /**
* Read processed results by streaming data to a parsing process, e.g. incident helper.
* The parsing process provides IO fds which are 'toFd' and 'fromFd'. The function
* reads original data in 'fd' and writes to parsing process through 'toFd', then it reads