ethr-wake: can use ether_hostton on uclibc >= 0.9.30
[oweals/busybox.git] / procps / renice.c
index 2964e20ea3020b8a5dad886ca0f85070da9baa93..ea5fc703e41e9b3b9921d18a691e512c026a796b 100644 (file)
  *   following IDs (if any).  Multiple switches are allowed.
  */
 
-#include "busybox.h"
+#include "libbb.h"
 #include <sys/resource.h>
 
 void BUG_bad_PRIO_PROCESS(void);
 void BUG_bad_PRIO_PGRP(void);
 void BUG_bad_PRIO_USER(void);
 
-int renice_main(int argc, char **argv);
-int renice_main(int argc, char **argv)
+int renice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int renice_main(int argc UNUSED_PARAM, char **argv)
 {
-       static const char Xetpriority_msg[] = "%cetpriority";
+       static const char Xetpriority_msg[] ALIGN1 = "%cetpriority";
 
        int retval = EXIT_SUCCESS;
        int which = PRIO_PROCESS;       /* Default 'which' value. */
@@ -67,8 +67,9 @@ int renice_main(int argc, char **argv)
        while ((arg = *++argv) != NULL) {
                /* Check for a mode switch. */
                if (arg[0] == '-' && arg[1]) {
-                       static const char opts[]
-                               = { 'p', 'g', 'u', 0, PRIO_PROCESS, PRIO_PGRP, PRIO_USER };
+                       static const char opts[] ALIGN1 = {
+                               'p', 'g', 'u', 0, PRIO_PROCESS, PRIO_PGRP, PRIO_USER
+                       };
                        const char *p = strchr(opts, arg[1]);
                        if (p) {
                                which = p[4];
@@ -83,7 +84,7 @@ int renice_main(int argc, char **argv)
                        struct passwd *p;
                        p = getpwnam(arg);
                        if (!p) {
-                               bb_error_msg("unknown user: %s", arg);
+                               bb_error_msg("unknown user %s", arg);
                                goto HAD_ERROR;
                        }
                        who = p->pw_uid;