login: log PAM errors to syslog, not stderr
[oweals/busybox.git] / docs / new-applet-HOWTO.txt
index 05ff92f2614a030bf0a80ba92d5476f46e62abb7..0646e728e0aeaafbdf45b572065775f10972614c 100644 (file)
@@ -9,7 +9,7 @@ Mark Whitley - the remix
 Thomas Lundquist - Trying to keep it updated.
 
 When doing this you should consider using the latest svn trunk.
-This is a good thing if you plan to getting it commited into mainline.
+This is a good thing if you plan to getting it committed into mainline.
 
 Initial Write
 -------------
@@ -42,10 +42,11 @@ For a new applet mu, here is the code that would go in mu.c:
 #include "libbb.h"
 #include "other.h"
 
-int mu_main(int argc, char **argv);
+int mu_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int mu_main(int argc, char **argv)
 {
        int fd;
+       ssize_t n;
        char mu;
 
        fd = xopen("/dev/random", O_RDONLY);
@@ -106,7 +107,7 @@ the function declaration. If not, add it somewhere anyway, with or without
 ifdefs to include or not.
 
 You can look at libbb/Config.in and try to find out if the function is
-tuneable and add it there if it is.
+tunable and add it there if it is.
 
 
 Placement / Directory
@@ -123,7 +124,7 @@ lib-$(CONFIG_MU)               += mu.o
 
 Add the applet to Config.in in the chosen directory:
 
-config CONFIG_MU
+config MU
        bool "MU"
        default n
        help
@@ -161,7 +162,7 @@ algorithm in busybox.c and the Gods of BusyBox smite you. Yea, verily:
 Be sure to read the top of applets.h before adding your applet.
 
        /* all programs above here are alphabetically "less than" 'mu' */
-       USE_MU(APPLET(mu, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+       IF_MU(APPLET(mu, _BB_DIR_USR_BIN, _BB_SUID_DROP))
        /* all programs below here are alphabetically "greater than" 'mu' */