commit | 13496116b9cadd69f562da8f9c5c1a106fe1ca3f | [log] [tgz] |
---|---|---|
author | Tom Cherry <tomcherry@google.com> | Thu Aug 06 14:49:51 2020 -0700 |
committer | Tom Cherry <tomcherry@google.com> | Fri Aug 07 09:48:16 2020 -0700 |
tree | d441442967c458dc28b40e102f9755ace02d81a9 | |
parent | 8022895adffe008ffeb9ec3eabd9e2b968b682eb [diff] |
logd: consolidate command handling and fix an error check Consolidate command handling for commands that take a buffer ID as their first argument. Further use ParseUint instead of atoi(), since atoi("bad string") returns `0` is the same as LOG_ID_MAIN. Test: these commands are handled property Test: `echo -n 'getLogSize ignoreme!\0' | nc -U /dev/socket/logd` returns an error Change-Id: I3e84a6157e16f4c110681da453e1ae1a920da7c4