- don't free user-supplied string (via -e)
[oweals/busybox.git] / util-linux / setarch.c
index d7e1c091731ab07d917612bab97eb90ff6b597d5..250a93823bcf8f42b47837e9c4c461ee7585a58a 100644 (file)
@@ -7,16 +7,12 @@
  * Licensed under GPL v2 or later, see file License for details.
 */
 
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
 #include <sys/personality.h>
 
-#include "busybox.h"
+#include "libbb.h"
 
-int setarch_main(int ATTRIBUTE_UNUSED argc, char **argv)
+int setarch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int setarch_main(int argc UNUSED_PARAM, char **argv)
 {
        int pers = -1;
 
@@ -45,8 +41,8 @@ retry:
        if (personality(pers) >= 0) {
 
                /* Try to execute the program */
-               execvp(argv[0], argv);
+               BB_EXECVP(argv[0], argv);
        }
 
-       bb_perror_msg_and_die("%s", argv[0]);
+       bb_simple_perror_msg_and_die(argv[0]);
 }