pgrep: distinguish between invalid commandline parameters and '-?'

A patch from Debian.

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413383
Backported-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Jan Christoph Nordholz 2009-11-24 11:00:49 +11:00 committed by Craig Small
parent 551d7e4114
commit c73a449482

View File

@ -684,7 +684,7 @@ static void parse_opts (int argc, char **argv)
// case 'z': // Solaris: match by zone ID
// break;
case '?':
usage (opt);
usage (optopt ? optopt : opt);
break;
}
}