summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2013-11-14 09:54:24 +0100
committerDenys Vlasenko2013-11-14 09:54:24 +0100
commit36184a487d20d4ae168c2ae247dd064b1e9f4f64 (patch)
treefa372b1332342106eb4f1ccdbf504dd1b86d129c
parent66620fa62691271d777d11c562f894c65cd4f094 (diff)
downloadbusybox-36184a487d20d4ae168c2ae247dd064b1e9f4f64.zip
busybox-36184a487d20d4ae168c2ae247dd064b1e9f4f64.tar.gz
archival/*: move "applet:" snippets into .c files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/ar.c1
-rw-r--r--archival/bbunzip.c8
-rw-r--r--archival/bzip2.c1
-rw-r--r--archival/cpio.c2
-rw-r--r--archival/dpkg.c2
-rw-r--r--archival/dpkg_deb.c1
-rw-r--r--archival/gzip.c1
-rw-r--r--archival/lzop.c1
-rw-r--r--archival/rpm.c1
-rw-r--r--archival/rpm2cpio.c1
-rw-r--r--archival/tar.c1
-rw-r--r--include/applets.src.h15
12 files changed, 15 insertions, 20 deletions
diff --git a/archival/ar.c b/archival/ar.c
index 0a8d828..866856f 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -17,6 +17,7 @@
* http://www.unix-systems.org/single_unix_specification_v2/xcu/ar.html
*/
+//applet:IF_AR(APPLET(ar, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_AR) += ar.o
//usage:#define ar_trivial_usage
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index f2d796e..d34f568 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -215,6 +215,7 @@ char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext)
//usage: "\n -c Write to stdout"
//usage: "\n -f Overwrite"
+//applet:IF_UNCOMPRESS(APPLET(uncompress, BB_DIR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_UNCOMPRESS) += bbunzip.o
#if ENABLE_UNCOMPRESS
static
@@ -256,9 +257,6 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv)
* Portions of the lzw code are derived from the public domain 'compress'
* written by Spencer Thomas, Joe Orost, James Woods, Jim McKie, Steve Davies,
* Ken Turkowski, Dave Mack and Peter Jannesen.
- *
- * See the license_msg below and the file COPYING for the software license.
- * See the file algorithm.doc for the compression algorithms and file formats.
*/
//usage:#define gunzip_trivial_usage
//usage: "[-cft] [FILE]..."
@@ -280,6 +278,8 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv)
//usage:#define zcat_full_usage "\n\n"
//usage: "Decompress to stdout"
+//applet:IF_GUNZIP(APPLET(gunzip, BB_DIR_BIN, BB_SUID_DROP))
+//applet:IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat))
//kbuild:lib-$(CONFIG_GZIP) += bbunzip.o
//kbuild:lib-$(CONFIG_GUNZIP) += bbunzip.o
#if ENABLE_GUNZIP
@@ -432,6 +432,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
//usage:#define xzcat_full_usage "\n\n"
//usage: "Decompress to stdout"
+//applet:IF_UNLZMA(APPLET(unlzma, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_UNLZMA) += bbunzip.o
#if ENABLE_UNLZMA
static
@@ -458,6 +459,7 @@ int unlzma_main(int argc UNUSED_PARAM, char **argv)
#endif
+//applet:IF_UNXZ(APPLET(unxz, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_UNXZ) += bbunzip.o
#if ENABLE_UNXZ
static
diff --git a/archival/bzip2.c b/archival/bzip2.c
index 485afeb..eabd1c2 100644
--- a/archival/bzip2.c
+++ b/archival/bzip2.c
@@ -7,6 +7,7 @@
* about bzip2 library code.
*/
+//applet:IF_BZIP2(APPLET(bzip2, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_BZIP2) += bzip2.o
//usage:#define bzip2_trivial_usage
diff --git a/archival/cpio.c b/archival/cpio.c
index c228aab..41eb6f6 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -9,11 +9,11 @@
* Limitations:
* Doesn't check CRC's
* Only supports new ASCII and CRC formats
- *
*/
#include "libbb.h"
#include "bb_archive.h"
+//applet:IF_CPIO(APPLET(cpio, BB_DIR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_CPIO) += cpio.o
//usage:#define cpio_trivial_usage
diff --git a/archival/dpkg.c b/archival/dpkg.c
index cd88a79..288e7fa 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -25,9 +25,9 @@
*
* bugs that need to be fixed
* - (unknown, please let me know when you find any)
- *
*/
+//applet:IF_DPKG(APPLET(dpkg, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_DPKG) += dpkg.o
//usage:#define dpkg_trivial_usage
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index 39ae3e4..6924f89 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -5,6 +5,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//applet:IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, BB_DIR_USR_BIN, BB_SUID_DROP, dpkg_deb))
//kbuild:lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o
//usage:#define dpkg_deb_trivial_usage
diff --git a/archival/gzip.c b/archival/gzip.c
index c850d5f..5d6fdb9 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -39,6 +39,7 @@ gzip: bogus: No such file or directory
aa: 85.1% -- replaced with aa.gz
*/
+//applet:IF_GZIP(APPLET(gzip, BB_DIR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_GZIP) += gzip.o
//usage:#define gzip_trivial_usage
diff --git a/archival/lzop.c b/archival/lzop.c
index 3c29b6e..a7b42ac 100644
--- a/archival/lzop.c
+++ b/archival/lzop.c
@@ -25,6 +25,7 @@
"Minimalized" for busybox by Alain Knaff
*/
+//applet:IF_UNZIP(APPLET(unzip, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_LZOP) += lzop.o
//usage:#define lzop_trivial_usage
diff --git a/archival/rpm.c b/archival/rpm.c
index 3c386d2..81a1d1d 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -7,6 +7,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//applet:IF_RPM(APPLET(rpm, BB_DIR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_RPM) += rpm.o
//usage:#define rpm_trivial_usage
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c
index cd6786c..c48fc14 100644
--- a/archival/rpm2cpio.c
+++ b/archival/rpm2cpio.c
@@ -7,6 +7,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//applet:IF_RPM2CPIO(APPLET(rpm2cpio, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o
//usage:#define rpm2cpio_trivial_usage
diff --git a/archival/tar.c b/archival/tar.c
index f75a82a..2504258 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -42,6 +42,7 @@
* This doesn't feel right, and IIRC GNU tar doesn't do that.
*/
+//applet:IF_TAR(APPLET(tar, BB_DIR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_TAR) += tar.o
#include <fnmatch.h>
diff --git a/include/applets.src.h b/include/applets.src.h
index 0ba88f9..0edfaac 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -79,7 +79,6 @@ IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP))
IF_ADDGROUP(APPLET(addgroup, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_ADDUSER(APPLET(adduser, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP))
-IF_AR(APPLET(ar, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_ARP(APPLET(arp, BB_DIR_SBIN, BB_SUID_DROP))
IF_ARPING(APPLET(arping, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_BASENAME(APPLET_NOFORK(basename, basename, BB_DIR_USR_BIN, BB_SUID_DROP, basename))
@@ -87,7 +86,6 @@ IF_BBCONFIG(APPLET(bbconfig, BB_DIR_BIN, BB_SUID_DROP))
IF_BEEP(APPLET(beep, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_BLKID(APPLET(blkid, BB_DIR_SBIN, BB_SUID_DROP))
IF_BRCTL(APPLET(brctl, BB_DIR_USR_SBIN, BB_SUID_DROP))
-IF_BZIP2(APPLET(bzip2, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CAL(APPLET(cal, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CAT(APPLET_NOFORK(cat, cat, BB_DIR_BIN, BB_SUID_DROP, cat))
IF_CATV(APPLET(catv, BB_DIR_BIN, BB_SUID_DROP))
@@ -106,7 +104,6 @@ IF_CKSUM(APPLET_NOEXEC(cksum, cksum, BB_DIR_USR_BIN, BB_SUID_DROP, cksum))
IF_CLEAR(APPLET(clear, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp))
-IF_CPIO(APPLET(cpio, BB_DIR_BIN, BB_SUID_DROP))
IF_CROND(APPLET(crond, BB_DIR_USR_SBIN, BB_SUID_DROP))
/* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */
IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
@@ -126,8 +123,6 @@ IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP))
IF_DNSD(APPLET(dnsd, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_HOSTNAME(APPLET_ODDNAME(dnsdomainname, hostname, BB_DIR_BIN, BB_SUID_DROP, dnsdomainname))
IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, dos2unix))
-IF_DPKG(APPLET(dpkg, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, BB_DIR_USR_BIN, BB_SUID_DROP, dpkg_deb))
IF_DU(APPLET(du, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_DUMPKMAP(APPLET(dumpkmap, BB_DIR_BIN, BB_SUID_DROP))
IF_DUMPLEASES(APPLET(dumpleases, BB_DIR_USR_BIN, BB_SUID_DROP))
@@ -172,8 +167,6 @@ IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_GETTY(APPLET(getty, BB_DIR_SBIN, BB_SUID_DROP))
-IF_GUNZIP(APPLET(gunzip, BB_DIR_BIN, BB_SUID_DROP))
-IF_GZIP(APPLET(gzip, BB_DIR_BIN, BB_SUID_DROP))
IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP))
IF_HEAD(APPLET_NOEXEC(head, head, BB_DIR_USR_BIN, BB_SUID_DROP, head))
@@ -303,8 +296,6 @@ IF_RFKILL(APPLET(rfkill, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_RM(APPLET_NOFORK(rm, rm, BB_DIR_BIN, BB_SUID_DROP, rm))
IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir))
IF_ROUTE(APPLET(route, BB_DIR_SBIN, BB_SUID_DROP))
-IF_RPM(APPLET(rpm, BB_DIR_BIN, BB_SUID_DROP))
-IF_RPM2CPIO(APPLET(rpm2cpio, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, BB_DIR_BIN, BB_SUID_DROP, run_parts))
IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP))
@@ -357,7 +348,6 @@ IF_BB_SYSCTL(APPLET(sysctl, BB_DIR_SBIN, BB_SUID_DROP))
IF_SYSLOGD(APPLET(syslogd, BB_DIR_SBIN, BB_SUID_DROP))
IF_TAC(APPLET_NOEXEC(tac, tac, BB_DIR_USR_BIN, BB_SUID_DROP, tac))
IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_TAR(APPLET(tar, BB_DIR_BIN, BB_SUID_DROP))
IF_TASKSET(APPLET(taskset, BB_DIR_USR_BIN, BB_SUID_DROP))
/* IF_TC(APPLET(tc, BB_DIR_SBIN, BB_SUID_DROP)) */
IF_TCPSVD(APPLET_ODDNAME(tcpsvd, tcpudpsvd, BB_DIR_USR_BIN, BB_SUID_DROP, tcpsvd))
@@ -386,14 +376,10 @@ IF_UDHCPD(APPLET(udhcpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, BB_DIR_USR_BIN, BB_SUID_DROP, udpsvd))
IF_UMOUNT(APPLET(umount, BB_DIR_BIN, BB_SUID_DROP))
IF_UNAME(APPLET(uname, BB_DIR_BIN, BB_SUID_DROP))
-IF_UNCOMPRESS(APPLET(uncompress, BB_DIR_BIN, BB_SUID_DROP))
IF_UNEXPAND(APPLET_ODDNAME(unexpand, expand, BB_DIR_USR_BIN, BB_SUID_DROP, unexpand))
IF_UNIQ(APPLET(uniq, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_UNIX2DOS(APPLET_NOEXEC(unix2dos, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, unix2dos))
-IF_UNXZ(APPLET(unxz, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_UNLZMA(APPLET(unlzma, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_LZOP(APPLET_ODDNAME(unlzop, lzop, BB_DIR_USR_BIN, BB_SUID_DROP, unlzop))
-IF_UNZIP(APPLET(unzip, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_UPTIME(APPLET(uptime, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_USLEEP(APPLET_NOFORK(usleep, usleep, BB_DIR_BIN, BB_SUID_DROP, usleep))
IF_UUDECODE(APPLET(uudecode, BB_DIR_USR_BIN, BB_SUID_DROP))
@@ -411,7 +397,6 @@ IF_WHOAMI(APPLET_NOFORK(whoami, whoami, BB_DIR_USR_BIN, BB_SUID_DROP, whoami))
IF_UNXZ(APPLET_ODDNAME(xzcat, unxz, BB_DIR_USR_BIN, BB_SUID_DROP, xzcat))
IF_XZ(APPLET_ODDNAME(xz, unxz, BB_DIR_USR_BIN, BB_SUID_DROP, xz))
IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes))
-IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat))
IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP))
#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) \