diff options
Diffstat (limited to 'source/ucli/ucli.cc')
| -rw-r--r-- | source/ucli/ucli.cc | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/source/ucli/ucli.cc b/source/ucli/ucli.cc index d967d67..8b8460f 100644 --- a/source/ucli/ucli.cc +++ b/source/ucli/ucli.cc @@ -119,6 +119,23 @@ static void do_dump(const char *arg) { } } +static void do_dump_sa(const char *arg) { + static char variant_buf[STAND_ALONE_BUFFER_SIZE]; + int len; + int ret = 0; + + struct diag_ioctl_dump_param dump_param = { + .user_ptr_len = &len, + .user_buf_len = STAND_ALONE_BUFFER_SIZE, + .user_buf = variant_buf, + }; + + ret = diag_call_ioctl(IOCTL_DUMP_LOG_SA, (long)&dump_param); + if (ret == 0) { + do_extract(variant_buf, len); + } +} + static void do_pid(char *arg) { int pid = 0; int ret; @@ -133,9 +150,9 @@ static void do_pid(char *arg) { if (ret) { printf("Get pid info err: %d\n", ret); } - sleep(3); // after 3sec + sleep(3); // after 3sec - do_dump(""); + do_dump_sa(""); } static void do_tgid(char *arg) { @@ -154,7 +171,7 @@ static void do_tgid(char *arg) { } sleep(3); - do_dump(""); + do_dump_sa(""); } int main(int argc, char *argv[]) { |
