|
PebbleOS v4.45.0-162-g88634f016
|
Backend operations. More...
#include <backend.h>
Data Fields | |
| int(* | init )(const struct pbl_coredump_backend *backend) |
| Bring up what the backend needs without OS services. | |
| int(* | start )(const struct pbl_coredump_backend *backend, bool forced, uint32_t timestamp) |
| Get ready to receive a dump. | |
| int(* | write )(const struct pbl_coredump_backend *backend, const void *data, size_t len) |
| Write the next bytes of the dump. | |
| size_t(* | space )(const struct pbl_coredump_backend *backend) |
| Get the bytes that can still be written. | |
| void(* | end )(const struct pbl_coredump_backend *backend) |
| The image is complete. | |
| int(* | stored_find )(const struct pbl_coredump_backend *backend, bool unread_only, uint32_t *id) |
| Find the most recent stored dump. | |
| int(* | stored_read )(const struct pbl_coredump_backend *backend, uint32_t id, uint32_t offset, void *buf, size_t len) |
| Read a stored dump. | |
| int(* | stored_mark_read )(const struct pbl_coredump_backend *backend, uint32_t id) |
| Mark a stored dump as read. | |
Backend operations.
| void(* pbl_coredump_backend_api::end) (const struct pbl_coredump_backend *backend) |
The image is complete.
Optional.
| int(* pbl_coredump_backend_api::init) (const struct pbl_coredump_backend *backend) |
Bring up what the backend needs without OS services.
Optional.
Runs before pbl_coredump_platform_prepare(), and must not change what is stored.
| size_t(* pbl_coredump_backend_api::space) (const struct pbl_coredump_backend *backend) |
Get the bytes that can still be written.
Lets the core end the image cleanly, between chunks. Optional, for unbounded outputs.
| int(* pbl_coredump_backend_api::start) (const struct pbl_coredump_backend *backend, bool forced, uint32_t timestamp) |
Get ready to receive a dump.
Stored dumps can be replaced from here on.
| backend | Backend. |
| forced | Replace a dump that has not been read yet, however recent. |
| timestamp | Wall clock time of the dump, in seconds. |
| int(* pbl_coredump_backend_api::stored_find) (const struct pbl_coredump_backend *backend, bool unread_only, uint32_t *id) |
Find the most recent stored dump.
Optional.
| backend | Backend. | |
| unread_only | Only consider dumps that have not been marked as read. | |
| [out] | id | Identifier of the dump. |
| int(* pbl_coredump_backend_api::stored_mark_read) (const struct pbl_coredump_backend *backend, uint32_t id) |
| int(* pbl_coredump_backend_api::stored_read) (const struct pbl_coredump_backend *backend, uint32_t id, uint32_t offset, void *buf, size_t len) |
Read a stored dump.
Required with stored_find.
| int(* pbl_coredump_backend_api::write) (const struct pbl_coredump_backend *backend, const void *data, size_t len) |
Write the next bytes of the dump.