logcat: error on multiple PID argument
Since they are dropped. Bug: N/A Test: manual try w/ 1 and 2 --pid arguments Change-Id: I5945c12dc080a8c046b8071106f7d87ecb2b018c
This commit is contained in:
parent
f7970cee69
commit
b0e867a1e6
1 changed files with 5 additions and 0 deletions
|
@ -899,6 +899,11 @@ static int __logcat(android_logcat_context_internal* context) {
|
|||
case 0:
|
||||
// only long options
|
||||
if (long_options[option_index].name == pid_str) {
|
||||
if (pid != 0) {
|
||||
logcat_panic(context, HELP_TRUE, "Only supports one PID argument.\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
// ToDo: determine runtime PID_MAX?
|
||||
if (!getSizeTArg(optarg, &pid, 1)) {
|
||||
logcat_panic(context, HELP_TRUE, "%s %s out of range\n",
|
||||
|
|
Loading…
Reference in a new issue