ash: in tryexec(), ensure we don't try to run embedded scripts as applets
[oweals/busybox.git] / procps / pmap.c
index 3dc733974f6790cc7cc8275248a48034fc78a81f..c8fa0d28064bc614acc7f8e048cfc795a4a4b644 100644 (file)
@@ -7,7 +7,6 @@
  * Licensed under GPLv2 or later, see the LICENSE file in this source tree
  * for details.
  */
-
 //config:config PMAP
 //config:      bool "pmap (6 kb)"
 //config:      default y
@@ -15,6 +14,7 @@
 //config:      Display processes' memory mappings.
 
 //applet:IF_PMAP(APPLET(pmap, BB_DIR_USR_BIN, BB_SUID_DROP))
+
 //kbuild:lib-$(CONFIG_PMAP) += pmap.o
 
 //usage:#define pmap_trivial_usage
@@ -96,8 +96,7 @@ int pmap_main(int argc UNUSED_PARAM, char **argv)
        unsigned opts;
        int ret;
 
-       opt_complementary = "-1"; /* min one arg */
-       opts = getopt32(argv, "xq");
+       opts = getopt32(argv, "^" "xq" "\0" "-1"); /* min one arg */
        argv += optind;
 
        ret = 0;