]> granicus.if.org Git - psmisc/commitdiff
killall: change to getopt_long
authorCraig Small <csmall@enc.com.au>
Sun, 20 May 2018 10:46:55 +0000 (20:46 +1000)
committerCraig Small <csmall@enc.com.au>
Sun, 20 May 2018 10:46:55 +0000 (20:46 +1000)
with getopt_long_only -ve fails because its not sure what the -v
is for --version or --verbose. Changing to the non-_only version means
it doesn't try to expand the options to long options.

References:
 psmisc/psmisc#12

ChangeLog
src/killall.c

index 087c9474fcd2af939be3dd8b9282fa54b8b14834..6d5eaaae7f7bf3c03ddb010faf95d9b7d91df50a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ Changes in 23.2
 ===============
        * killall: look at all namespaces by default
        * killall: Fix -INT option parsing #11
+       * killall: change to getopt_long without _only #12
 Changes in 23.1
 ===============
        * killall: Remove debug output Debian: #864753
index 5fee135b8badaf896a86002d697a08d91e50effa..21c1090dff40ee25ed8db1fbb58ef5b68dc8ed32 100644 (file)
@@ -855,9 +855,9 @@ main (int argc, char **argv)
 
   opterr = 0;
 #ifdef WITH_SELINUX
-  while ( (optc = getopt_long_only(argc,argv,"egy:o:ilqrs:u:vwZ:VIn:",options,NULL)) != -1) {
+  while ( (optc = getopt_long(argc,argv,"egy:o:ilqrs:u:vwZ:VIn:",options,NULL)) != -1) {
 #else
-  while ( (optc = getopt_long_only(argc,argv,"egy:o:ilqrs:u:vwVIn:",options,NULL)) != -1) {
+  while ( (optc = getopt_long(argc,argv,"egy:o:ilqrs:u:vwVIn:",options,NULL)) != -1) {
 #endif
     switch (optc) {
     case 'e':