diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-19 00:45:46 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-19 00:45:46 +0200 |
commit | 854bb6879da7277446c7a943387e2880017804e0 (patch) | |
tree | c74e243cf123f0be6d692eadf12944137f686a15 | |
parent | 0863e1a576c4b26bb87564b3a403f1094814f1aa (diff) | |
download | busybox-854bb6879da7277446c7a943387e2880017804e0.tar.gz |
printutils/*: convert to new-style "one file" applets
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | include/applets.src.h | 3 | ||||
-rw-r--r-- | printutils/Config.src | 18 | ||||
-rw-r--r-- | printutils/Kbuild.src | 4 | ||||
-rw-r--r-- | printutils/lpd.c | 9 | ||||
-rw-r--r-- | printutils/lpr.c | 17 |
5 files changed, 27 insertions, 24 deletions
diff --git a/include/applets.src.h b/include/applets.src.h index d243d89e1..9c4f9daa0 100644 --- a/include/applets.src.h +++ b/include/applets.src.h @@ -209,9 +209,6 @@ IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP)) IF_LOGIN(APPLET(login, BB_DIR_BIN, BB_SUID_REQUIRE)) IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname)) IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP)) -IF_LPD(APPLET(lpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) -IF_LPQ(APPLET_ODDNAME(lpq, lpqr, BB_DIR_USR_BIN, BB_SUID_DROP, lpq)) -IF_LPR(APPLET_ODDNAME(lpr, lpqr, BB_DIR_USR_BIN, BB_SUID_DROP, lpr)) IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls)) IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP)) IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP)) diff --git a/printutils/Config.src b/printutils/Config.src index cc4ab8d28..e53b9d093 100644 --- a/printutils/Config.src +++ b/printutils/Config.src @@ -7,22 +7,4 @@ menu "Print Utilities" INSERT -config LPD - bool "lpd" - default y - help - lpd is a print spooling daemon. - -config LPR - bool "lpr" - default y - help - lpr sends files (or standard input) to a print spooling daemon. - -config LPQ - bool "lpq" - default y - help - lpq is a print spool queue examination and manipulation program. - endmenu diff --git a/printutils/Kbuild.src b/printutils/Kbuild.src index 194fe01d6..10c823063 100644 --- a/printutils/Kbuild.src +++ b/printutils/Kbuild.src @@ -4,6 +4,4 @@ lib-y := -lib-$(CONFIG_LPD) += lpd.o -lib-$(CONFIG_LPR) += lpr.o -lib-$(CONFIG_LPQ) += lpr.o +INSERT diff --git a/printutils/lpd.c b/printutils/lpd.c index c98bbb347..882393436 100644 --- a/printutils/lpd.c +++ b/printutils/lpd.c @@ -69,6 +69,15 @@ * cat ./"$DATAFILE" >/dev/lp0 * mv -f ./"$DATAFILE" save/ */ +//config:config LPD +//config: bool "lpd" +//config: default y +//config: help +//config: lpd is a print spooling daemon. + +//applet:IF_LPD(APPLET(lpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_LPD) += lpd.o //usage:#define lpd_trivial_usage //usage: "SPOOLDIR [HELPER [ARGS]]" diff --git a/printutils/lpr.c b/printutils/lpr.c index 70cda7717..ed6a84a93 100644 --- a/printutils/lpr.c +++ b/printutils/lpr.c @@ -11,6 +11,23 @@ * * See RFC 1179 for protocol description. */ +//config:config LPR +//config: bool "lpr" +//config: default y +//config: help +//config: lpr sends files (or standard input) to a print spooling daemon. +//config: +//config:config LPQ +//config: bool "lpq" +//config: default y +//config: help +//config: lpq is a print spool queue examination and manipulation program. + +//applet:IF_LPQ(APPLET_ODDNAME(lpq, lpqr, BB_DIR_USR_BIN, BB_SUID_DROP, lpq)) +//applet:IF_LPR(APPLET_ODDNAME(lpr, lpqr, BB_DIR_USR_BIN, BB_SUID_DROP, lpr)) + +//kbuild:lib-$(CONFIG_LPR) += lpr.o +//kbuild:lib-$(CONFIG_LPQ) += lpr.o //usage:#define lpr_trivial_usage //usage: "-P queue[@host[:port]] -U USERNAME -J TITLE -Vmh [FILE]..." |