You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2017/03/06 21:19:18 UTC
[42/50] incubator-mynewt-core git commit: don't crash when dumping
logs from shell. Dump full logs.
don't crash when dumping logs from shell. Dump full logs.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/2242bc12
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/2242bc12
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/2242bc12
Branch: refs/heads/master
Commit: 2242bc12f239b54c1a3d1bc0cb38ec44437700ad
Parents: 84edc0e
Author: Sterling Hughes <st...@runtime.io>
Authored: Sat Mar 4 10:09:18 2017 -0800
Committer: Sterling Hughes <st...@runtime.io>
Committed: Sat Mar 4 10:09:28 2017 -0800
----------------------------------------------------------------------
sys/log/full/src/log_shell.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/2242bc12/sys/log/full/src/log_shell.c
----------------------------------------------------------------------
diff --git a/sys/log/full/src/log_shell.c b/sys/log/full/src/log_shell.c
index e0f6d71..ae1fd3d 100644
--- a/sys/log/full/src/log_shell.c
+++ b/sys/log/full/src/log_shell.c
@@ -71,6 +71,7 @@ int
shell_log_dump_all_cmd(int argc, char **argv)
{
struct log *log;
+ struct log_offset log_offset;
int rc;
log = NULL;
@@ -86,7 +87,12 @@ shell_log_dump_all_cmd(int argc, char **argv)
console_printf("Dumping log %s\n", log->l_name);
- rc = log_walk(log, shell_log_dump_entry, NULL);
+ log_offset.lo_arg = NULL;
+ log_offset.lo_ts = 0;
+ log_offset.lo_index = 0;
+ log_offset.lo_data_len = 0;
+
+ rc = log_walk(log, shell_log_dump_entry, &log_offset);
if (rc != 0) {
goto err;
}