- add libbb function str_tolower to convert a string to lowercase.
[oweals/busybox.git] / coreutils / nice.c
index dbd90648d7ba2b984b6415e97a5329e0c78bfd93..3285315288ffba71db6eb985fc50d2cbc19f0599 100644 (file)
@@ -10,6 +10,7 @@
 #include <sys/resource.h>
 #include "busybox.h"
 
+int nice_main(int argc, char **argv);
 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,7 +47,7 @@ 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 */