From 1af18c260a87dc38f0e33bfeb6de6163f91be4ad Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 11 Feb 2012 20:33:17 +0100 Subject: [PATCH] pkill: remove -v match inversion option The option -v does not make much sense in pkill context. Reported-By: "Jason A. Spiro" Bug-Debian: http://bugs.debian.org/558044 Signed-off-by: Sami Kerola --- pgrep.1 | 2 +- pgrep.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pgrep.1 b/pgrep.1 index a7bb60fc..8f7cd8ea 100644 --- a/pgrep.1 +++ b/pgrep.1 @@ -110,7 +110,7 @@ Only match processes whose real user ID is listed. Either the numerical or symbolical value may be used. .TP \fB\-v\fR, \fB\-\-inverse\fR\fR -Negates the matching. +Negates the matching. (\fBpgrep\fP only.) .TP \fB\-x\fR, \fB\-\-exact\fR\fR Only match processes whose name (or command line if \-f is specified) diff --git a/pgrep.c b/pgrep.c index 47e3b499..6c6d2618 100644 --- a/pgrep.c +++ b/pgrep.c @@ -87,7 +87,8 @@ static int __attribute__ ((__noreturn__)) usage(int opt) if (i_am_pkill == 0) { fputs(_(" -c, --count count of matching processes\n" " -d, --delimeter specify output delimeter\n" - " -l, --list-name list PID and process name\n"), fp); + " -l, --list-name list PID and process name\n" + " -v, --inverse negates the matching\n"), fp); } if (i_am_pkill == 1) { fputs(_(" -, --signal signal to send (either number or name)\n" @@ -103,7 +104,6 @@ static int __attribute__ ((__noreturn__)) usage(int opt) " -t, --terminal match by controlling terminal\n" " -u, --euid match by effective IDs\n" " -U, --uid match by real IDs\n" - " -v, --inverse negates the matching\n" " -x, --exact match exectly with command name\n" " -F, --pidfile read PIDs from file\n" " -L, --logpidfile fail if PID file is not locked\n"), fp); @@ -616,10 +616,10 @@ static void parse_opts (int argc, char **argv) strcat (opts, "e"); } else { /* These options are for pgrep only */ - strcat (opts, "cld:"); + strcat (opts, "cld:v"); } - strcat (opts, "LF:fnovxP:g:s:u:U:G:t:?Vh"); + strcat (opts, "LF:fnoxP:g:s:u:U:G:t:?Vh"); while ((opt = getopt_long (argc, argv, opts, longopts, NULL)) != -1) { switch (opt) { -- 2.40.0