diff options
author | Ramon Fried <ramon.fried@gmail.com> | 2018-06-08 20:53:27 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-06-18 14:02:04 -0400 |
commit | e0212dfa1353310ab903263f8c737b8fb40b4fff (patch) | |
tree | c149ff63395e448d8939f76ac3beb3ce43cec55e /include/iotrace.h | |
parent | 501c89d33011e584b23e8e204e324512b4065948 (diff) |
iotrace: fix behaviour when buffer is full
Don't continue updating the offset when buffer is full.
When the buffer size exhausts and there's no space left to write
warn the user and update only the needed size and not both the
offset and needed size.
Add needed buffer size information in the iotrace command.
Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
Diffstat (limited to 'include/iotrace.h')
-rw-r--r-- | include/iotrace.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/iotrace.h b/include/iotrace.h index 063371f23f..be1d2753e1 100644 --- a/include/iotrace.h +++ b/include/iotrace.h @@ -146,11 +146,12 @@ void iotrace_set_buffer(ulong start, ulong size); * iotrace_get_buffer() - Get buffer information * * @start: Returns start address of buffer - * @size: Returns size of buffer in bytes + * @size: Returns actual size of buffer in bytes + * @needed_size: Returns needed size of buffer in bytes * @offset: Returns the byte offset where the next output trace record will * @count: Returns the number of trace records recorded * be written (or would be if the buffer was large enough) */ -void iotrace_get_buffer(ulong *start, ulong *size, ulong *offset, ulong *count); +void iotrace_get_buffer(ulong *start, ulong *size, ulong *needed_size, ulong *offset, ulong *count); #endif /* __IOTRACE_H */ |