Merge "logcat: error on multiple PID argument"

am: 41a5c022b4

Change-Id: Idc6b3283854cef283ef37c0b8d8c4e8204a9e7f5
This commit is contained in:
Steven Moreland 2019-08-02 14:29:55 -07:00 committed by android-build-merger
commit 50b137c86e

View file

@ -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",