typo fix in a comment in a testcase. oh well...
[oweals/busybox.git] / coreutils / nice.c
index dbd90648d7ba2b984b6415e97a5329e0c78bfd93..d24a95b45f85ed3763b370e47b3bba4c1ca662b3 100644 (file)
@@ -8,8 +8,9 @@
  */
 
 #include <sys/resource.h>
-#include "busybox.h"
+#include "libbb.h"
 
+int nice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int nice_main(int argc, char **argv)
 {
        int old_priority, adjustment;
@@ -17,8 +18,8 @@ int nice_main(int argc, char **argv)
        old_priority = getpriority(PRIO_PROCESS, 0);
 
        if (!*++argv) { /* No args, so (GNU) output current nice value. */
-               bb_printf("%d\n", old_priority);
-               bb_fflush_stdout_and_exit(EXIT_SUCCESS);
+               printf("%d\n", old_priority);
+               fflush_stdout_and_exit(EXIT_SUCCESS);
        }
 
        adjustment = 10;                        /* Set default adjustment. */
@@ -46,9 +47,9 @@ int nice_main(int argc, char **argv)
                }
        }
 
-       execvp(*argv, argv);            /* Now exec the desired program. */
+       BB_EXECVP(*argv, argv);         /* Now exec the desired program. */
 
        /* The exec failed... */
        xfunc_error_retval = (errno == ENOENT) ? 127 : 126; /* SUSv3 */
-       bb_perror_msg_and_die("%s", *argv);
+       bb_simple_perror_msg_and_die(*argv);
 }