Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f998119084 | ||
|
|
1e98f3741c | ||
|
|
ed058016bf | ||
|
|
cc272b06ee |
No files matched your search
@@ -83,21 +83,20 @@ config FEATURE_BUFFERS_GO_IN_BSS
|
||||
endchoice
|
||||
|
||||
config SHOW_USAGE
|
||||
bool "Show applet usage messages"
|
||||
bool "Show terse applet usage messages"
|
||||
default y
|
||||
help
|
||||
Enabling this option, BusyBox applets will show terse help messages
|
||||
when invoked with wrong arguments.
|
||||
If you do not want to show any (helpful) usage message when
|
||||
issuing wrong command syntax, you can say 'N' here,
|
||||
saving approximately 7k.
|
||||
All BusyBox applets will show help messages when invoked with
|
||||
wrong arguments. You can turn off printing these terse usage
|
||||
messages if you say no here.
|
||||
This will save you up to 7k.
|
||||
|
||||
config FEATURE_VERBOSE_USAGE
|
||||
bool "Show verbose applet usage messages"
|
||||
default y
|
||||
depends on SHOW_USAGE
|
||||
help
|
||||
All BusyBox applets will show verbose help messages when
|
||||
All BusyBox applets will show more verbose help messages when
|
||||
busybox is invoked with --help. This will add a lot of text to the
|
||||
busybox binary. In the default configuration, this will add about
|
||||
13k, but it can add much more depending on your configuration.
|
||||
@@ -107,8 +106,8 @@ config FEATURE_COMPRESS_USAGE
|
||||
default y
|
||||
depends on SHOW_USAGE
|
||||
help
|
||||
Store usage messages in .bz compressed form, uncompress them
|
||||
on-the-fly when <applet> --help is called.
|
||||
Store usage messages in compressed form, uncompress them on-the-fly
|
||||
when <applet> --help is called.
|
||||
|
||||
If you have a really tiny busybox with few applets enabled (and
|
||||
bunzip2 isn't one of them), the overhead of the decompressor might
|
||||
@@ -600,39 +599,12 @@ config CROSS_COMPILER_PREFIX
|
||||
|
||||
Native builds leave this empty.
|
||||
|
||||
config SYSROOT
|
||||
string "Path to sysroot"
|
||||
default ""
|
||||
help
|
||||
If you want to build BusyBox with a cross compiler, then you
|
||||
might also need to specify where /usr/include and /usr/lib
|
||||
will be found.
|
||||
|
||||
For example, BusyBox can be built against an installed
|
||||
Android NDK, platform version 9, for ARM ABI with
|
||||
|
||||
CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
|
||||
|
||||
Native builds leave this empty.
|
||||
|
||||
config EXTRA_CFLAGS
|
||||
string "Additional CFLAGS"
|
||||
default ""
|
||||
help
|
||||
Additional CFLAGS to pass to the compiler verbatim.
|
||||
|
||||
config EXTRA_LDFLAGS
|
||||
string "Additional LDFLAGS"
|
||||
default ""
|
||||
help
|
||||
Additional LDFLAGS to pass to the linker verbatim.
|
||||
|
||||
config EXTRA_LDLIBS
|
||||
string "Additional LDLIBS"
|
||||
default ""
|
||||
help
|
||||
Additional LDLIBS to pass to the linker with -l.
|
||||
|
||||
endmenu
|
||||
|
||||
menu 'Debugging Options'
|
||||
|
||||
@@ -47,11 +47,8 @@ the only commands busybox can find are the built-in ones.
|
||||
|
||||
Note that the standalone shell requires CONFIG_BUSYBOX_EXEC_PATH
|
||||
to be set appropriately, depending on whether or not /proc/self/exe is
|
||||
available. If you do not have /proc, then point that config option
|
||||
available or not. If you do not have /proc, then point that config option
|
||||
to the location of your busybox binary, usually /bin/busybox.
|
||||
Another solution is to patch the kernel (see
|
||||
examples/linux-*_proc_self_exe.patch) to make exec("/proc/self/exe")
|
||||
always work.
|
||||
|
||||
Configuring Busybox:
|
||||
====================
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 1
|
||||
PATCHLEVEL = 20
|
||||
SUBLEVEL = 2
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 4
|
||||
EXTRAVERSION =
|
||||
NAME = Unnamed
|
||||
|
||||
@@ -297,7 +297,6 @@ NM = $(CROSS_COMPILE)nm
|
||||
STRIP = $(CROSS_COMPILE)strip
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
|
||||
AWK = awk
|
||||
GENKSYMS = scripts/genksyms/genksyms
|
||||
DEPMOD = /sbin/depmod
|
||||
|
||||
+2
-45
@@ -74,12 +74,6 @@ ARCH_FPIC ?= -fpic
|
||||
ARCH_FPIE ?= -fpie
|
||||
ARCH_PIE ?= -pie
|
||||
|
||||
# Usage: $(eval $(call pkg_check_modules,VARIABLE-PREFIX,MODULES))
|
||||
define pkg_check_modules
|
||||
$(1)_CFLAGS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags $(2))
|
||||
$(1)_LIBS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs $(2))
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
|
||||
# on i386: 14% smaller libbusybox.so
|
||||
# (code itself is 9% bigger, we save on relocs/PLT/GOT)
|
||||
@@ -91,7 +85,6 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_STATIC),y)
|
||||
CFLAGS_busybox += -static
|
||||
PKG_CONFIG_FLAGS += --static
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PIE),y)
|
||||
@@ -104,40 +97,14 @@ CFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_CFLAGS)))
|
||||
#"))
|
||||
endif
|
||||
|
||||
# Note: both "" (string consisting of two quote chars) and empty string
|
||||
# are possible, and should be skipped below.
|
||||
ifneq ($(subst "",,$(CONFIG_SYSROOT)),)
|
||||
CFLAGS += --sysroot=$(CONFIG_SYSROOT)
|
||||
export SYSROOT=$(CONFIG_SYSROOT)
|
||||
endif
|
||||
|
||||
# Android has no separate crypt library
|
||||
# gcc-4.2.1 fails if we try to feed C source on stdin:
|
||||
# echo 'int main(void){return 0;}' | $(CC) $(CFLAGS) -lcrypt -o /dev/null -xc -
|
||||
# fall back to using a temp file:
|
||||
CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >crypttest.c; $(CC) $(CFLAGS) -lcrypt -o /dev/null crypttest.c >/dev/null 2>&1 && echo "y"; rm crypttest.c)
|
||||
ifeq ($(CRYPT_AVAILABLE),y)
|
||||
LDLIBS += m crypt
|
||||
else
|
||||
LDLIBS += m
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PAM),y)
|
||||
# libpam uses libpthread, so for static builds busybox must be linked to
|
||||
# libpthread. On some platforms that requires an explicit -lpthread, so
|
||||
# it should be in LDLIBS. For non-static builds, scripts/trylink will
|
||||
# take care of removing -lpthread if possible. (Not bothering to check
|
||||
# CONFIG_STATIC because even in a non-static build it could be that the
|
||||
# only libpam available is libpam.a, so -lpthread could still be
|
||||
# needed.)
|
||||
LDLIBS += pam pam_misc pthread
|
||||
LDLIBS += pam pam_misc
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SELINUX),y)
|
||||
SELINUX_PC_MODULES = libselinux libsepol
|
||||
$(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES)))
|
||||
CPPFLAGS += $(SELINUX_CFLAGS)
|
||||
LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%))
|
||||
LDLIBS += selinux sepol
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_EFENCE),y)
|
||||
@@ -158,16 +125,6 @@ ifneq (,$(findstring $(W_ELF2FLT),$(LDFLAGS) $(CFLAGS_busybox)))
|
||||
SKIP_STRIP = y
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_EXTRA_LDFLAGS),)
|
||||
EXTRA_LDFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_LDFLAGS)))
|
||||
#"))
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_EXTRA_LDLIBS),)
|
||||
LDLIBS += $(strip $(subst ",,$(CONFIG_EXTRA_LDLIBS)))
|
||||
#"))
|
||||
endif
|
||||
|
||||
# Busybox is a stack-fatty so make sure we increase default size
|
||||
# TODO: use "make stksizes" to find & fix big stack users
|
||||
# (we stole scripts/checkstack.pl from the kernel... thanks guys!)
|
||||
|
||||
@@ -2,8 +2,6 @@ Busybox TODO
|
||||
|
||||
Harvest patches from
|
||||
http://git.openembedded.org/cgit.cgi/openembedded/tree/recipes/busybox/
|
||||
https://dev.openwrt.org/browser/trunk/package/busybox/patches/
|
||||
|
||||
|
||||
Stuff that needs to be done. This is organized by who plans to get around to
|
||||
doing it eventually, but that doesn't mean they "own" the item. If you want to
|
||||
|
||||
@@ -80,8 +80,15 @@ int main(int argc, char **argv)
|
||||
|
||||
printf("#define NUM_APPLETS %u\n", NUM_APPLETS);
|
||||
if (NUM_APPLETS == 1) {
|
||||
char *dash_to_underscore, *p;
|
||||
printf("#define SINGLE_APPLET_STR \"%s\"\n", applets[0].name);
|
||||
printf("#define SINGLE_APPLET_MAIN %s_main\n", applets[0].main);
|
||||
/* Example: "ether-wake" -> "ether_wake" */
|
||||
p = dash_to_underscore = strdup(applets[0].name);
|
||||
p--;
|
||||
while (*++p)
|
||||
if (*p == '-')
|
||||
*p = '_';
|
||||
printf("#define SINGLE_APPLET_MAIN %s_main\n", dash_to_underscore);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
This directory contains examples of applets implemented as shell scripts.
|
||||
|
||||
So far these scripts are not hooked to the build system and are not
|
||||
installed by "make install". If you want to use them,
|
||||
you need to install them by hand.
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
# TODO: use getopt to avoid parsing options as filenames,
|
||||
# and to support -- and --help
|
||||
[ $# -ne 0 ] && DASH_I=-i
|
||||
sed $DASH_I -e 's/\r$//' "$@"
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
cat /etc/nologin.txt 2>/dev/null || echo "This account is not available"
|
||||
sleep 5
|
||||
exit 1
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
# TODO: use getopt to avoid parsing options as filenames,
|
||||
# and to support -- and --help
|
||||
for i in "$@"
|
||||
do
|
||||
sed -e '1!G;h;$!d' "$i"
|
||||
done
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
# TODO: use getopt to avoid parsing options as filenames,
|
||||
# and to support -- and --help
|
||||
[ $# -ne 0 ] && DASH_I=-i
|
||||
sed $DASH_I -e 's/$/\r/' "$@"
|
||||
+7
-16
@@ -32,10 +32,10 @@ config FEATURE_SEAMLESS_GZ
|
||||
Make tar, rpm, modprobe etc understand .gz data.
|
||||
|
||||
config FEATURE_SEAMLESS_Z
|
||||
bool "tar, rpm, modprobe etc understand .Z data"
|
||||
bool "Make tar and gunzip understand .Z data"
|
||||
default n
|
||||
help
|
||||
Make tar, rpm, modprobe etc understand .Z data.
|
||||
Make tar and gunzip understand .Z data.
|
||||
|
||||
config AR
|
||||
bool "ar"
|
||||
@@ -187,18 +187,6 @@ config FEATURE_GZIP_LONG_OPTIONS
|
||||
help
|
||||
Enable use of long options, increases size by about 106 Bytes
|
||||
|
||||
config GZIP_FAST
|
||||
int "Trade memory for gzip speed (0:small,slow - 2:fast,big)"
|
||||
default 0
|
||||
range 0 2
|
||||
depends on GZIP
|
||||
help
|
||||
Enable big memory options for gzip.
|
||||
0: small buffers, small hash-tables
|
||||
1: larger buffers, larger hash-tables
|
||||
2: larger buffers, largest hash-tables
|
||||
Larger models may give slightly better compression
|
||||
|
||||
config LZOP
|
||||
bool "lzop"
|
||||
default y
|
||||
@@ -342,12 +330,15 @@ config UNLZMA
|
||||
is generally considerably better than that achieved by the bzip2
|
||||
compressors.
|
||||
|
||||
The BusyBox unlzma applet is limited to decompression only.
|
||||
The BusyBox unlzma applet is limited to de-compression only.
|
||||
On an x86 system, this applet adds about 4K.
|
||||
|
||||
Unless you have a specific application which requires unlzma, you
|
||||
should probably say N here.
|
||||
|
||||
config FEATURE_LZMA_FAST
|
||||
bool "Optimize unlzma for speed"
|
||||
default n
|
||||
default y
|
||||
depends on UNLZMA
|
||||
help
|
||||
This option reduces decompression time by about 25% at the cost of
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
//usage: "\n -v Verbose"
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
#include "ar.h"
|
||||
|
||||
#if ENABLE_FEATURE_AR_CREATE
|
||||
|
||||
+57
-24
@@ -5,7 +5,7 @@
|
||||
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
||||
*/
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
enum {
|
||||
OPT_STDOUT = 1 << 0,
|
||||
@@ -33,7 +33,7 @@ char* FAST_FUNC append_ext(char *filename, const char *expected_ext)
|
||||
}
|
||||
|
||||
int FAST_FUNC bbunpack(char **argv,
|
||||
IF_DESKTOP(long long) int FAST_FUNC (*unpacker)(transformer_aux_data_t *aux),
|
||||
IF_DESKTOP(long long) int FAST_FUNC (*unpacker)(unpack_info_t *info),
|
||||
char* FAST_FUNC (*make_new_name)(char *filename, const char *expected_ext),
|
||||
const char *expected_ext
|
||||
)
|
||||
@@ -42,7 +42,7 @@ int FAST_FUNC bbunpack(char **argv,
|
||||
IF_DESKTOP(long long) int status;
|
||||
char *filename, *new_name;
|
||||
smallint exitcode = 0;
|
||||
transformer_aux_data_t aux;
|
||||
unpack_info_t info;
|
||||
|
||||
do {
|
||||
/* NB: new_name is *maybe* malloc'ed! */
|
||||
@@ -98,23 +98,21 @@ int FAST_FUNC bbunpack(char **argv,
|
||||
"use -f to force it");
|
||||
}
|
||||
|
||||
init_transformer_aux_data(&aux);
|
||||
aux.check_signature = 1;
|
||||
status = unpacker(&aux);
|
||||
/* memset(&info, 0, sizeof(info)); */
|
||||
info.mtime = 0; /* so far it has one member only */
|
||||
status = unpacker(&info);
|
||||
if (status < 0)
|
||||
exitcode = 1;
|
||||
|
||||
if (!(option_mask32 & OPT_STDOUT))
|
||||
xclose(STDOUT_FILENO); /* with error check! */
|
||||
xclose(STDOUT_FILENO); /* with error check! */
|
||||
|
||||
if (filename) {
|
||||
char *del = new_name;
|
||||
if (status >= 0) {
|
||||
/* TODO: restore other things? */
|
||||
if (aux.mtime != 0) {
|
||||
if (info.mtime) {
|
||||
struct timeval times[2];
|
||||
|
||||
times[1].tv_sec = times[0].tv_sec = aux.mtime;
|
||||
times[1].tv_sec = times[0].tv_sec = info.mtime;
|
||||
times[1].tv_usec = times[0].tv_usec = 0;
|
||||
/* Note: we closed it first.
|
||||
* On some systems calling utimes
|
||||
@@ -145,9 +143,6 @@ int FAST_FUNC bbunpack(char **argv,
|
||||
}
|
||||
} while (*argv && *++argv);
|
||||
|
||||
if (option_mask32 & OPT_STDOUT)
|
||||
xclose(STDOUT_FILENO); /* with error check! */
|
||||
|
||||
return exitcode;
|
||||
}
|
||||
|
||||
@@ -182,9 +177,16 @@ char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext)
|
||||
|
||||
#if ENABLE_UNCOMPRESS
|
||||
static
|
||||
IF_DESKTOP(long long) int FAST_FUNC unpack_uncompress(transformer_aux_data_t *aux)
|
||||
IF_DESKTOP(long long) int FAST_FUNC unpack_uncompress(unpack_info_t *info UNUSED_PARAM)
|
||||
{
|
||||
return unpack_Z_stream(aux, STDIN_FILENO, STDOUT_FILENO);
|
||||
IF_DESKTOP(long long) int status = -1;
|
||||
|
||||
if ((xread_char(STDIN_FILENO) != 0x1f) || (xread_char(STDIN_FILENO) != 0x9d)) {
|
||||
bb_error_msg("invalid magic");
|
||||
} else {
|
||||
status = unpack_Z_stream(STDIN_FILENO, STDOUT_FILENO);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
int uncompress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int uncompress_main(int argc UNUSED_PARAM, char **argv)
|
||||
@@ -272,9 +274,31 @@ char* FAST_FUNC make_new_name_gunzip(char *filename, const char *expected_ext UN
|
||||
return filename;
|
||||
}
|
||||
static
|
||||
IF_DESKTOP(long long) int FAST_FUNC unpack_gunzip(transformer_aux_data_t *aux)
|
||||
IF_DESKTOP(long long) int FAST_FUNC unpack_gunzip(unpack_info_t *info)
|
||||
{
|
||||
return unpack_gz_stream(aux, STDIN_FILENO, STDOUT_FILENO);
|
||||
IF_DESKTOP(long long) int status = -1;
|
||||
|
||||
/* do the decompression, and cleanup */
|
||||
if (xread_char(STDIN_FILENO) == 0x1f) {
|
||||
unsigned char magic2;
|
||||
|
||||
magic2 = xread_char(STDIN_FILENO);
|
||||
if (ENABLE_FEATURE_SEAMLESS_Z && magic2 == 0x9d) {
|
||||
status = unpack_Z_stream(STDIN_FILENO, STDOUT_FILENO);
|
||||
} else if (magic2 == 0x8b) {
|
||||
status = unpack_gz_stream_with_info(STDIN_FILENO, STDOUT_FILENO, info);
|
||||
} else {
|
||||
goto bad_magic;
|
||||
}
|
||||
if (status < 0) {
|
||||
bb_error_msg("error inflating");
|
||||
}
|
||||
} else {
|
||||
bad_magic:
|
||||
bb_error_msg("invalid magic");
|
||||
/* status is still == -1 */
|
||||
}
|
||||
return status;
|
||||
}
|
||||
/*
|
||||
* Linux kernel build uses gzip -d -n. We accept and ignore it.
|
||||
@@ -323,9 +347,9 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv)
|
||||
//applet:IF_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP, bzcat))
|
||||
#if ENABLE_BUNZIP2
|
||||
static
|
||||
IF_DESKTOP(long long) int FAST_FUNC unpack_bunzip2(transformer_aux_data_t *aux)
|
||||
IF_DESKTOP(long long) int FAST_FUNC unpack_bunzip2(unpack_info_t *info UNUSED_PARAM)
|
||||
{
|
||||
return unpack_bz2_stream(aux, STDIN_FILENO, STDOUT_FILENO);
|
||||
return unpack_bz2_stream_prime(STDIN_FILENO, STDOUT_FILENO);
|
||||
}
|
||||
int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int bunzip2_main(int argc UNUSED_PARAM, char **argv)
|
||||
@@ -391,9 +415,9 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
#if ENABLE_UNLZMA
|
||||
static
|
||||
IF_DESKTOP(long long) int FAST_FUNC unpack_unlzma(transformer_aux_data_t *aux)
|
||||
IF_DESKTOP(long long) int FAST_FUNC unpack_unlzma(unpack_info_t *info UNUSED_PARAM)
|
||||
{
|
||||
return unpack_lzma_stream(aux, STDIN_FILENO, STDOUT_FILENO);
|
||||
return unpack_lzma_stream(STDIN_FILENO, STDOUT_FILENO);
|
||||
}
|
||||
int unlzma_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int unlzma_main(int argc UNUSED_PARAM, char **argv)
|
||||
@@ -416,9 +440,18 @@ int unlzma_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
#if ENABLE_UNXZ
|
||||
static
|
||||
IF_DESKTOP(long long) int FAST_FUNC unpack_unxz(transformer_aux_data_t *aux)
|
||||
IF_DESKTOP(long long) int FAST_FUNC unpack_unxz(unpack_info_t *info UNUSED_PARAM)
|
||||
{
|
||||
return unpack_xz_stream(aux, STDIN_FILENO, STDOUT_FILENO);
|
||||
struct {
|
||||
uint32_t v1;
|
||||
uint16_t v2;
|
||||
} magic;
|
||||
xread(STDIN_FILENO, &magic, 6);
|
||||
if (magic.v1 != XZ_MAGIC1a || magic.v2 != XZ_MAGIC2a) {
|
||||
bb_error_msg("invalid magic");
|
||||
return -1;
|
||||
}
|
||||
return unpack_xz_stream(STDIN_FILENO, STDOUT_FILENO);
|
||||
}
|
||||
int unxz_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int unxz_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
+4
-4
@@ -17,9 +17,9 @@
|
||||
//usage: "\n -f Force"
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
#define CONFIG_BZIP2_FAST 1
|
||||
#define CONFIG_BZIP2_FEATURE_SPEED 1
|
||||
|
||||
/* Speed test:
|
||||
* Compiled with gcc 4.2.1, run on Athlon 64 1800 MHz (512K L2 cache).
|
||||
@@ -27,7 +27,7 @@
|
||||
* (time to compress gcc-4.2.1.tar is 126.4% compared to bbox).
|
||||
* At SPEED 5 difference is 32.7%.
|
||||
*
|
||||
* Test run of all CONFIG_BZIP2_FAST values on a 11Mb text file:
|
||||
* Test run of all CONFIG_BZIP2_FEATURE_SPEED values on a 11Mb text file:
|
||||
* Size Time (3 runs)
|
||||
* 0: 10828 4.145 4.146 4.148
|
||||
* 1: 11097 3.845 3.860 3.861
|
||||
@@ -111,7 +111,7 @@ IF_DESKTOP(long long) int bz_write(bz_stream *strm, void* rbuf, ssize_t rlen, vo
|
||||
}
|
||||
|
||||
static
|
||||
IF_DESKTOP(long long) int FAST_FUNC compressStream(transformer_aux_data_t *aux UNUSED_PARAM)
|
||||
IF_DESKTOP(long long) int FAST_FUNC compressStream(unpack_info_t *info UNUSED_PARAM)
|
||||
{
|
||||
IF_DESKTOP(long long) int total;
|
||||
ssize_t count;
|
||||
|
||||
+1
-2
@@ -12,7 +12,7 @@
|
||||
*
|
||||
*/
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
//usage:#define cpio_trivial_usage
|
||||
//usage: "[-dmvu] [-F FILE]" IF_FEATURE_CPIO_O(" [-H newc]")
|
||||
@@ -384,7 +384,6 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
|
||||
goto dump;
|
||||
}
|
||||
/* parent */
|
||||
USE_FOR_NOMMU(argv[-optind][0] &= 0x7f); /* undo fork_or_rexec() damage */
|
||||
xchdir(*argv++);
|
||||
close(pp.wr);
|
||||
xmove_fd(pp.rd, STDIN_FILENO);
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@
|
||||
|
||||
#include "libbb.h"
|
||||
#include <fnmatch.h>
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
/* note: if you vary hash_prime sizes be aware,
|
||||
* 1) tweaking these will have a big effect on how much memory this program uses.
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
//usage: "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
#define DPKG_DEB_OPT_CONTENTS 1
|
||||
#define DPKG_DEB_OPT_CONTROL 2
|
||||
|
||||
+3
-11
@@ -55,7 +55,7 @@ aa: 85.1% -- replaced with aa.gz
|
||||
//usage: "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
|
||||
/* ===========================================================================
|
||||
@@ -81,15 +81,7 @@ aa: 85.1% -- replaced with aa.gz
|
||||
|
||||
/* ===========================================================================
|
||||
*/
|
||||
#if CONFIG_GZIP_FAST == 0
|
||||
# define SMALL_MEM
|
||||
#elif CONFIG_GZIP_FAST == 1
|
||||
# define MEDIUM_MEM
|
||||
#elif CONFIG_GZIP_FAST == 2
|
||||
# define BIG_MEM
|
||||
#else
|
||||
# error "Invalid CONFIG_GZIP_FAST value"
|
||||
#endif
|
||||
#define SMALL_MEM
|
||||
|
||||
#ifndef INBUFSIZ
|
||||
# ifdef SMALL_MEM
|
||||
@@ -2015,7 +2007,7 @@ static void zip(ulg time_stamp)
|
||||
|
||||
/* ======================================================================== */
|
||||
static
|
||||
IF_DESKTOP(long long) int FAST_FUNC pack_gzip(transformer_aux_data_t *aux UNUSED_PARAM)
|
||||
IF_DESKTOP(long long) int FAST_FUNC pack_gzip(unpack_info_t *info UNUSED_PARAM)
|
||||
{
|
||||
struct stat s;
|
||||
|
||||
|
||||
@@ -28,13 +28,10 @@ COMMON_FILES:= \
|
||||
init_handle.o
|
||||
|
||||
DPKG_FILES:= \
|
||||
unpack_ar_archive.o \
|
||||
filter_accept_list_reassign.o \
|
||||
get_header_ar.o \
|
||||
unpack_ar_archive.o \
|
||||
get_header_tar.o \
|
||||
get_header_tar_gz.o \
|
||||
get_header_tar_bz2.o \
|
||||
get_header_tar_lzma.o \
|
||||
filter_accept_list_reassign.o
|
||||
|
||||
INSERT
|
||||
|
||||
@@ -45,22 +42,20 @@ lib-$(CONFIG_UNXZ) += decompress_unxz.o
|
||||
lib-$(CONFIG_CPIO) += get_header_cpio.o
|
||||
lib-$(CONFIG_DPKG) += $(DPKG_FILES)
|
||||
lib-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
|
||||
lib-$(CONFIG_GUNZIP) += open_transformer.o decompress_gunzip.o
|
||||
lib-$(CONFIG_RPM2CPIO) += decompress_gunzip.o get_header_cpio.o
|
||||
lib-$(CONFIG_RPM) += open_transformer.o decompress_gunzip.o get_header_cpio.o
|
||||
lib-$(CONFIG_GUNZIP) += decompress_unzip.o
|
||||
lib-$(CONFIG_RPM2CPIO) += decompress_unzip.o get_header_cpio.o
|
||||
lib-$(CONFIG_RPM) += open_transformer.o decompress_unzip.o get_header_cpio.o
|
||||
lib-$(CONFIG_TAR) += get_header_tar.o
|
||||
lib-$(CONFIG_UNCOMPRESS) += decompress_uncompress.o
|
||||
lib-$(CONFIG_UNZIP) += decompress_gunzip.o
|
||||
lib-$(CONFIG_UNZIP) += decompress_unzip.o
|
||||
lib-$(CONFIG_LZOP) += lzo1x_1.o lzo1x_1o.o lzo1x_d.o
|
||||
lib-$(CONFIG_LZOP_COMPR_HIGH) += lzo1x_9x.o
|
||||
lib-$(CONFIG_MODINFO) += open_transformer.o
|
||||
lib-$(CONFIG_INSMOD) += open_transformer.o
|
||||
lib-$(CONFIG_FEATURE_SEAMLESS_Z) += open_transformer.o decompress_uncompress.o
|
||||
lib-$(CONFIG_FEATURE_SEAMLESS_GZ) += open_transformer.o decompress_gunzip.o
|
||||
lib-$(CONFIG_FEATURE_SEAMLESS_BZ2) += open_transformer.o decompress_bunzip2.o
|
||||
lib-$(CONFIG_FEATURE_SEAMLESS_LZMA) += open_transformer.o decompress_unlzma.o
|
||||
lib-$(CONFIG_FEATURE_SEAMLESS_GZ) += open_transformer.o decompress_unzip.o get_header_tar_gz.o
|
||||
lib-$(CONFIG_FEATURE_SEAMLESS_BZ2) += open_transformer.o decompress_bunzip2.o get_header_tar_bz2.o
|
||||
lib-$(CONFIG_FEATURE_SEAMLESS_LZMA) += open_transformer.o decompress_unlzma.o get_header_tar_lzma.o
|
||||
lib-$(CONFIG_FEATURE_SEAMLESS_XZ) += open_transformer.o decompress_unxz.o
|
||||
lib-$(CONFIG_FEATURE_COMPRESS_USAGE) += open_transformer.o decompress_bunzip2.o
|
||||
lib-$(CONFIG_FEATURE_COMPRESS_USAGE) += decompress_bunzip2.o
|
||||
lib-$(CONFIG_FEATURE_COMPRESS_BBCONFIG) += decompress_bunzip2.o
|
||||
lib-$(CONFIG_FEATURE_TAR_TO_COMMAND) += data_extract_to_command.o
|
||||
|
||||
|
||||
@@ -385,7 +385,7 @@ int mainGtU(
|
||||
* but speeds up compression 10% overall
|
||||
*/
|
||||
|
||||
#if CONFIG_BZIP2_FAST >= 1
|
||||
#if CONFIG_BZIP2_FEATURE_SPEED >= 1
|
||||
|
||||
#define TIMES_8(code) \
|
||||
code; code; code; code; \
|
||||
@@ -496,7 +496,7 @@ void mainSimpleSort(uint32_t* ptr,
|
||||
i++;
|
||||
|
||||
/* 1.5% overall speedup, +290 bytes */
|
||||
#if CONFIG_BZIP2_FAST >= 3
|
||||
#if CONFIG_BZIP2_FEATURE_SPEED >= 3
|
||||
/*-- copy 2 --*/
|
||||
if (i > hi) break;
|
||||
v = ptr[i];
|
||||
@@ -750,7 +750,7 @@ void mainSort(EState* state,
|
||||
j = block[0] << 8;
|
||||
i = nblock - 1;
|
||||
/* 3%, +300 bytes */
|
||||
#if CONFIG_BZIP2_FAST >= 2
|
||||
#if CONFIG_BZIP2_FEATURE_SPEED >= 2
|
||||
for (; i >= 3; i -= 4) {
|
||||
quadrant[i] = 0;
|
||||
j = (j >> 8) | (((uint16_t)block[i]) << 8);
|
||||
@@ -787,7 +787,7 @@ void mainSort(EState* state,
|
||||
|
||||
s = block[0] << 8;
|
||||
i = nblock - 1;
|
||||
#if CONFIG_BZIP2_FAST >= 2
|
||||
#if CONFIG_BZIP2_FEATURE_SPEED >= 2
|
||||
for (; i >= 3; i -= 4) {
|
||||
s = (s >> 8) | (block[i] << 8);
|
||||
j = ftab[s] - 1;
|
||||
|
||||
@@ -183,7 +183,7 @@ typedef struct EState {
|
||||
/* stack-saving measures: these can be local, but they are too big */
|
||||
int32_t sendMTFValues__code [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||
int32_t sendMTFValues__rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||
#if CONFIG_BZIP2_FAST >= 5
|
||||
#if CONFIG_BZIP2_FEATURE_SPEED >= 5
|
||||
/* second dimension: only 3 needed; 4 makes index calculations faster */
|
||||
uint32_t sendMTFValues__len_pack[BZ_MAX_ALPHA_SIZE][4];
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@ void bsFinishWrite(EState* s)
|
||||
/*---------------------------------------------------*/
|
||||
static
|
||||
/* Helps only on level 5, on other levels hurts. ? */
|
||||
#if CONFIG_BZIP2_FAST >= 5
|
||||
#if CONFIG_BZIP2_FEATURE_SPEED >= 5
|
||||
ALWAYS_INLINE
|
||||
#endif
|
||||
void bsW(EState* s, int32_t n, uint32_t v)
|
||||
@@ -331,7 +331,7 @@ void sendMTFValues(EState* s)
|
||||
for (v = 0; v < alphaSize; v++)
|
||||
s->rfreq[t][v] = 0;
|
||||
|
||||
#if CONFIG_BZIP2_FAST >= 5
|
||||
#if CONFIG_BZIP2_FEATURE_SPEED >= 5
|
||||
/*
|
||||
* Set up an auxiliary length table which is used to fast-track
|
||||
* the common case (nGroups == 6).
|
||||
@@ -361,7 +361,7 @@ void sendMTFValues(EState* s)
|
||||
*/
|
||||
for (t = 0; t < nGroups; t++)
|
||||
cost[t] = 0;
|
||||
#if CONFIG_BZIP2_FAST >= 5
|
||||
#if CONFIG_BZIP2_FEATURE_SPEED >= 5
|
||||
if (nGroups == 6 && 50 == ge-gs+1) {
|
||||
/*--- fast track the common case ---*/
|
||||
register uint32_t cost01, cost23, cost45;
|
||||
@@ -420,7 +420,7 @@ void sendMTFValues(EState* s)
|
||||
* Increment the symbol frequencies for the selected table.
|
||||
*/
|
||||
/* 1% faster compress. +800 bytes */
|
||||
#if CONFIG_BZIP2_FAST >= 4
|
||||
#if CONFIG_BZIP2_FEATURE_SPEED >= 4
|
||||
if (nGroups == 6 && 50 == ge-gs+1) {
|
||||
/*--- fast track the common case ---*/
|
||||
#define BZ_ITUR(nn) s->rfreq[bt][mtfv[gs + (nn)]]++
|
||||
|
||||
@@ -48,7 +48,7 @@ in the file LICENSE.
|
||||
|
||||
|
||||
/* 90 bytes, 0.3% of overall compress speed */
|
||||
#if CONFIG_BZIP2_FAST >= 1
|
||||
#if CONFIG_BZIP2_FEATURE_SPEED >= 1
|
||||
|
||||
/* macro works better than inline (gcc 4.2.1) */
|
||||
#define DOWNHEAP1(heap, weight, Heap) \
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
void FAST_FUNC data_align(archive_handle_t *archive_handle, unsigned boundary)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
|
||||
{
|
||||
@@ -13,13 +13,13 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
|
||||
int res;
|
||||
|
||||
#if ENABLE_FEATURE_TAR_SELINUX
|
||||
char *sctx = archive_handle->tar__sctx[PAX_NEXT_FILE];
|
||||
char *sctx = archive_handle->tar__next_file_sctx;
|
||||
if (!sctx)
|
||||
sctx = archive_handle->tar__sctx[PAX_GLOBAL];
|
||||
sctx = archive_handle->tar__global_sctx;
|
||||
if (sctx) { /* setfscreatecon is 4 syscalls, avoid if possible */
|
||||
setfscreatecon(sctx);
|
||||
free(archive_handle->tar__sctx[PAX_NEXT_FILE]);
|
||||
archive_handle->tar__sctx[PAX_NEXT_FILE] = NULL;
|
||||
free(archive_handle->tar__next_file_sctx);
|
||||
archive_handle->tar__next_file_sctx = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
enum {
|
||||
//TAR_FILETYPE,
|
||||
@@ -64,13 +64,13 @@ void FAST_FUNC data_extract_to_command(archive_handle_t *archive_handle)
|
||||
file_header_t *file_header = archive_handle->file_header;
|
||||
|
||||
#if 0 /* do we need this? ENABLE_FEATURE_TAR_SELINUX */
|
||||
char *sctx = archive_handle->tar__sctx[PAX_NEXT_FILE];
|
||||
char *sctx = archive_handle->tar__next_file_sctx;
|
||||
if (!sctx)
|
||||
sctx = archive_handle->tar__sctx[PAX_GLOBAL];
|
||||
sctx = archive_handle->tar__global_sctx;
|
||||
if (sctx) { /* setfscreatecon is 4 syscalls, avoid if possible */
|
||||
setfscreatecon(sctx);
|
||||
free(archive_handle->tar__sctx[PAX_NEXT_FILE]);
|
||||
archive_handle->tar__sctx[PAX_NEXT_FILE] = NULL;
|
||||
free(archive_handle->tar__next_file_sctx);
|
||||
archive_handle->tar__next_file_sctx = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
void FAST_FUNC data_extract_to_stdout(archive_handle_t *archive_handle)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
void FAST_FUNC data_skip(archive_handle_t *archive_handle)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
/* Constants for Huffman coding */
|
||||
#define MAX_GROUPS 6
|
||||
@@ -721,7 +721,7 @@ void FAST_FUNC dealloc_bunzip(bunzip_data *bd)
|
||||
|
||||
/* Decompress src_fd to dst_fd. Stops at end of bzip data, not end of file. */
|
||||
IF_DESKTOP(long long) int FAST_FUNC
|
||||
unpack_bz2_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
unpack_bz2_stream(int src_fd, int dst_fd)
|
||||
{
|
||||
IF_DESKTOP(long long total_written = 0;)
|
||||
bunzip_data *bd;
|
||||
@@ -729,9 +729,6 @@ unpack_bz2_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
int i;
|
||||
unsigned len;
|
||||
|
||||
if (check_signature16(aux, src_fd, BZIP2_MAGIC))
|
||||
return -1;
|
||||
|
||||
outbuf = xmalloc(IOBUF_SIZE);
|
||||
len = 0;
|
||||
while (1) { /* "Process one BZ... stream" loop */
|
||||
@@ -755,14 +752,7 @@ unpack_bz2_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
}
|
||||
}
|
||||
|
||||
if (i != RETVAL_LAST_BLOCK
|
||||
/* Observed case when i == RETVAL_OK:
|
||||
* "bzcat z.bz2", where "z.bz2" is a bzipped zero-length file
|
||||
* (to be exact, z.bz2 is exactly these 14 bytes:
|
||||
* 42 5a 68 39 17 72 45 38 50 90 00 00 00 00).
|
||||
*/
|
||||
&& i != RETVAL_OK
|
||||
) {
|
||||
if (i != RETVAL_LAST_BLOCK) {
|
||||
bb_error_msg("bunzip error %d", i);
|
||||
break;
|
||||
}
|
||||
@@ -797,6 +787,17 @@ unpack_bz2_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
return i ? i : IF_DESKTOP(total_written) + 0;
|
||||
}
|
||||
|
||||
IF_DESKTOP(long long) int FAST_FUNC
|
||||
unpack_bz2_stream_prime(int src_fd, int dst_fd)
|
||||
{
|
||||
uint16_t magic2;
|
||||
xread(src_fd, &magic2, 2);
|
||||
if (magic2 != BZIP2_MAGIC) {
|
||||
bb_error_msg_and_die("invalid magic");
|
||||
}
|
||||
return unpack_bz2_stream(src_fd, dst_fd);
|
||||
}
|
||||
|
||||
#ifdef TESTING
|
||||
|
||||
static char *const bunzip_errors[] = {
|
||||
@@ -811,7 +812,7 @@ int main(int argc, char **argv)
|
||||
int i;
|
||||
char c;
|
||||
|
||||
int i = unpack_bz2_stream(0, 1);
|
||||
int i = unpack_bz2_stream_prime(0, 1);
|
||||
if (i < 0)
|
||||
fprintf(stderr, "%s\n", bunzip_errors[-i]);
|
||||
else if (read(STDIN_FILENO, &c, 1))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
|
||||
/* Default input buffer size */
|
||||
@@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
IF_DESKTOP(long long) int FAST_FUNC
|
||||
unpack_Z_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
unpack_Z_stream(int fd_in, int fd_out)
|
||||
{
|
||||
IF_DESKTOP(long long total_written = 0;)
|
||||
IF_DESKTOP(long long) int retval = -1;
|
||||
@@ -103,19 +103,16 @@ unpack_Z_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
/* block compress mode -C compatible with 2.0 */
|
||||
int block_mode; /* = BLOCK_MODE; */
|
||||
|
||||
if (check_signature16(aux, src_fd, COMPRESS_MAGIC))
|
||||
return -1;
|
||||
|
||||
inbuf = xzalloc(IBUFSIZ + 64);
|
||||
outbuf = xzalloc(OBUFSIZ + 2048);
|
||||
htab = xzalloc(HSIZE); /* wasn't zeroed out before, maybe can xmalloc? */
|
||||
htab = xzalloc(HSIZE); /* wsn't zeroed out before, maybe can xmalloc? */
|
||||
codetab = xzalloc(HSIZE * sizeof(codetab[0]));
|
||||
|
||||
insize = 0;
|
||||
|
||||
/* xread isn't good here, we have to return - caller may want
|
||||
* to do some cleanup (e.g. delete incomplete unpacked file etc) */
|
||||
if (full_read(src_fd, inbuf, 1) != 1) {
|
||||
if (full_read(fd_in, inbuf, 1) != 1) {
|
||||
bb_error_msg("short read");
|
||||
goto err;
|
||||
}
|
||||
@@ -165,7 +162,7 @@ unpack_Z_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
}
|
||||
|
||||
if (insize < (int) (IBUFSIZ + 64) - IBUFSIZ) {
|
||||
rsize = safe_read(src_fd, inbuf + insize, IBUFSIZ);
|
||||
rsize = safe_read(fd_in, inbuf + insize, IBUFSIZ);
|
||||
if (rsize < 0)
|
||||
bb_error_msg_and_die(bb_msg_read_error);
|
||||
insize += rsize;
|
||||
@@ -271,7 +268,7 @@ unpack_Z_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
}
|
||||
|
||||
if (outpos >= OBUFSIZ) {
|
||||
xwrite(dst_fd, outbuf, outpos);
|
||||
xwrite(fd_out, outbuf, outpos);
|
||||
IF_DESKTOP(total_written += outpos;)
|
||||
outpos = 0;
|
||||
}
|
||||
@@ -299,7 +296,7 @@ unpack_Z_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
} while (rsize > 0);
|
||||
|
||||
if (outpos > 0) {
|
||||
xwrite(dst_fd, outbuf, outpos);
|
||||
xwrite(fd_out, outbuf, outpos);
|
||||
IF_DESKTOP(total_written += outpos;)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
||||
*/
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
#if ENABLE_FEATURE_LZMA_FAST
|
||||
# define speed_inline ALWAYS_INLINE
|
||||
@@ -213,7 +213,7 @@ enum {
|
||||
|
||||
|
||||
IF_DESKTOP(long long) int FAST_FUNC
|
||||
unpack_lzma_stream(transformer_aux_data_t *aux UNUSED_PARAM, int src_fd, int dst_fd)
|
||||
unpack_lzma_stream(int src_fd, int dst_fd)
|
||||
{
|
||||
IF_DESKTOP(long long total_written = 0;)
|
||||
lzma_header_t header;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* Licensed under GPLv2, see file LICENSE in this source tree.
|
||||
*/
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
#define XZ_FUNC FAST_FUNC
|
||||
#define XZ_EXTERN static
|
||||
@@ -38,7 +38,7 @@ static uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc)
|
||||
#include "unxz/xz_dec_stream.c"
|
||||
|
||||
IF_DESKTOP(long long) int FAST_FUNC
|
||||
unpack_xz_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
unpack_xz_stream(int src_fd, int dst_fd)
|
||||
{
|
||||
struct xz_buf iobuf;
|
||||
struct xz_dec *state;
|
||||
@@ -49,17 +49,13 @@ unpack_xz_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
global_crc32_table = crc32_filltable(NULL, /*endian:*/ 0);
|
||||
|
||||
memset(&iobuf, 0, sizeof(iobuf));
|
||||
membuf = xmalloc(2 * BUFSIZ);
|
||||
/* Preload XZ file signature */
|
||||
membuf = (void*) strcpy(xmalloc(2 * BUFSIZ), HEADER_MAGIC);
|
||||
iobuf.in = membuf;
|
||||
iobuf.in_size = HEADER_MAGIC_SIZE;
|
||||
iobuf.out = membuf + BUFSIZ;
|
||||
iobuf.out_size = BUFSIZ;
|
||||
|
||||
if (!aux || aux->check_signature == 0) {
|
||||
/* Preload XZ file signature */
|
||||
strcpy((char*)membuf, HEADER_MAGIC);
|
||||
iobuf.in_size = HEADER_MAGIC_SIZE;
|
||||
} /* else: let xz code read & check it */
|
||||
|
||||
/* Limit memory usage to about 64 MiB. */
|
||||
state = xz_dec_init(XZ_DYNALLOC, 64*1024*1024);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <setjmp.h>
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
typedef struct huft_t {
|
||||
unsigned char e; /* number of extra bits or operation */
|
||||
@@ -1034,22 +1034,22 @@ inflate_unzip_internal(STATE_PARAM int in, int out)
|
||||
/* For unzip */
|
||||
|
||||
IF_DESKTOP(long long) int FAST_FUNC
|
||||
inflate_unzip(transformer_aux_data_t *aux, int in, int out)
|
||||
inflate_unzip(inflate_unzip_result *res, off_t compr_size, int in, int out)
|
||||
{
|
||||
IF_DESKTOP(long long) int n;
|
||||
DECLARE_STATE;
|
||||
|
||||
ALLOC_STATE;
|
||||
|
||||
to_read = aux->bytes_in;
|
||||
to_read = compr_size;
|
||||
// bytebuffer_max = 0x8000;
|
||||
bytebuffer_offset = 4;
|
||||
bytebuffer = xmalloc(bytebuffer_max);
|
||||
n = inflate_unzip_internal(PASS_STATE in, out);
|
||||
free(bytebuffer);
|
||||
|
||||
aux->crc32 = gunzip_crc;
|
||||
aux->bytes_out = gunzip_bytes_out;
|
||||
res->crc = gunzip_crc;
|
||||
res->bytes_out = gunzip_bytes_out;
|
||||
DEALLOC_STATE;
|
||||
return n;
|
||||
}
|
||||
@@ -1107,7 +1107,7 @@ static uint32_t buffer_read_le_u32(STATE_PARAM_ONLY)
|
||||
return res;
|
||||
}
|
||||
|
||||
static int check_header_gzip(STATE_PARAM transformer_aux_data_t *aux)
|
||||
static int check_header_gzip(STATE_PARAM unpack_info_t *info)
|
||||
{
|
||||
union {
|
||||
unsigned char raw[8];
|
||||
@@ -1169,8 +1169,8 @@ static int check_header_gzip(STATE_PARAM transformer_aux_data_t *aux)
|
||||
}
|
||||
}
|
||||
|
||||
if (aux)
|
||||
aux->mtime = SWAP_LE32(header.formatted.mtime);
|
||||
if (info)
|
||||
info->mtime = SWAP_LE32(header.formatted.mtime);
|
||||
|
||||
/* Read the header checksum */
|
||||
if (header.formatted.flags & 0x02) {
|
||||
@@ -1182,58 +1182,33 @@ static int check_header_gzip(STATE_PARAM transformer_aux_data_t *aux)
|
||||
}
|
||||
|
||||
IF_DESKTOP(long long) int FAST_FUNC
|
||||
unpack_gz_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
unpack_gz_stream_with_info(int in, int out, unpack_info_t *info)
|
||||
{
|
||||
uint32_t v32;
|
||||
IF_DESKTOP(long long) int total, n;
|
||||
IF_DESKTOP(long long) int n;
|
||||
DECLARE_STATE;
|
||||
|
||||
#if !ENABLE_FEATURE_SEAMLESS_Z
|
||||
if (check_signature16(aux, src_fd, GZIP_MAGIC))
|
||||
return -1;
|
||||
#else
|
||||
if (aux && aux->check_signature) {
|
||||
uint16_t magic2;
|
||||
|
||||
if (full_read(src_fd, &magic2, 2) != 2) {
|
||||
bad_magic:
|
||||
bb_error_msg("invalid magic");
|
||||
return -1;
|
||||
}
|
||||
if (magic2 == COMPRESS_MAGIC) {
|
||||
aux->check_signature = 0;
|
||||
return unpack_Z_stream(aux, src_fd, dst_fd);
|
||||
}
|
||||
if (magic2 != GZIP_MAGIC)
|
||||
goto bad_magic;
|
||||
}
|
||||
#endif
|
||||
|
||||
total = 0;
|
||||
n = 0;
|
||||
|
||||
ALLOC_STATE;
|
||||
to_read = -1;
|
||||
// bytebuffer_max = 0x8000;
|
||||
bytebuffer = xmalloc(bytebuffer_max);
|
||||
gunzip_src_fd = src_fd;
|
||||
gunzip_src_fd = in;
|
||||
|
||||
again:
|
||||
if (!check_header_gzip(PASS_STATE aux)) {
|
||||
if (!check_header_gzip(PASS_STATE info)) {
|
||||
bb_error_msg("corrupted data");
|
||||
total = -1;
|
||||
n = -1;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
n = inflate_unzip_internal(PASS_STATE src_fd, dst_fd);
|
||||
if (n < 0) {
|
||||
total = -1;
|
||||
n += inflate_unzip_internal(PASS_STATE in, out);
|
||||
if (n < 0)
|
||||
goto ret;
|
||||
}
|
||||
total += n;
|
||||
|
||||
if (!top_up(PASS_STATE 8)) {
|
||||
bb_error_msg("corrupted data");
|
||||
total = -1;
|
||||
n = -1;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
@@ -1241,7 +1216,7 @@ unpack_gz_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
v32 = buffer_read_le_u32(PASS_STATE_ONLY);
|
||||
if ((~gunzip_crc) != v32) {
|
||||
bb_error_msg("crc error");
|
||||
total = -1;
|
||||
n = -1;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
@@ -1249,7 +1224,7 @@ unpack_gz_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
v32 = buffer_read_le_u32(PASS_STATE_ONLY);
|
||||
if ((uint32_t)gunzip_bytes_out != v32) {
|
||||
bb_error_msg("incorrect length");
|
||||
total = -1;
|
||||
n = -1;
|
||||
}
|
||||
|
||||
if (!top_up(PASS_STATE 2))
|
||||
@@ -1267,5 +1242,11 @@ unpack_gz_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
ret:
|
||||
free(bytebuffer);
|
||||
DEALLOC_STATE;
|
||||
return total;
|
||||
return n;
|
||||
}
|
||||
|
||||
IF_DESKTOP(long long) int FAST_FUNC
|
||||
unpack_gz_stream(int in, int out)
|
||||
{
|
||||
return unpack_gz_stream_with_info(in, out, NULL);
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
/* Accept any non-null name, its not really a filter at all */
|
||||
char FAST_FUNC filter_accept_all(archive_handle_t *archive_handle)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
/*
|
||||
* Accept names that are in the accept list, ignoring reject list.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
/* Built and used only if ENABLE_DPKG || ENABLE_DPKG_DEB */
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
/*
|
||||
* Accept names that are in the accept list and not in the reject list
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <fnmatch.h>
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
/* Find a string in a shell pattern list */
|
||||
const llist_t* FAST_FUNC find_list_entry(const llist_t *list, const char *filename)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
#include "ar.h"
|
||||
|
||||
static unsigned read_num(const char *str, int base)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
typedef struct hardlinks_t {
|
||||
struct hardlinks_t *next;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
typedef uint32_t aliased_uint32_t FIX_ALIASING;
|
||||
typedef off_t aliased_off_t FIX_ALIASING;
|
||||
@@ -79,31 +79,34 @@ static unsigned long long getOctal(char *str, int len)
|
||||
*
|
||||
* NB: tarballs with NEGATIVE unix times encoded that way were seen!
|
||||
*/
|
||||
/* Sign-extend 7bit 'first' to 64bit 'v' (that is, using 6th bit as sign): */
|
||||
first <<= 1;
|
||||
first >>= 1; /* now 7th bit = 6th bit */
|
||||
v = first; /* sign-extend 8 bits to 64 */
|
||||
v = first;
|
||||
/* Sign-extend using 6th bit: */
|
||||
v <<= sizeof(unsigned long long)*8 - 7;
|
||||
v = (long long)v >> (sizeof(unsigned long long)*8 - 7);
|
||||
while (--len != 0)
|
||||
v = (v << 8) + (uint8_t) *++str;
|
||||
v = (v << 8) + (unsigned char) *str++;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
#define GET_OCTAL(a) getOctal((a), sizeof(a))
|
||||
|
||||
/* "global" is 0 or 1 */
|
||||
static void process_pax_hdr(archive_handle_t *archive_handle, unsigned sz, int global)
|
||||
#if ENABLE_FEATURE_TAR_SELINUX
|
||||
/* Scan a PAX header for SELinux contexts, via "RHT.security.selinux" keyword.
|
||||
* This is what Red Hat's patched version of tar uses.
|
||||
*/
|
||||
# define SELINUX_CONTEXT_KEYWORD "RHT.security.selinux"
|
||||
static char *get_selinux_sctx_from_pax_hdr(archive_handle_t *archive_handle, unsigned sz)
|
||||
{
|
||||
char *buf, *p;
|
||||
unsigned blk_sz;
|
||||
|
||||
blk_sz = (sz + 511) & (~511);
|
||||
p = buf = xmalloc(blk_sz + 1);
|
||||
xread(archive_handle->src_fd, buf, blk_sz);
|
||||
archive_handle->offset += blk_sz;
|
||||
char *result;
|
||||
|
||||
p = buf = xmalloc(sz + 1);
|
||||
/* prevent bb_strtou from running off the buffer */
|
||||
buf[sz] = '\0';
|
||||
xread(archive_handle->src_fd, buf, sz);
|
||||
archive_handle->offset += sz;
|
||||
|
||||
result = NULL;
|
||||
while (sz != 0) {
|
||||
char *end, *value;
|
||||
unsigned len;
|
||||
@@ -130,33 +133,19 @@ static void process_pax_hdr(archive_handle_t *archive_handle, unsigned sz, int g
|
||||
* (we do not bother to check that it *was* a newline)
|
||||
*/
|
||||
p[-1] = '\0';
|
||||
/* Is it selinux security context? */
|
||||
value = end + 1;
|
||||
|
||||
#if ENABLE_FEATURE_TAR_GNU_EXTENSIONS
|
||||
if (!global && strncmp(value, "path=", sizeof("path=") - 1) == 0) {
|
||||
value += sizeof("path=") - 1;
|
||||
free(archive_handle->tar__longname);
|
||||
archive_handle->tar__longname = xstrdup(value);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLE_FEATURE_TAR_SELINUX
|
||||
/* Scan for SELinux contexts, via "RHT.security.selinux" keyword.
|
||||
* This is what Red Hat's patched version of tar uses.
|
||||
*/
|
||||
# define SELINUX_CONTEXT_KEYWORD "RHT.security.selinux"
|
||||
if (strncmp(value, SELINUX_CONTEXT_KEYWORD"=", sizeof(SELINUX_CONTEXT_KEYWORD"=") - 1) == 0) {
|
||||
value += sizeof(SELINUX_CONTEXT_KEYWORD"=") - 1;
|
||||
free(archive_handle->tar__sctx[global]);
|
||||
archive_handle->tar__sctx[global] = xstrdup(value);
|
||||
continue;
|
||||
result = xstrdup(value);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
free(buf);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
|
||||
{
|
||||
@@ -235,18 +224,43 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
|
||||
|| memcmp(tar.magic, "\0\0\0\0", 5) != 0)
|
||||
) {
|
||||
#if ENABLE_FEATURE_TAR_AUTODETECT
|
||||
char FAST_FUNC (*get_header_ptr)(archive_handle_t *);
|
||||
uint16_t magic2;
|
||||
|
||||
autodetect:
|
||||
magic2 = *(bb__aliased_uint16_t*)tar.name;
|
||||
/* tar gz/bz autodetect: check for gz/bz2 magic.
|
||||
* If we see the magic, and it is the very first block,
|
||||
* we can switch to get_header_tar_gz/bz2/lzma().
|
||||
* Needs seekable fd. I wish recv(MSG_PEEK) works
|
||||
* on any fd... */
|
||||
# if ENABLE_FEATURE_SEAMLESS_GZ
|
||||
if (magic2 == GZIP_MAGIC) {
|
||||
get_header_ptr = get_header_tar_gz;
|
||||
} else
|
||||
# endif
|
||||
# if ENABLE_FEATURE_SEAMLESS_BZ2
|
||||
if (magic2 == BZIP2_MAGIC
|
||||
&& tar.name[2] == 'h' && isdigit(tar.name[3])
|
||||
) { /* bzip2 */
|
||||
get_header_ptr = get_header_tar_bz2;
|
||||
} else
|
||||
# endif
|
||||
# if ENABLE_FEATURE_SEAMLESS_XZ
|
||||
//TODO: if (magic2 == XZ_MAGIC1)...
|
||||
//else
|
||||
# endif
|
||||
goto err;
|
||||
/* Two different causes for lseek() != 0:
|
||||
* unseekable fd (would like to support that too, but...),
|
||||
* or not first block (false positive, it's not .gz/.bz2!) */
|
||||
if (lseek(archive_handle->src_fd, -i, SEEK_CUR) != 0)
|
||||
goto err;
|
||||
if (setup_unzip_on_fd(archive_handle->src_fd, /*fail_if_not_detected:*/ 0) != 0)
|
||||
while (get_header_ptr(archive_handle) == EXIT_SUCCESS)
|
||||
continue;
|
||||
return EXIT_FAILURE;
|
||||
err:
|
||||
bb_error_msg_and_die("invalid tar magic");
|
||||
archive_handle->offset = 0;
|
||||
goto again_after_align;
|
||||
#endif
|
||||
#endif /* FEATURE_TAR_AUTODETECT */
|
||||
bb_error_msg_and_die("invalid tar magic");
|
||||
}
|
||||
|
||||
@@ -404,14 +418,12 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
|
||||
case 'S': /* Sparse file */
|
||||
case 'V': /* Volume header */
|
||||
#endif
|
||||
#if !ENABLE_FEATURE_TAR_SELINUX
|
||||
case 'g': /* pax global header */
|
||||
case 'x': { /* pax extended header */
|
||||
if ((uoff_t)file_header->size > 0xfffff) /* paranoia */
|
||||
goto skip_ext_hdr;
|
||||
process_pax_hdr(archive_handle, file_header->size, (tar.typeflag == 'g'));
|
||||
goto again_after_align;
|
||||
}
|
||||
case 'x': /* pax extended header */
|
||||
#else
|
||||
skip_ext_hdr:
|
||||
#endif
|
||||
{
|
||||
off_t sz;
|
||||
bb_error_msg("warning: skipping header '%c'", tar.typeflag);
|
||||
@@ -423,6 +435,18 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
|
||||
/* return get_header_tar(archive_handle); */
|
||||
goto again_after_align;
|
||||
}
|
||||
#if ENABLE_FEATURE_TAR_SELINUX
|
||||
case 'g': /* pax global header */
|
||||
case 'x': { /* pax extended header */
|
||||
char **pp;
|
||||
if ((uoff_t)file_header->size > 0xfffff) /* paranoia */
|
||||
goto skip_ext_hdr;
|
||||
pp = (tar.typeflag == 'g') ? &archive_handle->tar__global_sctx : &archive_handle->tar__next_file_sctx;
|
||||
free(*pp);
|
||||
*pp = get_selinux_sctx_from_pax_hdr(archive_handle, file_header->size);
|
||||
goto again;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
bb_error_msg_and_die("unknown typeflag: 0x%x", tar.typeflag);
|
||||
}
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
char FAST_FUNC get_header_tar_bz2(archive_handle_t *archive_handle)
|
||||
{
|
||||
/* Can't lseek over pipes */
|
||||
archive_handle->seek = seek_by_read;
|
||||
|
||||
open_transformer_with_sig(archive_handle->src_fd, unpack_bz2_stream, "bunzip2");
|
||||
open_transformer(archive_handle->src_fd, unpack_bz2_stream_prime, "bunzip2");
|
||||
archive_handle->offset = 0;
|
||||
while (get_header_tar(archive_handle) == EXIT_SUCCESS)
|
||||
continue;
|
||||
|
||||
@@ -4,14 +4,29 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
char FAST_FUNC get_header_tar_gz(archive_handle_t *archive_handle)
|
||||
{
|
||||
#if BB_MMU
|
||||
uint16_t magic;
|
||||
#endif
|
||||
|
||||
/* Can't lseek over pipes */
|
||||
archive_handle->seek = seek_by_read;
|
||||
|
||||
open_transformer_with_sig(archive_handle->src_fd, unpack_gz_stream, "gunzip");
|
||||
/* Check gzip magic only if open_transformer will invoke unpack_gz_stream (MMU case).
|
||||
* Otherwise, it will invoke an external helper "gunzip -cf" (NOMMU case) which will
|
||||
* need the header. */
|
||||
#if BB_MMU
|
||||
xread(archive_handle->src_fd, &magic, 2);
|
||||
/* Can skip this check, but error message will be less clear */
|
||||
if (magic != GZIP_MAGIC) {
|
||||
bb_error_msg_and_die("invalid gzip magic");
|
||||
}
|
||||
#endif
|
||||
|
||||
open_transformer(archive_handle->src_fd, unpack_gz_stream, "gunzip");
|
||||
archive_handle->offset = 0;
|
||||
while (get_header_tar(archive_handle) == EXIT_SUCCESS)
|
||||
continue;
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
char FAST_FUNC get_header_tar_lzma(archive_handle_t *archive_handle)
|
||||
{
|
||||
/* Can't lseek over pipes */
|
||||
archive_handle->seek = seek_by_read;
|
||||
|
||||
open_transformer_with_sig(archive_handle->src_fd, unpack_lzma_stream, "unlzma");
|
||||
open_transformer(archive_handle->src_fd, unpack_lzma_stream, "unlzma");
|
||||
archive_handle->offset = 0;
|
||||
while (get_header_tar(archive_handle) == EXIT_SUCCESS)
|
||||
continue;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
||||
*/
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
void FAST_FUNC header_list(const file_header_t *file_header)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
||||
*/
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
void FAST_FUNC header_skip(const file_header_t *file_header UNUSED_PARAM)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
void FAST_FUNC header_verbose_list(const file_header_t *file_header)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
archive_handle_t* FAST_FUNC init_handle(void)
|
||||
{
|
||||
|
||||
@@ -4,64 +4,16 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
|
||||
void FAST_FUNC init_transformer_aux_data(transformer_aux_data_t *aux)
|
||||
{
|
||||
memset(aux, 0, sizeof(*aux));
|
||||
}
|
||||
|
||||
int FAST_FUNC check_signature16(transformer_aux_data_t *aux, int src_fd, unsigned magic16)
|
||||
{
|
||||
if (aux && aux->check_signature) {
|
||||
uint16_t magic2;
|
||||
if (full_read(src_fd, &magic2, 2) != 2 || magic2 != magic16) {
|
||||
bb_error_msg("invalid magic");
|
||||
#if 0 /* possible future extension */
|
||||
if (aux->check_signature > 1)
|
||||
xfunc_die();
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void check_errors_in_children(int signo)
|
||||
{
|
||||
int status;
|
||||
|
||||
if (!signo) {
|
||||
/* block waiting for any child */
|
||||
if (wait(&status) < 0)
|
||||
return; /* probably there are no children */
|
||||
goto check_status;
|
||||
}
|
||||
|
||||
/* Wait for any child without blocking */
|
||||
for (;;) {
|
||||
if (wait_any_nohang(&status) < 0)
|
||||
/* wait failed?! I'm confused... */
|
||||
return;
|
||||
check_status:
|
||||
if (WIFEXITED(status) && WEXITSTATUS(status) == 0)
|
||||
/* this child exited with 0 */
|
||||
continue;
|
||||
/* Cannot happen?
|
||||
if (!WIFSIGNALED(status) && !WIFEXITED(status)) ???; */
|
||||
bb_got_signal = 1;
|
||||
}
|
||||
}
|
||||
#include "archive.h"
|
||||
|
||||
/* transformer(), more than meets the eye */
|
||||
#if BB_MMU
|
||||
/*
|
||||
* On MMU machine, the transform_prog is removed by macro magic
|
||||
* in include/archive.h. On NOMMU, transformer is removed.
|
||||
*/
|
||||
void FAST_FUNC open_transformer(int fd,
|
||||
int check_signature,
|
||||
IF_DESKTOP(long long) int FAST_FUNC (*transformer)(transformer_aux_data_t *aux, int src_fd, int dst_fd)
|
||||
)
|
||||
#else
|
||||
void FAST_FUNC open_transformer(int fd, const char *transform_prog)
|
||||
#endif
|
||||
IF_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd),
|
||||
const char *transform_prog)
|
||||
{
|
||||
struct fd_pair fd_pipe;
|
||||
int pid;
|
||||
@@ -73,18 +25,13 @@ void FAST_FUNC open_transformer(int fd, const char *transform_prog)
|
||||
close(fd_pipe.rd); /* we don't want to read from the parent */
|
||||
// FIXME: error check?
|
||||
#if BB_MMU
|
||||
{
|
||||
transformer_aux_data_t aux;
|
||||
init_transformer_aux_data(&aux);
|
||||
aux.check_signature = check_signature;
|
||||
transformer(&aux, fd, fd_pipe.wr);
|
||||
if (ENABLE_FEATURE_CLEAN_UP) {
|
||||
close(fd_pipe.wr); /* send EOF */
|
||||
close(fd);
|
||||
}
|
||||
/* must be _exit! bug was actually seen here */
|
||||
_exit(EXIT_SUCCESS);
|
||||
transformer(fd, fd_pipe.wr);
|
||||
if (ENABLE_FEATURE_CLEAN_UP) {
|
||||
close(fd_pipe.wr); /* send EOF */
|
||||
close(fd);
|
||||
}
|
||||
/* must be _exit! bug was actually seen here */
|
||||
_exit(EXIT_SUCCESS);
|
||||
#else
|
||||
{
|
||||
char *argv[4];
|
||||
@@ -105,117 +52,3 @@ void FAST_FUNC open_transformer(int fd, const char *transform_prog)
|
||||
close(fd_pipe.wr); /* don't want to write to the child */
|
||||
xmove_fd(fd_pipe.rd, fd);
|
||||
}
|
||||
|
||||
|
||||
#if SEAMLESS_COMPRESSION
|
||||
|
||||
/* Used by e.g. rpm which gives us a fd without filename,
|
||||
* thus we can't guess the format from filename's extension.
|
||||
*/
|
||||
int FAST_FUNC setup_unzip_on_fd(int fd, int fail_if_not_detected)
|
||||
{
|
||||
union {
|
||||
uint8_t b[4];
|
||||
uint16_t b16[2];
|
||||
uint32_t b32[1];
|
||||
} magic;
|
||||
int offset = -2;
|
||||
USE_FOR_MMU(IF_DESKTOP(long long) int FAST_FUNC (*xformer)(transformer_aux_data_t *aux, int src_fd, int dst_fd);)
|
||||
USE_FOR_NOMMU(const char *xformer_prog;)
|
||||
|
||||
/* .gz and .bz2 both have 2-byte signature, and their
|
||||
* unpack_XXX_stream wants this header skipped. */
|
||||
xread(fd, magic.b16, sizeof(magic.b16[0]));
|
||||
if (ENABLE_FEATURE_SEAMLESS_GZ
|
||||
&& magic.b16[0] == GZIP_MAGIC
|
||||
) {
|
||||
USE_FOR_MMU(xformer = unpack_gz_stream;)
|
||||
USE_FOR_NOMMU(xformer_prog = "gunzip";)
|
||||
goto found_magic;
|
||||
}
|
||||
if (ENABLE_FEATURE_SEAMLESS_BZ2
|
||||
&& magic.b16[0] == BZIP2_MAGIC
|
||||
) {
|
||||
USE_FOR_MMU(xformer = unpack_bz2_stream;)
|
||||
USE_FOR_NOMMU(xformer_prog = "bunzip2";)
|
||||
goto found_magic;
|
||||
}
|
||||
if (ENABLE_FEATURE_SEAMLESS_XZ
|
||||
&& magic.b16[0] == XZ_MAGIC1
|
||||
) {
|
||||
offset = -6;
|
||||
xread(fd, magic.b32, sizeof(magic.b32[0]));
|
||||
if (magic.b32[0] == XZ_MAGIC2) {
|
||||
USE_FOR_MMU(xformer = unpack_xz_stream;)
|
||||
USE_FOR_NOMMU(xformer_prog = "unxz";)
|
||||
goto found_magic;
|
||||
}
|
||||
}
|
||||
|
||||
/* No known magic seen */
|
||||
if (fail_if_not_detected)
|
||||
bb_error_msg_and_die("no gzip"
|
||||
IF_FEATURE_SEAMLESS_BZ2("/bzip2")
|
||||
IF_FEATURE_SEAMLESS_XZ("/xz")
|
||||
" magic");
|
||||
xlseek(fd, offset, SEEK_CUR);
|
||||
return 1;
|
||||
|
||||
found_magic:
|
||||
# if BB_MMU
|
||||
open_transformer_with_no_sig(fd, xformer);
|
||||
# else
|
||||
/* NOMMU version of open_transformer execs
|
||||
* an external unzipper that wants
|
||||
* file position at the start of the file */
|
||||
xlseek(fd, offset, SEEK_CUR);
|
||||
open_transformer_with_sig(fd, xformer, xformer_prog);
|
||||
# endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int FAST_FUNC open_zipped(const char *fname)
|
||||
{
|
||||
char *sfx;
|
||||
int fd;
|
||||
|
||||
fd = open(fname, O_RDONLY);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
sfx = strrchr(fname, '.');
|
||||
if (sfx) {
|
||||
sfx++;
|
||||
if (ENABLE_FEATURE_SEAMLESS_LZMA && strcmp(sfx, "lzma") == 0)
|
||||
/* .lzma has no header/signature, just trust it */
|
||||
open_transformer_with_sig(fd, unpack_lzma_stream, "unlzma");
|
||||
else
|
||||
if ((ENABLE_FEATURE_SEAMLESS_GZ && strcmp(sfx, "gz") == 0)
|
||||
|| (ENABLE_FEATURE_SEAMLESS_BZ2 && strcmp(sfx, "bz2") == 0)
|
||||
|| (ENABLE_FEATURE_SEAMLESS_XZ && strcmp(sfx, "xz") == 0)
|
||||
) {
|
||||
setup_unzip_on_fd(fd, /*fail_if_not_detected:*/ 1);
|
||||
}
|
||||
}
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
#endif /* SEAMLESS_COMPRESSION */
|
||||
|
||||
void* FAST_FUNC xmalloc_open_zipped_read_close(const char *fname, size_t *maxsz_p)
|
||||
{
|
||||
int fd;
|
||||
char *image;
|
||||
|
||||
fd = open_zipped(fname);
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
|
||||
image = xmalloc_read(fd, maxsz_p);
|
||||
if (!image)
|
||||
bb_perror_msg("read error from '%s'", fname);
|
||||
close(fd);
|
||||
|
||||
return image;
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
void FAST_FUNC seek_by_jump(int fd, off_t amount)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
/* If we are reading through a pipe, or from stdin then we can't lseek,
|
||||
* we must read and discard the data to skip over it.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
#include "ar.h"
|
||||
|
||||
void FAST_FUNC unpack_ar_archive(archive_handle_t *ar_archive)
|
||||
|
||||
+7
-8
@@ -51,7 +51,7 @@
|
||||
//usage: "\n -F Don't store or verify checksum"
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
#include "liblzo_interface.h"
|
||||
|
||||
/* lzo-2.03/src/lzo_ptr.h */
|
||||
@@ -201,7 +201,7 @@ static NOINLINE int lzo1x_optimize(uint8_t *in, unsigned in_len,
|
||||
/* remove short run */
|
||||
*litp &= ~3;
|
||||
/* copy over the 2 literals that replace the match */
|
||||
copy2(ip-3+1, m_pos, pd(op, m_pos));
|
||||
copy2(ip-3+1,m_pos,pd(op,m_pos));
|
||||
/* move literals 1 byte ahead */
|
||||
litp += 2;
|
||||
if (lit > 0)
|
||||
@@ -211,8 +211,7 @@ static NOINLINE int lzo1x_optimize(uint8_t *in, unsigned in_len,
|
||||
*litp = (unsigned char)(lit - 3);
|
||||
|
||||
o_m1_b++;
|
||||
*op++ = *m_pos++;
|
||||
*op++ = *m_pos++;
|
||||
*op++ = *m_pos++; *op++ = *m_pos++;
|
||||
goto copy_literal_run;
|
||||
}
|
||||
copy_m1:
|
||||
@@ -241,7 +240,7 @@ static NOINLINE int lzo1x_optimize(uint8_t *in, unsigned in_len,
|
||||
) {
|
||||
t = *ip++;
|
||||
/* copy over the 3 literals that replace the match */
|
||||
copy3(ip-1-2, m_pos, pd(op, m_pos));
|
||||
copy3(ip-1-2,m_pos,pd(op,m_pos));
|
||||
/* set new length of previous literal run */
|
||||
lit += 3 + t + 3;
|
||||
*litp = (unsigned char)(lit - 3);
|
||||
@@ -290,7 +289,7 @@ static NOINLINE int lzo1x_optimize(uint8_t *in, unsigned in_len,
|
||||
lit += 3;
|
||||
*litp = (unsigned char)((*litp & ~3) | lit);
|
||||
/* copy over the 3 literals that replace the match */
|
||||
copy3(ip-3, m_pos, pd(op, m_pos));
|
||||
copy3(ip-3,m_pos,pd(op,m_pos));
|
||||
o_m3_a++;
|
||||
}
|
||||
/* test if a literal run follows */
|
||||
@@ -301,7 +300,7 @@ static NOINLINE int lzo1x_optimize(uint8_t *in, unsigned in_len,
|
||||
/* remove short run */
|
||||
*litp &= ~3;
|
||||
/* copy over the 3 literals that replace the match */
|
||||
copy3(ip-4+1, m_pos, pd(op, m_pos));
|
||||
copy3(ip-4+1,m_pos,pd(op,m_pos));
|
||||
/* move literals 1 byte ahead */
|
||||
litp += 2;
|
||||
if (lit > 0)
|
||||
@@ -1077,7 +1076,7 @@ static char* FAST_FUNC make_new_name_lzop(char *filename, const char *expected_e
|
||||
return xasprintf("%s.lzo", filename);
|
||||
}
|
||||
|
||||
static IF_DESKTOP(long long) int FAST_FUNC pack_lzop(transformer_aux_data_t *aux UNUSED_PARAM)
|
||||
static IF_DESKTOP(long long) int FAST_FUNC pack_lzop(unpack_info_t *info UNUSED_PARAM)
|
||||
{
|
||||
if (option_mask32 & OPT_DECOMPRESS)
|
||||
return do_lzo_decompress();
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@
|
||||
//usage: "\n -c List config files"
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
#include "rpm.h"
|
||||
|
||||
#define RPM_CHAR_TYPE 1
|
||||
@@ -236,7 +236,7 @@ static void extract_cpio(int fd, const char *source_rpm)
|
||||
archive_handle->src_fd = fd;
|
||||
/*archive_handle->offset = 0; - init_handle() did it */
|
||||
|
||||
setup_unzip_on_fd(archive_handle->src_fd, /*fail_if_not_detected:*/ 1);
|
||||
setup_unzip_on_fd(archive_handle->src_fd /*, fail_if_not_detected: 1*/);
|
||||
while (get_header_cpio(archive_handle) == EXIT_SUCCESS)
|
||||
continue;
|
||||
}
|
||||
|
||||
+43
-11
@@ -13,7 +13,7 @@
|
||||
//usage: "Output a cpio archive of the rpm file"
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
#include "rpm.h"
|
||||
|
||||
enum { rpm_fd = STDIN_FILENO };
|
||||
@@ -66,22 +66,54 @@ int rpm2cpio_main(int argc UNUSED_PARAM, char **argv)
|
||||
/* Skip the main header */
|
||||
skip_header();
|
||||
|
||||
//if (SEAMLESS_COMPRESSION)
|
||||
// /* We need to know whether child (gzip/bzip/etc) exits abnormally */
|
||||
// signal(SIGCHLD, check_errors_in_children);
|
||||
|
||||
#if 0
|
||||
/* This works, but doesn't report uncompress errors (they happen in child) */
|
||||
setup_unzip_on_fd(rpm_fd, /*fail_if_not_detected:*/ 1);
|
||||
setup_unzip_on_fd(rpm_fd /*fail_if_not_detected: 1*/);
|
||||
if (bb_copyfd_eof(rpm_fd, STDOUT_FILENO) < 0)
|
||||
bb_error_msg_and_die("error unpacking");
|
||||
#else
|
||||
/* BLOAT */
|
||||
{
|
||||
union {
|
||||
uint8_t b[4];
|
||||
uint16_t b16[2];
|
||||
uint32_t b32[1];
|
||||
} magic;
|
||||
IF_DESKTOP(long long) int FAST_FUNC (*unpack)(int src_fd, int dst_fd);
|
||||
|
||||
xread(rpm_fd, magic.b16, sizeof(magic.b16[0]));
|
||||
if (magic.b16[0] == GZIP_MAGIC) {
|
||||
unpack = unpack_gz_stream;
|
||||
} else
|
||||
if (ENABLE_FEATURE_SEAMLESS_BZ2
|
||||
&& magic.b16[0] == BZIP2_MAGIC
|
||||
) {
|
||||
unpack = unpack_bz2_stream;
|
||||
} else
|
||||
if (ENABLE_FEATURE_SEAMLESS_XZ
|
||||
&& magic.b16[0] == XZ_MAGIC1
|
||||
) {
|
||||
xread(rpm_fd, magic.b32, sizeof(magic.b32[0]));
|
||||
if (magic.b32[0] != XZ_MAGIC2)
|
||||
goto no_magic;
|
||||
/* unpack_xz_stream wants fd at position 6, no need to seek */
|
||||
//xlseek(rpm_fd, -6, SEEK_CUR);
|
||||
unpack = unpack_xz_stream;
|
||||
} else {
|
||||
no_magic:
|
||||
bb_error_msg_and_die("no gzip"
|
||||
IF_FEATURE_SEAMLESS_BZ2("/bzip2")
|
||||
IF_FEATURE_SEAMLESS_XZ("/xz")
|
||||
" magic");
|
||||
}
|
||||
if (unpack(rpm_fd, STDOUT_FILENO) < 0)
|
||||
bb_error_msg_and_die("error unpacking");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ENABLE_FEATURE_CLEAN_UP) {
|
||||
close(rpm_fd);
|
||||
}
|
||||
|
||||
if (SEAMLESS_COMPRESSION) {
|
||||
check_errors_in_children(0);
|
||||
return bb_got_signal;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
+68
-35
@@ -44,7 +44,7 @@
|
||||
|
||||
#include <fnmatch.h>
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
/* FIXME: Stop using this non-standard feature */
|
||||
#ifndef FNM_LEADING_DIR
|
||||
# define FNM_LEADING_DIR 0
|
||||
@@ -690,6 +690,54 @@ static llist_t *append_file_list_to_list(llist_t *list)
|
||||
# define append_file_list_to_list(x) 0
|
||||
#endif
|
||||
|
||||
#if ENABLE_FEATURE_SEAMLESS_Z
|
||||
static char FAST_FUNC get_header_tar_Z(archive_handle_t *archive_handle)
|
||||
{
|
||||
/* Can't lseek over pipes */
|
||||
archive_handle->seek = seek_by_read;
|
||||
|
||||
/* do the decompression, and cleanup */
|
||||
if (xread_char(archive_handle->src_fd) != 0x1f
|
||||
|| xread_char(archive_handle->src_fd) != 0x9d
|
||||
) {
|
||||
bb_error_msg_and_die("invalid magic");
|
||||
}
|
||||
|
||||
open_transformer(archive_handle->src_fd, unpack_Z_stream, "uncompress");
|
||||
archive_handle->offset = 0;
|
||||
while (get_header_tar(archive_handle) == EXIT_SUCCESS)
|
||||
continue;
|
||||
|
||||
/* Can only do one file at a time */
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#else
|
||||
# define get_header_tar_Z NULL
|
||||
#endif
|
||||
|
||||
#ifdef CHECK_FOR_CHILD_EXITCODE
|
||||
/* Looks like it isn't needed - tar detects malformed (truncated)
|
||||
* archive if e.g. bunzip2 fails */
|
||||
static int child_error;
|
||||
|
||||
static void handle_SIGCHLD(int status)
|
||||
{
|
||||
/* Actually, 'status' is a signo. We reuse it for other needs */
|
||||
|
||||
/* Wait for any child without blocking */
|
||||
if (wait_any_nohang(&status) < 0)
|
||||
/* wait failed?! I'm confused... */
|
||||
return;
|
||||
|
||||
if (WIFEXITED(status) && WEXITSTATUS(status) == 0)
|
||||
/* child exited with 0 */
|
||||
return;
|
||||
/* Cannot happen?
|
||||
if (!WIFSIGNALED(status) && !WIFEXITED(status)) return; */
|
||||
child_error = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
//usage:#define tar_trivial_usage
|
||||
//usage: "-[" IF_FEATURE_TAR_CREATE("c") "xt"
|
||||
//usage: IF_FEATURE_SEAMLESS_Z("Z")
|
||||
@@ -795,8 +843,6 @@ enum {
|
||||
OPT_NUMERIC_OWNER = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_NUMERIC_OWNER )) + 0, // numeric-owner
|
||||
OPT_NOPRESERVE_PERM = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_NOPRESERVE_PERM)) + 0, // no-same-permissions
|
||||
OPT_OVERWRITE = IF_FEATURE_TAR_LONG_OPTIONS((1 << OPTBIT_OVERWRITE )) + 0, // overwrite
|
||||
|
||||
OPT_ANY_COMPRESS = (OPT_BZIP2 | OPT_LZMA | OPT_GZIP | OPT_COMPRESS),
|
||||
};
|
||||
#if ENABLE_FEATURE_TAR_LONG_OPTIONS
|
||||
static const char tar_longopts[] ALIGN1 =
|
||||
@@ -855,6 +901,7 @@ static const char tar_longopts[] ALIGN1 =
|
||||
int tar_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int tar_main(int argc UNUSED_PARAM, char **argv)
|
||||
{
|
||||
char FAST_FUNC (*get_header_ptr)(archive_handle_t *) = get_header_tar;
|
||||
archive_handle_t *tar_handle;
|
||||
char *base_dir = NULL;
|
||||
const char *tar_filename = "-";
|
||||
@@ -970,6 +1017,18 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
|
||||
tar_handle->ah_flags |= ARCHIVE_O_TRUNC;
|
||||
}
|
||||
|
||||
if (opt & OPT_GZIP)
|
||||
get_header_ptr = get_header_tar_gz;
|
||||
|
||||
if (opt & OPT_BZIP2)
|
||||
get_header_ptr = get_header_tar_bz2;
|
||||
|
||||
if (opt & OPT_LZMA)
|
||||
get_header_ptr = get_header_tar_lzma;
|
||||
|
||||
if (opt & OPT_COMPRESS)
|
||||
get_header_ptr = get_header_tar_Z;
|
||||
|
||||
if (opt & OPT_NOPRESERVE_TIME)
|
||||
tar_handle->ah_flags &= ~ARCHIVE_RESTORE_DATE;
|
||||
|
||||
@@ -1022,7 +1081,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
|
||||
} else {
|
||||
if (ENABLE_FEATURE_TAR_AUTODETECT
|
||||
&& flags == O_RDONLY
|
||||
&& !(opt & OPT_ANY_COMPRESS)
|
||||
&& get_header_ptr == get_header_tar
|
||||
) {
|
||||
tar_handle->src_fd = open_zipped(tar_filename);
|
||||
if (tar_handle->src_fd < 0)
|
||||
@@ -1036,9 +1095,10 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
|
||||
if (base_dir)
|
||||
xchdir(base_dir);
|
||||
|
||||
//if (SEAMLESS_COMPRESSION || OPT_COMPRESS)
|
||||
// /* We need to know whether child (gzip/bzip/etc) exits abnormally */
|
||||
// signal(SIGCHLD, check_errors_in_children);
|
||||
#ifdef CHECK_FOR_CHILD_EXITCODE
|
||||
/* We need to know whether child (gzip/bzip/etc) exits abnormally */
|
||||
signal(SIGCHLD, handle_SIGCHLD);
|
||||
#endif
|
||||
|
||||
/* Create an archive */
|
||||
if (opt & OPT_CREATE) {
|
||||
@@ -1055,30 +1115,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
|
||||
tar_handle->reject, zipMode);
|
||||
}
|
||||
|
||||
if (opt & OPT_ANY_COMPRESS) {
|
||||
USE_FOR_MMU(IF_DESKTOP(long long) int FAST_FUNC (*xformer)(transformer_aux_data_t *aux, int src_fd, int dst_fd);)
|
||||
USE_FOR_NOMMU(const char *xformer_prog;)
|
||||
|
||||
if (opt & OPT_COMPRESS)
|
||||
USE_FOR_MMU(xformer = unpack_Z_stream;)
|
||||
USE_FOR_NOMMU(xformer_prog = "uncompress";)
|
||||
if (opt & OPT_GZIP)
|
||||
USE_FOR_MMU(xformer = unpack_gz_stream;)
|
||||
USE_FOR_NOMMU(xformer_prog = "gunzip";)
|
||||
if (opt & OPT_BZIP2)
|
||||
USE_FOR_MMU(xformer = unpack_bz2_stream;)
|
||||
USE_FOR_NOMMU(xformer_prog = "bunzip2";)
|
||||
if (opt & OPT_LZMA)
|
||||
USE_FOR_MMU(xformer = unpack_lzma_stream;)
|
||||
USE_FOR_NOMMU(xformer_prog = "unlzma";)
|
||||
|
||||
open_transformer_with_sig(tar_handle->src_fd, xformer, xformer_prog);
|
||||
/* Can't lseek over pipes */
|
||||
tar_handle->seek = seek_by_read;
|
||||
/*tar_handle->offset = 0; - already is */
|
||||
}
|
||||
|
||||
while (get_header_tar(tar_handle) == EXIT_SUCCESS)
|
||||
while (get_header_ptr(tar_handle) == EXIT_SUCCESS)
|
||||
continue;
|
||||
|
||||
/* Check that every file that should have been extracted was */
|
||||
@@ -1094,9 +1131,5 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
|
||||
if (ENABLE_FEATURE_CLEAN_UP /* && tar_handle->src_fd != STDIN_FILENO */)
|
||||
close(tar_handle->src_fd);
|
||||
|
||||
if (SEAMLESS_COMPRESSION || OPT_COMPRESS) {
|
||||
check_errors_in_children(0);
|
||||
return bb_got_signal;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
+7
-10
@@ -32,7 +32,7 @@
|
||||
//usage: "\n -d DIR Extract files into DIR"
|
||||
|
||||
#include "libbb.h"
|
||||
#include "bb_archive.h"
|
||||
#include "archive.h"
|
||||
|
||||
enum {
|
||||
#if BB_BIG_ENDIAN
|
||||
@@ -235,7 +235,7 @@ static void unzip_create_leading_dirs(const char *fn)
|
||||
/* Create all leading directories */
|
||||
char *name = xstrdup(fn);
|
||||
if (bb_make_directory(dirname(name), 0777, FILEUTILS_RECUR)) {
|
||||
xfunc_die(); /* bb_make_directory is noisy */
|
||||
bb_error_msg_and_die("exiting"); /* bb_make_directory is noisy */
|
||||
}
|
||||
free(name);
|
||||
}
|
||||
@@ -249,17 +249,15 @@ static void unzip_extract(zip_header_t *zip_header, int dst_fd)
|
||||
bb_copyfd_exact_size(zip_fd, dst_fd, size);
|
||||
} else {
|
||||
/* Method 8 - inflate */
|
||||
transformer_aux_data_t aux;
|
||||
init_transformer_aux_data(&aux);
|
||||
aux.bytes_in = zip_header->formatted.cmpsize;
|
||||
if (inflate_unzip(&aux, zip_fd, dst_fd) < 0)
|
||||
inflate_unzip_result res;
|
||||
if (inflate_unzip(&res, zip_header->formatted.cmpsize, zip_fd, dst_fd) < 0)
|
||||
bb_error_msg_and_die("inflate error");
|
||||
/* Validate decompression - crc */
|
||||
if (zip_header->formatted.crc32 != (aux.crc32 ^ 0xffffffffL)) {
|
||||
if (zip_header->formatted.crc32 != (res.crc ^ 0xffffffffL)) {
|
||||
bb_error_msg_and_die("crc error");
|
||||
}
|
||||
/* Validate decompression - size */
|
||||
if (zip_header->formatted.ucmpsize != aux.bytes_out) {
|
||||
if (zip_header->formatted.ucmpsize != res.bytes_out) {
|
||||
/* Don't die. Who knows, maybe len calculation
|
||||
* was botched somewhere. After all, crc matched! */
|
||||
bb_error_msg("bad length");
|
||||
@@ -597,7 +595,7 @@ int unzip_main(int argc, char **argv)
|
||||
}
|
||||
unzip_create_leading_dirs(dst_fn);
|
||||
if (bb_make_directory(dst_fn, dir_mode, 0)) {
|
||||
xfunc_die();
|
||||
bb_error_msg_and_die("exiting");
|
||||
}
|
||||
} else {
|
||||
if (!S_ISDIR(stat_buf.st_mode)) {
|
||||
@@ -621,7 +619,6 @@ int unzip_main(int argc, char **argv)
|
||||
i = 'y';
|
||||
} else {
|
||||
printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", dst_fn);
|
||||
fflush_all();
|
||||
if (!fgets(key_buf, sizeof(key_buf), stdin)) {
|
||||
bb_perror_msg_and_die("can't read input");
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ CONFIG_PREFIX="./_install"
|
||||
# Busybox Library Tuning
|
||||
#
|
||||
CONFIG_PASSWORD_MINLEN=6
|
||||
CONFIG_MD5_SMALL=1
|
||||
CONFIG_MD5_SIZE_VS_SPEED=2
|
||||
CONFIG_FEATURE_FAST_TOP=y
|
||||
CONFIG_FEATURE_ETC_NETWORKS=y
|
||||
CONFIG_FEATURE_EDITING=y
|
||||
|
||||
@@ -89,7 +89,7 @@ CONFIG_PREFIX="./_install"
|
||||
# Busybox Library Tuning
|
||||
#
|
||||
CONFIG_PASSWORD_MINLEN=6
|
||||
CONFIG_MD5_SMALL=1
|
||||
CONFIG_MD5_SIZE_VS_SPEED=2
|
||||
CONFIG_FEATURE_FAST_TOP=y
|
||||
# CONFIG_FEATURE_ETC_NETWORKS is not set
|
||||
CONFIG_FEATURE_EDITING=y
|
||||
|
||||
@@ -88,7 +88,7 @@ CONFIG_PREFIX="./_install"
|
||||
# Busybox Library Tuning
|
||||
#
|
||||
CONFIG_PASSWORD_MINLEN=6
|
||||
CONFIG_MD5_SMALL=1
|
||||
CONFIG_MD5_SIZE_VS_SPEED=2
|
||||
CONFIG_FEATURE_FAST_TOP=y
|
||||
# CONFIG_FEATURE_ETC_NETWORKS is not set
|
||||
CONFIG_FEATURE_EDITING=y
|
||||
|
||||
@@ -1,997 +0,0 @@
|
||||
# Run "make android2_defconfig", then "make".
|
||||
#
|
||||
# Tested with the standalone toolchain from ndk r6:
|
||||
# android-ndk-r6/build/tools/make-standalone-toolchain.sh --platform=android-8
|
||||
#
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
||||
#
|
||||
# Busybox Settings
|
||||
#
|
||||
|
||||
#
|
||||
# General Configuration
|
||||
#
|
||||
# CONFIG_DESKTOP is not set
|
||||
# CONFIG_EXTRA_COMPAT is not set
|
||||
# CONFIG_INCLUDE_SUSv2 is not set
|
||||
# CONFIG_USE_PORTABLE_CODE is not set
|
||||
CONFIG_PLATFORM_LINUX=y
|
||||
CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
|
||||
# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
|
||||
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
|
||||
# CONFIG_SHOW_USAGE is not set
|
||||
# CONFIG_FEATURE_VERBOSE_USAGE is not set
|
||||
# CONFIG_FEATURE_COMPRESS_USAGE is not set
|
||||
# CONFIG_FEATURE_INSTALLER is not set
|
||||
# CONFIG_INSTALL_NO_USR is not set
|
||||
# CONFIG_LOCALE_SUPPORT is not set
|
||||
# CONFIG_UNICODE_SUPPORT is not set
|
||||
# CONFIG_UNICODE_USING_LOCALE is not set
|
||||
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
|
||||
CONFIG_SUBST_WCHAR=0
|
||||
CONFIG_LAST_SUPPORTED_WCHAR=0
|
||||
# CONFIG_UNICODE_COMBINING_WCHARS is not set
|
||||
# CONFIG_UNICODE_WIDE_WCHARS is not set
|
||||
# CONFIG_UNICODE_BIDI_SUPPORT is not set
|
||||
# CONFIG_UNICODE_NEUTRAL_TABLE is not set
|
||||
# CONFIG_UNICODE_PRESERVE_BROKEN is not set
|
||||
# CONFIG_LONG_OPTS is not set
|
||||
# CONFIG_FEATURE_DEVPTS is not set
|
||||
# CONFIG_FEATURE_CLEAN_UP is not set
|
||||
# CONFIG_FEATURE_UTMP is not set
|
||||
# CONFIG_FEATURE_WTMP is not set
|
||||
# CONFIG_FEATURE_PIDFILE is not set
|
||||
# CONFIG_FEATURE_SUID is not set
|
||||
# CONFIG_FEATURE_SUID_CONFIG is not set
|
||||
# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set
|
||||
# CONFIG_SELINUX is not set
|
||||
# CONFIG_FEATURE_PREFER_APPLETS is not set
|
||||
CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
|
||||
CONFIG_FEATURE_SYSLOG=y
|
||||
# CONFIG_FEATURE_HAVE_RPC is not set
|
||||
|
||||
#
|
||||
# Build Options
|
||||
#
|
||||
# CONFIG_STATIC is not set
|
||||
# CONFIG_PIE is not set
|
||||
# CONFIG_NOMMU is not set
|
||||
# CONFIG_BUILD_LIBBUSYBOX is not set
|
||||
# CONFIG_FEATURE_INDIVIDUAL is not set
|
||||
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
|
||||
# CONFIG_LFS is not set
|
||||
CONFIG_CROSS_COMPILER_PREFIX="arm-linux-androideabi-"
|
||||
CONFIG_EXTRA_CFLAGS=""
|
||||
|
||||
#
|
||||
# Debugging Options
|
||||
#
|
||||
# CONFIG_DEBUG is not set
|
||||
# CONFIG_DEBUG_PESSIMIZE is not set
|
||||
# CONFIG_WERROR is not set
|
||||
CONFIG_NO_DEBUG_LIB=y
|
||||
# CONFIG_DMALLOC is not set
|
||||
# CONFIG_EFENCE is not set
|
||||
|
||||
#
|
||||
# Installation Options ("make install" behavior)
|
||||
#
|
||||
CONFIG_INSTALL_APPLET_SYMLINKS=y
|
||||
# CONFIG_INSTALL_APPLET_HARDLINKS is not set
|
||||
# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
|
||||
# CONFIG_INSTALL_APPLET_DONT is not set
|
||||
# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
|
||||
# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
|
||||
# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
|
||||
CONFIG_PREFIX="./_install"
|
||||
|
||||
#
|
||||
# Busybox Library Tuning
|
||||
#
|
||||
# CONFIG_FEATURE_SYSTEMD is not set
|
||||
# CONFIG_FEATURE_RTMINMAX is not set
|
||||
CONFIG_PASSWORD_MINLEN=6
|
||||
CONFIG_MD5_SMALL=1
|
||||
# CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_FEATURE_ETC_NETWORKS is not set
|
||||
CONFIG_FEATURE_USE_TERMIOS=y
|
||||
# CONFIG_FEATURE_EDITING is not set
|
||||
CONFIG_FEATURE_EDITING_MAX_LEN=0
|
||||
# CONFIG_FEATURE_EDITING_VI is not set
|
||||
CONFIG_FEATURE_EDITING_HISTORY=0
|
||||
# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
|
||||
# CONFIG_FEATURE_TAB_COMPLETION is not set
|
||||
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
|
||||
# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
|
||||
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
|
||||
# CONFIG_FEATURE_NON_POSIX_CP is not set
|
||||
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
|
||||
CONFIG_FEATURE_COPYBUF_KB=4
|
||||
# CONFIG_FEATURE_SKIP_ROOTFS is not set
|
||||
# CONFIG_MONOTONIC_SYSCALL is not set
|
||||
# CONFIG_IOCTL_HEX2STR_ERROR is not set
|
||||
# CONFIG_FEATURE_HWIB is not set
|
||||
|
||||
#
|
||||
# Applets
|
||||
#
|
||||
|
||||
#
|
||||
# Archival Utilities
|
||||
#
|
||||
CONFIG_FEATURE_SEAMLESS_XZ=y
|
||||
CONFIG_FEATURE_SEAMLESS_LZMA=y
|
||||
CONFIG_FEATURE_SEAMLESS_BZ2=y
|
||||
CONFIG_FEATURE_SEAMLESS_GZ=y
|
||||
CONFIG_FEATURE_SEAMLESS_Z=y
|
||||
CONFIG_AR=y
|
||||
CONFIG_FEATURE_AR_LONG_FILENAMES=y
|
||||
CONFIG_FEATURE_AR_CREATE=y
|
||||
CONFIG_BUNZIP2=y
|
||||
CONFIG_BZIP2=y
|
||||
CONFIG_CPIO=y
|
||||
CONFIG_FEATURE_CPIO_O=y
|
||||
CONFIG_FEATURE_CPIO_P=y
|
||||
CONFIG_DPKG=y
|
||||
CONFIG_DPKG_DEB=y
|
||||
# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
|
||||
CONFIG_GUNZIP=y
|
||||
CONFIG_GZIP=y
|
||||
# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
|
||||
CONFIG_LZOP=y
|
||||
CONFIG_LZOP_COMPR_HIGH=y
|
||||
CONFIG_RPM2CPIO=y
|
||||
CONFIG_RPM=y
|
||||
CONFIG_TAR=y
|
||||
CONFIG_FEATURE_TAR_CREATE=y
|
||||
CONFIG_FEATURE_TAR_AUTODETECT=y
|
||||
CONFIG_FEATURE_TAR_FROM=y
|
||||
CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
|
||||
CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y
|
||||
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
|
||||
# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
|
||||
# CONFIG_FEATURE_TAR_TO_COMMAND is not set
|
||||
CONFIG_FEATURE_TAR_UNAME_GNAME=y
|
||||
CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
|
||||
# CONFIG_FEATURE_TAR_SELINUX is not set
|
||||
CONFIG_UNCOMPRESS=y
|
||||
CONFIG_UNLZMA=y
|
||||
CONFIG_FEATURE_LZMA_FAST=y
|
||||
CONFIG_LZMA=y
|
||||
CONFIG_UNXZ=y
|
||||
CONFIG_XZ=y
|
||||
CONFIG_UNZIP=y
|
||||
|
||||
#
|
||||
# Coreutils
|
||||
#
|
||||
CONFIG_BASENAME=y
|
||||
CONFIG_CAT=y
|
||||
# CONFIG_DATE is not set
|
||||
# CONFIG_FEATURE_DATE_ISOFMT is not set
|
||||
# CONFIG_FEATURE_DATE_NANO is not set
|
||||
# CONFIG_FEATURE_DATE_COMPAT is not set
|
||||
# CONFIG_ID is not set
|
||||
# CONFIG_GROUPS is not set
|
||||
CONFIG_TEST=y
|
||||
CONFIG_FEATURE_TEST_64=y
|
||||
CONFIG_TOUCH=y
|
||||
CONFIG_TR=y
|
||||
CONFIG_FEATURE_TR_CLASSES=y
|
||||
CONFIG_FEATURE_TR_EQUIV=y
|
||||
CONFIG_BASE64=y
|
||||
CONFIG_CAL=y
|
||||
CONFIG_CATV=y
|
||||
CONFIG_CHGRP=y
|
||||
CONFIG_CHMOD=y
|
||||
CONFIG_CHOWN=y
|
||||
# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set
|
||||
CONFIG_CHROOT=y
|
||||
CONFIG_CKSUM=y
|
||||
CONFIG_COMM=y
|
||||
CONFIG_CP=y
|
||||
# CONFIG_FEATURE_CP_LONG_OPTIONS is not set
|
||||
CONFIG_CUT=y
|
||||
CONFIG_DD=y
|
||||
CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
|
||||
CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y
|
||||
CONFIG_FEATURE_DD_IBS_OBS=y
|
||||
# CONFIG_DF is not set
|
||||
# CONFIG_FEATURE_DF_FANCY is not set
|
||||
CONFIG_DIRNAME=y
|
||||
CONFIG_DOS2UNIX=y
|
||||
CONFIG_UNIX2DOS=y
|
||||
CONFIG_DU=y
|
||||
CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
|
||||
CONFIG_ECHO=y
|
||||
CONFIG_FEATURE_FANCY_ECHO=y
|
||||
# CONFIG_ENV is not set
|
||||
# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
|
||||
CONFIG_EXPAND=y
|
||||
# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
|
||||
# CONFIG_EXPR is not set
|
||||
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
|
||||
CONFIG_FALSE=y
|
||||
CONFIG_FOLD=y
|
||||
# CONFIG_FSYNC is not set
|
||||
CONFIG_HEAD=y
|
||||
CONFIG_FEATURE_FANCY_HEAD=y
|
||||
# CONFIG_HOSTID is not set
|
||||
CONFIG_INSTALL=y
|
||||
# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
|
||||
CONFIG_LN=y
|
||||
# CONFIG_LOGNAME is not set
|
||||
CONFIG_LS=y
|
||||
CONFIG_FEATURE_LS_FILETYPES=y
|
||||
CONFIG_FEATURE_LS_FOLLOWLINKS=y
|
||||
CONFIG_FEATURE_LS_RECURSIVE=y
|
||||
CONFIG_FEATURE_LS_SORTFILES=y
|
||||
CONFIG_FEATURE_LS_TIMESTAMPS=y
|
||||
CONFIG_FEATURE_LS_USERNAME=y
|
||||
# CONFIG_FEATURE_LS_COLOR is not set
|
||||
# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
|
||||
CONFIG_MD5SUM=y
|
||||
CONFIG_MKDIR=y
|
||||
# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
|
||||
CONFIG_MKFIFO=y
|
||||
CONFIG_MKNOD=y
|
||||
CONFIG_MV=y
|
||||
# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
|
||||
CONFIG_NICE=y
|
||||
CONFIG_NOHUP=y
|
||||
CONFIG_OD=y
|
||||
CONFIG_PRINTENV=y
|
||||
CONFIG_PRINTF=y
|
||||
CONFIG_PWD=y
|
||||
CONFIG_READLINK=y
|
||||
CONFIG_FEATURE_READLINK_FOLLOW=y
|
||||
CONFIG_REALPATH=y
|
||||
CONFIG_RM=y
|
||||
CONFIG_RMDIR=y
|
||||
# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
|
||||
CONFIG_SEQ=y
|
||||
CONFIG_SHA1SUM=y
|
||||
CONFIG_SHA256SUM=y
|
||||
CONFIG_SHA512SUM=y
|
||||
CONFIG_SLEEP=y
|
||||
CONFIG_FEATURE_FANCY_SLEEP=y
|
||||
CONFIG_FEATURE_FLOAT_SLEEP=y
|
||||
CONFIG_SORT=y
|
||||
CONFIG_FEATURE_SORT_BIG=y
|
||||
CONFIG_SPLIT=y
|
||||
CONFIG_FEATURE_SPLIT_FANCY=y
|
||||
# CONFIG_STAT is not set
|
||||
# CONFIG_FEATURE_STAT_FORMAT is not set
|
||||
CONFIG_STTY=y
|
||||
CONFIG_SUM=y
|
||||
CONFIG_SYNC=y
|
||||
CONFIG_TAC=y
|
||||
CONFIG_TAIL=y
|
||||
CONFIG_FEATURE_FANCY_TAIL=y
|
||||
CONFIG_TEE=y
|
||||
CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
|
||||
CONFIG_TRUE=y
|
||||
# CONFIG_TTY is not set
|
||||
CONFIG_UNAME=y
|
||||
CONFIG_UNEXPAND=y
|
||||
# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
|
||||
CONFIG_UNIQ=y
|
||||
# CONFIG_USLEEP is not set
|
||||
CONFIG_UUDECODE=y
|
||||
CONFIG_UUENCODE=y
|
||||
CONFIG_WC=y
|
||||
CONFIG_FEATURE_WC_LARGE=y
|
||||
# CONFIG_WHO is not set
|
||||
CONFIG_WHOAMI=y
|
||||
CONFIG_YES=y
|
||||
|
||||
#
|
||||
# Common options for cp and mv
|
||||
#
|
||||
CONFIG_FEATURE_PRESERVE_HARDLINKS=y
|
||||
|
||||
#
|
||||
# Common options for ls, more and telnet
|
||||
#
|
||||
CONFIG_FEATURE_AUTOWIDTH=y
|
||||
|
||||
#
|
||||
# Common options for df, du, ls
|
||||
#
|
||||
CONFIG_FEATURE_HUMAN_READABLE=y
|
||||
|
||||
#
|
||||
# Common options for md5sum, sha1sum, sha256sum, sha512sum
|
||||
#
|
||||
CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
|
||||
|
||||
#
|
||||
# Console Utilities
|
||||
#
|
||||
CONFIG_CHVT=y
|
||||
CONFIG_FGCONSOLE=y
|
||||
CONFIG_CLEAR=y
|
||||
CONFIG_DEALLOCVT=y
|
||||
CONFIG_DUMPKMAP=y
|
||||
# CONFIG_KBD_MODE is not set
|
||||
# CONFIG_LOADFONT is not set
|
||||
CONFIG_LOADKMAP=y
|
||||
CONFIG_OPENVT=y
|
||||
CONFIG_RESET=y
|
||||
CONFIG_RESIZE=y
|
||||
CONFIG_FEATURE_RESIZE_PRINT=y
|
||||
CONFIG_SETCONSOLE=y
|
||||
# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
|
||||
# CONFIG_SETFONT is not set
|
||||
# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
|
||||
CONFIG_DEFAULT_SETFONT_DIR=""
|
||||
CONFIG_SETKEYCODES=y
|
||||
CONFIG_SETLOGCONS=y
|
||||
CONFIG_SHOWKEY=y
|
||||
# CONFIG_FEATURE_LOADFONT_PSF2 is not set
|
||||
# CONFIG_FEATURE_LOADFONT_RAW is not set
|
||||
|
||||
#
|
||||
# Debian Utilities
|
||||
#
|
||||
CONFIG_MKTEMP=y
|
||||
CONFIG_PIPE_PROGRESS=y
|
||||
CONFIG_RUN_PARTS=y
|
||||
# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
|
||||
CONFIG_FEATURE_RUN_PARTS_FANCY=y
|
||||
CONFIG_START_STOP_DAEMON=y
|
||||
CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
|
||||
# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
|
||||
CONFIG_WHICH=y
|
||||
|
||||
#
|
||||
# Editors
|
||||
#
|
||||
CONFIG_PATCH=y
|
||||
# CONFIG_VI is not set
|
||||
CONFIG_FEATURE_VI_MAX_LEN=0
|
||||
# CONFIG_FEATURE_VI_8BIT is not set
|
||||
# CONFIG_FEATURE_VI_COLON is not set
|
||||
# CONFIG_FEATURE_VI_YANKMARK is not set
|
||||
# CONFIG_FEATURE_VI_SEARCH is not set
|
||||
# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
|
||||
# CONFIG_FEATURE_VI_USE_SIGNALS is not set
|
||||
# CONFIG_FEATURE_VI_DOT_CMD is not set
|
||||
# CONFIG_FEATURE_VI_READONLY is not set
|
||||
# CONFIG_FEATURE_VI_SETOPTS is not set
|
||||
# CONFIG_FEATURE_VI_SET is not set
|
||||
# CONFIG_FEATURE_VI_WIN_RESIZE is not set
|
||||
# CONFIG_FEATURE_VI_ASK_TERMINAL is not set
|
||||
# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
|
||||
# CONFIG_AWK is not set
|
||||
# CONFIG_FEATURE_AWK_LIBM is not set
|
||||
CONFIG_CMP=y
|
||||
CONFIG_DIFF=y
|
||||
# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
|
||||
CONFIG_FEATURE_DIFF_DIR=y
|
||||
# CONFIG_ED is not set
|
||||
# CONFIG_SED is not set
|
||||
# CONFIG_FEATURE_ALLOW_EXEC is not set
|
||||
|
||||
#
|
||||
# Finding Utilities
|
||||
#
|
||||
# CONFIG_FIND is not set
|
||||
# CONFIG_FEATURE_FIND_PRINT0 is not set
|
||||
# CONFIG_FEATURE_FIND_MTIME is not set
|
||||
# CONFIG_FEATURE_FIND_MMIN is not set
|
||||
# CONFIG_FEATURE_FIND_PERM is not set
|
||||
# CONFIG_FEATURE_FIND_TYPE is not set
|
||||
# CONFIG_FEATURE_FIND_XDEV is not set
|
||||
# CONFIG_FEATURE_FIND_MAXDEPTH is not set
|
||||
# CONFIG_FEATURE_FIND_NEWER is not set
|
||||
# CONFIG_FEATURE_FIND_INUM is not set
|
||||
# CONFIG_FEATURE_FIND_EXEC is not set
|
||||
# CONFIG_FEATURE_FIND_USER is not set
|
||||
# CONFIG_FEATURE_FIND_GROUP is not set
|
||||
# CONFIG_FEATURE_FIND_NOT is not set
|
||||
# CONFIG_FEATURE_FIND_DEPTH is not set
|
||||
# CONFIG_FEATURE_FIND_PAREN is not set
|
||||
# CONFIG_FEATURE_FIND_SIZE is not set
|
||||
# CONFIG_FEATURE_FIND_PRUNE is not set
|
||||
# CONFIG_FEATURE_FIND_DELETE is not set
|
||||
# CONFIG_FEATURE_FIND_PATH is not set
|
||||
# CONFIG_FEATURE_FIND_REGEX is not set
|
||||
# CONFIG_FEATURE_FIND_CONTEXT is not set
|
||||
# CONFIG_FEATURE_FIND_LINKS is not set
|
||||
# CONFIG_GREP is not set
|
||||
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
|
||||
# CONFIG_FEATURE_GREP_FGREP_ALIAS is not set
|
||||
# CONFIG_FEATURE_GREP_CONTEXT is not set
|
||||
CONFIG_XARGS=y
|
||||
CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
|
||||
CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
|
||||
CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
|
||||
CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
|
||||
|
||||
#
|
||||
# Init Utilities
|
||||
#
|
||||
# CONFIG_BOOTCHARTD is not set
|
||||
# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
|
||||
# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
|
||||
CONFIG_HALT=y
|
||||
# CONFIG_FEATURE_CALL_TELINIT is not set
|
||||
CONFIG_TELINIT_PATH=""
|
||||
CONFIG_INIT=y
|
||||
CONFIG_FEATURE_USE_INITTAB=y
|
||||
# CONFIG_FEATURE_KILL_REMOVED is not set
|
||||
CONFIG_FEATURE_KILL_DELAY=0
|
||||
CONFIG_FEATURE_INIT_SCTTY=y
|
||||
CONFIG_FEATURE_INIT_SYSLOG=y
|
||||
CONFIG_FEATURE_EXTRA_QUIET=y
|
||||
CONFIG_FEATURE_INIT_COREDUMPS=y
|
||||
CONFIG_FEATURE_INITRD=y
|
||||
CONFIG_INIT_TERMINAL_TYPE="linux"
|
||||
CONFIG_MESG=y
|
||||
CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y
|
||||
|
||||
#
|
||||
# Login/Password Management Utilities
|
||||
#
|
||||
# CONFIG_ADD_SHELL is not set
|
||||
# CONFIG_REMOVE_SHELL is not set
|
||||
# CONFIG_FEATURE_SHADOWPASSWDS is not set
|
||||
# CONFIG_USE_BB_PWD_GRP is not set
|
||||
# CONFIG_USE_BB_SHADOW is not set
|
||||
# CONFIG_USE_BB_CRYPT is not set
|
||||
# CONFIG_USE_BB_CRYPT_SHA is not set
|
||||
# CONFIG_ADDUSER is not set
|
||||
# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
|
||||
# CONFIG_FEATURE_CHECK_NAMES is not set
|
||||
CONFIG_FIRST_SYSTEM_ID=0
|
||||
CONFIG_LAST_SYSTEM_ID=0
|
||||
# CONFIG_ADDGROUP is not set
|
||||
# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
|
||||
# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
|
||||
# CONFIG_DELUSER is not set
|
||||
# CONFIG_DELGROUP is not set
|
||||
# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
|
||||
# CONFIG_GETTY is not set
|
||||
# CONFIG_LOGIN is not set
|
||||
# CONFIG_PAM is not set
|
||||
# CONFIG_LOGIN_SCRIPTS is not set
|
||||
# CONFIG_FEATURE_NOLOGIN is not set
|
||||
# CONFIG_FEATURE_SECURETTY is not set
|
||||
# CONFIG_PASSWD is not set
|
||||
# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
|
||||
# CONFIG_CRYPTPW is not set
|
||||
# CONFIG_CHPASSWD is not set
|
||||
# CONFIG_SU is not set
|
||||
# CONFIG_FEATURE_SU_SYSLOG is not set
|
||||
# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
|
||||
# CONFIG_SULOGIN is not set
|
||||
# CONFIG_VLOCK is not set
|
||||
|
||||
#
|
||||
# Linux Ext2 FS Progs
|
||||
#
|
||||
CONFIG_CHATTR=y
|
||||
# CONFIG_FSCK is not set
|
||||
CONFIG_LSATTR=y
|
||||
CONFIG_TUNE2FS=y
|
||||
|
||||
#
|
||||
# Linux Module Utilities
|
||||
#
|
||||
CONFIG_MODINFO=y
|
||||
CONFIG_MODPROBE_SMALL=y
|
||||
CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y
|
||||
CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y
|
||||
# CONFIG_INSMOD is not set
|
||||
# CONFIG_RMMOD is not set
|
||||
# CONFIG_LSMOD is not set
|
||||
# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
|
||||
# CONFIG_MODPROBE is not set
|
||||
# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
|
||||
# CONFIG_DEPMOD is not set
|
||||
|
||||
#
|
||||
# Options common to multiple modutils
|
||||
#
|
||||
# CONFIG_FEATURE_2_4_MODULES is not set
|
||||
# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
|
||||
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
|
||||
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
|
||||
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
|
||||
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
|
||||
# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
|
||||
# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set
|
||||
# CONFIG_FEATURE_MODUTILS_ALIAS is not set
|
||||
# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set
|
||||
CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
|
||||
CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
|
||||
|
||||
#
|
||||
# Linux System Utilities
|
||||
#
|
||||
CONFIG_BLOCKDEV=y
|
||||
CONFIG_REV=y
|
||||
# CONFIG_ACPID is not set
|
||||
# CONFIG_FEATURE_ACPID_COMPAT is not set
|
||||
CONFIG_BLKID=y
|
||||
# CONFIG_FEATURE_BLKID_TYPE is not set
|
||||
CONFIG_DMESG=y
|
||||
CONFIG_FEATURE_DMESG_PRETTY=y
|
||||
CONFIG_FBSET=y
|
||||
CONFIG_FEATURE_FBSET_FANCY=y
|
||||
CONFIG_FEATURE_FBSET_READMODE=y
|
||||
CONFIG_FDFLUSH=y
|
||||
CONFIG_FDFORMAT=y
|
||||
CONFIG_FDISK=y
|
||||
CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
|
||||
CONFIG_FEATURE_FDISK_WRITABLE=y
|
||||
# CONFIG_FEATURE_AIX_LABEL is not set
|
||||
# CONFIG_FEATURE_SGI_LABEL is not set
|
||||
# CONFIG_FEATURE_SUN_LABEL is not set
|
||||
# CONFIG_FEATURE_OSF_LABEL is not set
|
||||
# CONFIG_FEATURE_GPT_LABEL is not set
|
||||
CONFIG_FEATURE_FDISK_ADVANCED=y
|
||||
CONFIG_FINDFS=y
|
||||
CONFIG_FLOCK=y
|
||||
CONFIG_FREERAMDISK=y
|
||||
# CONFIG_FSCK_MINIX is not set
|
||||
# CONFIG_MKFS_EXT2 is not set
|
||||
# CONFIG_MKFS_MINIX is not set
|
||||
# CONFIG_FEATURE_MINIX2 is not set
|
||||
# CONFIG_MKFS_REISER is not set
|
||||
# CONFIG_MKFS_VFAT is not set
|
||||
CONFIG_GETOPT=y
|
||||
CONFIG_FEATURE_GETOPT_LONG=y
|
||||
CONFIG_HEXDUMP=y
|
||||
CONFIG_FEATURE_HEXDUMP_REVERSE=y
|
||||
CONFIG_HD=y
|
||||
# CONFIG_HWCLOCK is not set
|
||||
# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
|
||||
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
|
||||
# CONFIG_IPCRM is not set
|
||||
# CONFIG_IPCS is not set
|
||||
CONFIG_LOSETUP=y
|
||||
CONFIG_LSPCI=y
|
||||
CONFIG_LSUSB=y
|
||||
# CONFIG_MDEV is not set
|
||||
# CONFIG_FEATURE_MDEV_CONF is not set
|
||||
# CONFIG_FEATURE_MDEV_RENAME is not set
|
||||
# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
|
||||
# CONFIG_FEATURE_MDEV_EXEC is not set
|
||||
# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
|
||||
CONFIG_MKSWAP=y
|
||||
CONFIG_FEATURE_MKSWAP_UUID=y
|
||||
CONFIG_MORE=y
|
||||
# CONFIG_MOUNT is not set
|
||||
# CONFIG_FEATURE_MOUNT_FAKE is not set
|
||||
# CONFIG_FEATURE_MOUNT_VERBOSE is not set
|
||||
# CONFIG_FEATURE_MOUNT_HELPERS is not set
|
||||
# CONFIG_FEATURE_MOUNT_LABEL is not set
|
||||
# CONFIG_FEATURE_MOUNT_NFS is not set
|
||||
# CONFIG_FEATURE_MOUNT_CIFS is not set
|
||||
# CONFIG_FEATURE_MOUNT_FLAGS is not set
|
||||
# CONFIG_FEATURE_MOUNT_FSTAB is not set
|
||||
# CONFIG_PIVOT_ROOT is not set
|
||||
# CONFIG_RDATE is not set
|
||||
CONFIG_RDEV=y
|
||||
CONFIG_READPROFILE=y
|
||||
CONFIG_RTCWAKE=y
|
||||
CONFIG_SCRIPT=y
|
||||
CONFIG_SCRIPTREPLAY=y
|
||||
# CONFIG_SETARCH is not set
|
||||
# CONFIG_SWAPONOFF is not set
|
||||
# CONFIG_FEATURE_SWAPON_PRI is not set
|
||||
# CONFIG_SWITCH_ROOT is not set
|
||||
# CONFIG_UMOUNT is not set
|
||||
# CONFIG_FEATURE_UMOUNT_ALL is not set
|
||||
# CONFIG_FEATURE_MOUNT_LOOP is not set
|
||||
# CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set
|
||||
# CONFIG_FEATURE_MTAB_SUPPORT is not set
|
||||
CONFIG_VOLUMEID=y
|
||||
|
||||
#
|
||||
# Filesystem/Volume identification
|
||||
#
|
||||
CONFIG_FEATURE_VOLUMEID_EXT=y
|
||||
CONFIG_FEATURE_VOLUMEID_BTRFS=y
|
||||
CONFIG_FEATURE_VOLUMEID_REISERFS=y
|
||||
CONFIG_FEATURE_VOLUMEID_FAT=y
|
||||
CONFIG_FEATURE_VOLUMEID_HFS=y
|
||||
CONFIG_FEATURE_VOLUMEID_JFS=y
|
||||
CONFIG_FEATURE_VOLUMEID_XFS=y
|
||||
CONFIG_FEATURE_VOLUMEID_NTFS=y
|
||||
CONFIG_FEATURE_VOLUMEID_ISO9660=y
|
||||
CONFIG_FEATURE_VOLUMEID_UDF=y
|
||||
CONFIG_FEATURE_VOLUMEID_LUKS=y
|
||||
CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
|
||||
CONFIG_FEATURE_VOLUMEID_CRAMFS=y
|
||||
CONFIG_FEATURE_VOLUMEID_ROMFS=y
|
||||
CONFIG_FEATURE_VOLUMEID_SYSV=y
|
||||
CONFIG_FEATURE_VOLUMEID_OCFS2=y
|
||||
CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
|
||||
|
||||
#
|
||||
# Miscellaneous Utilities
|
||||
#
|
||||
# CONFIG_CONSPY is not set
|
||||
# CONFIG_NANDWRITE is not set
|
||||
CONFIG_NANDDUMP=y
|
||||
CONFIG_SETSERIAL=y
|
||||
# CONFIG_UBIATTACH is not set
|
||||
# CONFIG_UBIDETACH is not set
|
||||
# CONFIG_UBIMKVOL is not set
|
||||
# CONFIG_UBIRMVOL is not set
|
||||
# CONFIG_UBIRSVOL is not set
|
||||
# CONFIG_UBIUPDATEVOL is not set
|
||||
# CONFIG_ADJTIMEX is not set
|
||||
# CONFIG_BBCONFIG is not set
|
||||
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
|
||||
CONFIG_BEEP=y
|
||||
CONFIG_FEATURE_BEEP_FREQ=4000
|
||||
CONFIG_FEATURE_BEEP_LENGTH_MS=30
|
||||
CONFIG_CHAT=y
|
||||
CONFIG_FEATURE_CHAT_NOFAIL=y
|
||||
# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
|
||||
CONFIG_FEATURE_CHAT_IMPLICIT_CR=y
|
||||
CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y
|
||||
CONFIG_FEATURE_CHAT_SEND_ESCAPES=y
|
||||
CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y
|
||||
CONFIG_FEATURE_CHAT_CLR_ABORT=y
|
||||
CONFIG_CHRT=y
|
||||
# CONFIG_CROND is not set
|
||||
# CONFIG_FEATURE_CROND_D is not set
|
||||
# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
|
||||
CONFIG_FEATURE_CROND_DIR=""
|
||||
# CONFIG_CRONTAB is not set
|
||||
CONFIG_DC=y
|
||||
CONFIG_FEATURE_DC_LIBM=y
|
||||
# CONFIG_DEVFSD is not set
|
||||
# CONFIG_DEVFSD_MODLOAD is not set
|
||||
# CONFIG_DEVFSD_FG_NP is not set
|
||||
# CONFIG_DEVFSD_VERBOSE is not set
|
||||
# CONFIG_FEATURE_DEVFS is not set
|
||||
CONFIG_DEVMEM=y
|
||||
# CONFIG_EJECT is not set
|
||||
# CONFIG_FEATURE_EJECT_SCSI is not set
|
||||
CONFIG_FBSPLASH=y
|
||||
CONFIG_FLASHCP=y
|
||||
CONFIG_FLASH_LOCK=y
|
||||
CONFIG_FLASH_UNLOCK=y
|
||||
# CONFIG_FLASH_ERASEALL is not set
|
||||
# CONFIG_IONICE is not set
|
||||
CONFIG_INOTIFYD=y
|
||||
# CONFIG_LAST is not set
|
||||
# CONFIG_FEATURE_LAST_SMALL is not set
|
||||
# CONFIG_FEATURE_LAST_FANCY is not set
|
||||
# CONFIG_LESS is not set
|
||||
CONFIG_FEATURE_LESS_MAXLINES=0
|
||||
# CONFIG_FEATURE_LESS_BRACKETS is not set
|
||||
# CONFIG_FEATURE_LESS_FLAGS is not set
|
||||
# CONFIG_FEATURE_LESS_MARKS is not set
|
||||
# CONFIG_FEATURE_LESS_REGEXP is not set
|
||||
# CONFIG_FEATURE_LESS_WINCH is not set
|
||||
# CONFIG_FEATURE_LESS_DASHCMD is not set
|
||||
# CONFIG_FEATURE_LESS_LINENUMS is not set
|
||||
CONFIG_HDPARM=y
|
||||
CONFIG_FEATURE_HDPARM_GET_IDENTITY=y
|
||||
CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y
|
||||
CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y
|
||||
CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y
|
||||
CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y
|
||||
CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y
|
||||
CONFIG_MAKEDEVS=y
|
||||
# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
|
||||
CONFIG_FEATURE_MAKEDEVS_TABLE=y
|
||||
CONFIG_MAN=y
|
||||
# CONFIG_MICROCOM is not set
|
||||
# CONFIG_MOUNTPOINT is not set
|
||||
# CONFIG_MT is not set
|
||||
CONFIG_RAIDAUTORUN=y
|
||||
# CONFIG_READAHEAD is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_RUNLEVEL is not set
|
||||
CONFIG_RX=y
|
||||
CONFIG_SETSID=y
|
||||
CONFIG_STRINGS=y
|
||||
# CONFIG_TASKSET is not set
|
||||
# CONFIG_FEATURE_TASKSET_FANCY is not set
|
||||
CONFIG_TIME=y
|
||||
CONFIG_TIMEOUT=y
|
||||
CONFIG_TTYSIZE=y
|
||||
CONFIG_VOLNAME=y
|
||||
# CONFIG_WALL is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
# Networking Utilities
|
||||
#
|
||||
# CONFIG_NAMEIF is not set
|
||||
# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
|
||||
CONFIG_NBDCLIENT=y
|
||||
CONFIG_NC=y
|
||||
CONFIG_NC_SERVER=y
|
||||
CONFIG_NC_EXTRA=y
|
||||
# CONFIG_NC_110_COMPAT is not set
|
||||
# CONFIG_PING is not set
|
||||
# CONFIG_PING6 is not set
|
||||
# CONFIG_FEATURE_FANCY_PING is not set
|
||||
CONFIG_WHOIS=y
|
||||
# CONFIG_FEATURE_IPV6 is not set
|
||||
# CONFIG_FEATURE_UNIX_LOCAL is not set
|
||||
# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set
|
||||
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
|
||||
CONFIG_ARP=y
|
||||
# CONFIG_ARPING is not set
|
||||
# CONFIG_BRCTL is not set
|
||||
# CONFIG_FEATURE_BRCTL_FANCY is not set
|
||||
# CONFIG_FEATURE_BRCTL_SHOW is not set
|
||||
CONFIG_DNSD=y
|
||||
# CONFIG_ETHER_WAKE is not set
|
||||
CONFIG_FAKEIDENTD=y
|
||||
CONFIG_FTPD=y
|
||||
CONFIG_FEATURE_FTP_WRITE=y
|
||||
CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y
|
||||
CONFIG_FTPGET=y
|
||||
CONFIG_FTPPUT=y
|
||||
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
|
||||
# CONFIG_HOSTNAME is not set
|
||||
CONFIG_HTTPD=y
|
||||
CONFIG_FEATURE_HTTPD_RANGES=y
|
||||
CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
|
||||
CONFIG_FEATURE_HTTPD_SETUID=y
|
||||
CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
|
||||
# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
|
||||
CONFIG_FEATURE_HTTPD_CGI=y
|
||||
CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
|
||||
CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
|
||||
CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
|
||||
CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
|
||||
CONFIG_FEATURE_HTTPD_PROXY=y
|
||||
CONFIG_FEATURE_HTTPD_GZIP=y
|
||||
CONFIG_IFCONFIG=y
|
||||
CONFIG_FEATURE_IFCONFIG_STATUS=y
|
||||
# CONFIG_FEATURE_IFCONFIG_SLIP is not set
|
||||
CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
|
||||
CONFIG_FEATURE_IFCONFIG_HW=y
|
||||
CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
|
||||
# CONFIG_IFENSLAVE is not set
|
||||
# CONFIG_IFPLUGD is not set
|
||||
CONFIG_IFUPDOWN=y
|
||||
CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
|
||||
CONFIG_FEATURE_IFUPDOWN_IP=y
|
||||
CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
|
||||
# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
|
||||
CONFIG_FEATURE_IFUPDOWN_IPV4=y
|
||||
# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
|
||||
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
|
||||
# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
|
||||
# CONFIG_INETD is not set
|
||||
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
|
||||
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
|
||||
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
|
||||
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
|
||||
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
|
||||
# CONFIG_FEATURE_INETD_RPC is not set
|
||||
CONFIG_IP=y
|
||||
CONFIG_FEATURE_IP_ADDRESS=y
|
||||
CONFIG_FEATURE_IP_LINK=y
|
||||
CONFIG_FEATURE_IP_ROUTE=y
|
||||
CONFIG_FEATURE_IP_TUNNEL=y
|
||||
CONFIG_FEATURE_IP_RULE=y
|
||||
CONFIG_FEATURE_IP_SHORT_FORMS=y
|
||||
# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
|
||||
CONFIG_IPADDR=y
|
||||
CONFIG_IPLINK=y
|
||||
CONFIG_IPROUTE=y
|
||||
CONFIG_IPTUNNEL=y
|
||||
CONFIG_IPRULE=y
|
||||
CONFIG_IPCALC=y
|
||||
CONFIG_FEATURE_IPCALC_FANCY=y
|
||||
# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
|
||||
CONFIG_NETSTAT=y
|
||||
CONFIG_FEATURE_NETSTAT_WIDE=y
|
||||
CONFIG_FEATURE_NETSTAT_PRG=y
|
||||
# CONFIG_NSLOOKUP is not set
|
||||
# CONFIG_NTPD is not set
|
||||
# CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
CONFIG_PSCAN=y
|
||||
CONFIG_ROUTE=y
|
||||
# CONFIG_SLATTACH is not set
|
||||
CONFIG_TCPSVD=y
|
||||
# CONFIG_TELNET is not set
|
||||
# CONFIG_FEATURE_TELNET_TTYPE is not set
|
||||
# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
|
||||
# CONFIG_TELNETD is not set
|
||||
# CONFIG_FEATURE_TELNETD_STANDALONE is not set
|
||||
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
|
||||
# CONFIG_TFTP is not set
|
||||
# CONFIG_TFTPD is not set
|
||||
# CONFIG_FEATURE_TFTP_GET is not set
|
||||
# CONFIG_FEATURE_TFTP_PUT is not set
|
||||
# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
|
||||
# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
|
||||
# CONFIG_TFTP_DEBUG is not set
|
||||
# CONFIG_TRACEROUTE is not set
|
||||
# CONFIG_TRACEROUTE6 is not set
|
||||
# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
|
||||
# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
|
||||
# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
|
||||
CONFIG_TUNCTL=y
|
||||
CONFIG_FEATURE_TUNCTL_UG=y
|
||||
# CONFIG_UDHCPD is not set
|
||||
# CONFIG_DHCPRELAY is not set
|
||||
# CONFIG_DUMPLEASES is not set
|
||||
# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
|
||||
# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
|
||||
CONFIG_DHCPD_LEASES_FILE=""
|
||||
CONFIG_UDHCPC=y
|
||||
CONFIG_FEATURE_UDHCPC_ARPING=y
|
||||
# CONFIG_FEATURE_UDHCP_PORT is not set
|
||||
CONFIG_UDHCP_DEBUG=9
|
||||
CONFIG_FEATURE_UDHCP_RFC3397=y
|
||||
CONFIG_FEATURE_UDHCP_8021Q=y
|
||||
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
|
||||
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
|
||||
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
|
||||
# CONFIG_UDPSVD is not set
|
||||
# CONFIG_VCONFIG is not set
|
||||
CONFIG_WGET=y
|
||||
CONFIG_FEATURE_WGET_STATUSBAR=y
|
||||
CONFIG_FEATURE_WGET_AUTHENTICATION=y
|
||||
# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
|
||||
CONFIG_FEATURE_WGET_TIMEOUT=y
|
||||
# CONFIG_ZCIP is not set
|
||||
|
||||
#
|
||||
# Print Utilities
|
||||
#
|
||||
CONFIG_LPD=y
|
||||
CONFIG_LPR=y
|
||||
CONFIG_LPQ=y
|
||||
|
||||
#
|
||||
# Mail Utilities
|
||||
#
|
||||
CONFIG_MAKEMIME=y
|
||||
CONFIG_FEATURE_MIME_CHARSET="us-ascii"
|
||||
CONFIG_POPMAILDIR=y
|
||||
CONFIG_FEATURE_POPMAILDIR_DELIVERY=y
|
||||
CONFIG_REFORMIME=y
|
||||
CONFIG_FEATURE_REFORMIME_COMPAT=y
|
||||
CONFIG_SENDMAIL=y
|
||||
|
||||
#
|
||||
# Process Utilities
|
||||
#
|
||||
CONFIG_IOSTAT=y
|
||||
CONFIG_MPSTAT=y
|
||||
CONFIG_NMETER=y
|
||||
CONFIG_PMAP=y
|
||||
CONFIG_POWERTOP=y
|
||||
CONFIG_PSTREE=y
|
||||
CONFIG_PWDX=y
|
||||
CONFIG_SMEMCAP=y
|
||||
# CONFIG_FREE is not set
|
||||
CONFIG_FUSER=y
|
||||
# CONFIG_KILL is not set
|
||||
# CONFIG_KILLALL is not set
|
||||
# CONFIG_KILLALL5 is not set
|
||||
# CONFIG_PGREP is not set
|
||||
CONFIG_PIDOF=y
|
||||
CONFIG_FEATURE_PIDOF_SINGLE=y
|
||||
CONFIG_FEATURE_PIDOF_OMIT=y
|
||||
# CONFIG_PKILL is not set
|
||||
# CONFIG_PS is not set
|
||||
# CONFIG_FEATURE_PS_WIDE is not set
|
||||
# CONFIG_FEATURE_PS_TIME is not set
|
||||
# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
|
||||
# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
|
||||
CONFIG_RENICE=y
|
||||
CONFIG_BB_SYSCTL=y
|
||||
CONFIG_TOP=y
|
||||
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
|
||||
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
|
||||
CONFIG_FEATURE_TOP_SMP_CPU=y
|
||||
CONFIG_FEATURE_TOP_DECIMALS=y
|
||||
CONFIG_FEATURE_TOP_SMP_PROCESS=y
|
||||
CONFIG_FEATURE_TOPMEM=y
|
||||
CONFIG_FEATURE_SHOW_THREADS=y
|
||||
# CONFIG_UPTIME is not set
|
||||
CONFIG_WATCH=y
|
||||
|
||||
#
|
||||
# Runit Utilities
|
||||
#
|
||||
CONFIG_RUNSV=y
|
||||
CONFIG_RUNSVDIR=y
|
||||
# CONFIG_FEATURE_RUNSVDIR_LOG is not set
|
||||
CONFIG_SV=y
|
||||
CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service"
|
||||
CONFIG_SVLOGD=y
|
||||
CONFIG_CHPST=y
|
||||
CONFIG_SETUIDGID=y
|
||||
CONFIG_ENVUIDGID=y
|
||||
CONFIG_ENVDIR=y
|
||||
CONFIG_SOFTLIMIT=y
|
||||
# CONFIG_CHCON is not set
|
||||
# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
|
||||
# CONFIG_GETENFORCE is not set
|
||||
# CONFIG_GETSEBOOL is not set
|
||||
# CONFIG_LOAD_POLICY is not set
|
||||
# CONFIG_MATCHPATHCON is not set
|
||||
# CONFIG_RESTORECON is not set
|
||||
# CONFIG_RUNCON is not set
|
||||
# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
|
||||
# CONFIG_SELINUXENABLED is not set
|
||||
# CONFIG_SETENFORCE is not set
|
||||
# CONFIG_SETFILES is not set
|
||||
# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
|
||||
# CONFIG_SETSEBOOL is not set
|
||||
# CONFIG_SESTATUS is not set
|
||||
|
||||
#
|
||||
# Shells
|
||||
#
|
||||
# CONFIG_ASH is not set
|
||||
# CONFIG_ASH_BASH_COMPAT is not set
|
||||
# CONFIG_ASH_IDLE_TIMEOUT is not set
|
||||
# CONFIG_ASH_JOB_CONTROL is not set
|
||||
# CONFIG_ASH_ALIAS is not set
|
||||
# CONFIG_ASH_GETOPTS is not set
|
||||
# CONFIG_ASH_BUILTIN_ECHO is not set
|
||||
# CONFIG_ASH_BUILTIN_PRINTF is not set
|
||||
# CONFIG_ASH_BUILTIN_TEST is not set
|
||||
# CONFIG_ASH_CMDCMD is not set
|
||||
# CONFIG_ASH_MAIL is not set
|
||||
# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set
|
||||
# CONFIG_ASH_RANDOM_SUPPORT is not set
|
||||
# CONFIG_ASH_EXPAND_PRMT is not set
|
||||
CONFIG_CTTYHACK=y
|
||||
# CONFIG_HUSH is not set
|
||||
# CONFIG_HUSH_BASH_COMPAT is not set
|
||||
# CONFIG_HUSH_BRACE_EXPANSION is not set
|
||||
# CONFIG_HUSH_HELP is not set
|
||||
# CONFIG_HUSH_INTERACTIVE is not set
|
||||
# CONFIG_HUSH_SAVEHISTORY is not set
|
||||
# CONFIG_HUSH_JOB is not set
|
||||
# CONFIG_HUSH_TICK is not set
|
||||
# CONFIG_HUSH_IF is not set
|
||||
# CONFIG_HUSH_LOOPS is not set
|
||||
# CONFIG_HUSH_CASE is not set
|
||||
# CONFIG_HUSH_FUNCTIONS is not set
|
||||
# CONFIG_HUSH_LOCAL is not set
|
||||
# CONFIG_HUSH_RANDOM_SUPPORT is not set
|
||||
# CONFIG_HUSH_EXPORT_N is not set
|
||||
# CONFIG_HUSH_MODE_X is not set
|
||||
# CONFIG_MSH is not set
|
||||
# CONFIG_FEATURE_SH_IS_ASH is not set
|
||||
# CONFIG_FEATURE_SH_IS_HUSH is not set
|
||||
CONFIG_FEATURE_SH_IS_NONE=y
|
||||
# CONFIG_FEATURE_BASH_IS_ASH is not set
|
||||
# CONFIG_FEATURE_BASH_IS_HUSH is not set
|
||||
CONFIG_FEATURE_BASH_IS_NONE=y
|
||||
# CONFIG_SH_MATH_SUPPORT is not set
|
||||
# CONFIG_SH_MATH_SUPPORT_64 is not set
|
||||
# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
|
||||
# CONFIG_FEATURE_SH_STANDALONE is not set
|
||||
# CONFIG_FEATURE_SH_NOFORK is not set
|
||||
# CONFIG_FEATURE_SH_HISTFILESIZE is not set
|
||||
|
||||
#
|
||||
# System Logging Utilities
|
||||
#
|
||||
# CONFIG_SYSLOGD is not set
|
||||
# CONFIG_FEATURE_ROTATE_LOGFILE is not set
|
||||
# CONFIG_FEATURE_REMOTE_LOG is not set
|
||||
# CONFIG_FEATURE_SYSLOGD_DUP is not set
|
||||
# CONFIG_FEATURE_SYSLOGD_CFG is not set
|
||||
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
|
||||
# CONFIG_FEATURE_IPC_SYSLOG is not set
|
||||
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
|
||||
# CONFIG_LOGREAD is not set
|
||||
# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
|
||||
CONFIG_KLOGD=y
|
||||
CONFIG_FEATURE_KLOGD_KLOGCTL=y
|
||||
# CONFIG_LOGGER is not set
|
||||
+109
-124
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Busybox version: 1.20.0.git
|
||||
# Sun Nov 6 07:51:38 2011
|
||||
# Busybox version: 1.19.0.git
|
||||
# Wed Jun 29 12:01:57 2011
|
||||
#
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
||||
@@ -12,7 +12,7 @@ CONFIG_HAVE_DOT_CONFIG=y
|
||||
#
|
||||
# General Configuration
|
||||
#
|
||||
CONFIG_DESKTOP=y
|
||||
# CONFIG_DESKTOP is not set
|
||||
# CONFIG_EXTRA_COMPAT is not set
|
||||
# CONFIG_INCLUDE_SUSv2 is not set
|
||||
# CONFIG_USE_PORTABLE_CODE is not set
|
||||
@@ -70,8 +70,6 @@ CONFIG_CROSS_COMPILER_PREFIX="arm-eabi-"
|
||||
# -Werror=sequence-point -Wstrict-aliasing=2 -Wno-undef -Wno-shadow
|
||||
# bbox already adds these:
|
||||
# -ffunction-sections -fomit-frame-pointer
|
||||
# enabled implicitly by -Os:
|
||||
# -frerun-cse-after-loop
|
||||
# should be not needed, or even increases code size:
|
||||
# -finline-functions -fno-inline-functions-called-once -finline-limit=64
|
||||
# -fstack-protector -fno-strict-aliasing -fno-exceptions -funwind-tables
|
||||
@@ -79,8 +77,9 @@ CONFIG_CROSS_COMPILER_PREFIX="arm-eabi-"
|
||||
# todo: do we need these? -
|
||||
# -fno-short-enums
|
||||
# -fgcse-after-reload
|
||||
# -frerun-cse-after-loop
|
||||
# -frename-registers
|
||||
CONFIG_EXTRA_CFLAGS="-I$A/system/core/include -I$A/bionic/libc/arch-arm/include -I$A/bionic/libc/include -I$A/bionic/libc/kernel/common -I$A/bionic/libc/kernel/arch-arm -I$A/bionic/libm/include -I$A/bionic/libm/include/arch/arm -include $A/system/core/include/arch/linux-arm/AndroidConfig.h -I$A/system/core/include/arch/linux-arm/ -D__ANDROID__ -DSK_RELEASE -nostdlib -march=armv7-a -msoft-float -mfloat-abi=softfp -mfpu=neon -mthumb -mthumb-interwork -fpic -fno-short-enums -fgcse-after-reload -frename-registers"
|
||||
CONFIG_EXTRA_CFLAGS="-I$A/system/core/include -I$A/bionic/libc/arch-arm/include -I$A/bionic/libc/include -I$A/bionic/libc/kernel/common -I$A/bionic/libc/kernel/arch-arm -I$A/bionic/libm/include -I$A/bionic/libm/include/arch/arm -include $A/system/core/include/arch/linux-arm/AndroidConfig.h -I$A/system/core/include/arch/linux-arm/ -DANDROID -DSK_RELEASE -nostdlib -march=armv7-a -msoft-float -mfloat-abi=softfp -mfpu=neon -mthumb -mthumb-interwork -fpic -fno-short-enums -fgcse-after-reload -frerun-cse-after-loop -frename-registers"
|
||||
|
||||
#
|
||||
# Debugging Options
|
||||
@@ -110,7 +109,7 @@ CONFIG_PREFIX="./_install"
|
||||
# CONFIG_FEATURE_SYSTEMD is not set
|
||||
# CONFIG_FEATURE_RTMINMAX is not set
|
||||
CONFIG_PASSWORD_MINLEN=6
|
||||
CONFIG_MD5_SMALL=1
|
||||
CONFIG_MD5_SIZE_VS_SPEED=2
|
||||
# CONFIG_FEATURE_FAST_TOP is not set
|
||||
# CONFIG_FEATURE_ETC_NETWORKS is not set
|
||||
CONFIG_FEATURE_USE_TERMIOS=y
|
||||
@@ -119,8 +118,6 @@ CONFIG_FEATURE_EDITING_MAX_LEN=0
|
||||
# CONFIG_FEATURE_EDITING_VI is not set
|
||||
CONFIG_FEATURE_EDITING_HISTORY=0
|
||||
# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
|
||||
# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set
|
||||
# CONFIG_FEATURE_REVERSE_SEARCH is not set
|
||||
# CONFIG_FEATURE_TAB_COMPLETION is not set
|
||||
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
|
||||
# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
|
||||
@@ -159,7 +156,6 @@ CONFIG_DPKG_DEB=y
|
||||
CONFIG_GUNZIP=y
|
||||
CONFIG_GZIP=y
|
||||
# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
|
||||
CONFIG_GZIP_FAST=0
|
||||
CONFIG_LZOP=y
|
||||
CONFIG_LZOP_COMPR_HIGH=y
|
||||
CONFIG_RPM2CPIO=y
|
||||
@@ -193,19 +189,15 @@ CONFIG_CAT=y
|
||||
# CONFIG_FEATURE_DATE_ISOFMT is not set
|
||||
# CONFIG_FEATURE_DATE_NANO is not set
|
||||
# CONFIG_FEATURE_DATE_COMPAT is not set
|
||||
# CONFIG_HOSTID is not set
|
||||
# CONFIG_ID is not set
|
||||
# CONFIG_GROUPS is not set
|
||||
CONFIG_TEST=y
|
||||
CONFIG_FEATURE_TEST_64=y
|
||||
CONFIG_TOUCH=y
|
||||
CONFIG_FEATURE_TOUCH_SUSV3=y
|
||||
CONFIG_TR=y
|
||||
CONFIG_FEATURE_TR_CLASSES=y
|
||||
CONFIG_FEATURE_TR_EQUIV=y
|
||||
CONFIG_BASE64=y
|
||||
# CONFIG_WHO is not set
|
||||
# CONFIG_USERS is not set
|
||||
CONFIG_CAL=y
|
||||
CONFIG_CATV=y
|
||||
CONFIG_CHGRP=y
|
||||
@@ -231,17 +223,18 @@ CONFIG_DU=y
|
||||
CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
|
||||
CONFIG_ECHO=y
|
||||
CONFIG_FEATURE_FANCY_ECHO=y
|
||||
CONFIG_ENV=y
|
||||
# CONFIG_ENV is not set
|
||||
# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
|
||||
CONFIG_EXPAND=y
|
||||
# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
|
||||
CONFIG_EXPR=y
|
||||
CONFIG_EXPR_MATH_SUPPORT_64=y
|
||||
# CONFIG_EXPR is not set
|
||||
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
|
||||
CONFIG_FALSE=y
|
||||
CONFIG_FOLD=y
|
||||
CONFIG_FSYNC=y
|
||||
# CONFIG_FSYNC is not set
|
||||
CONFIG_HEAD=y
|
||||
CONFIG_FEATURE_FANCY_HEAD=y
|
||||
# CONFIG_HOSTID is not set
|
||||
CONFIG_INSTALL=y
|
||||
# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
|
||||
CONFIG_LN=y
|
||||
@@ -301,11 +294,12 @@ CONFIG_UNAME=y
|
||||
CONFIG_UNEXPAND=y
|
||||
# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
|
||||
CONFIG_UNIQ=y
|
||||
CONFIG_USLEEP=y
|
||||
# CONFIG_USLEEP is not set
|
||||
CONFIG_UUDECODE=y
|
||||
CONFIG_UUENCODE=y
|
||||
CONFIG_WC=y
|
||||
CONFIG_FEATURE_WC_LARGE=y
|
||||
# CONFIG_WHO is not set
|
||||
CONFIG_WHOAMI=y
|
||||
CONFIG_YES=y
|
||||
|
||||
@@ -372,61 +366,61 @@ CONFIG_WHICH=y
|
||||
# Editors
|
||||
#
|
||||
CONFIG_PATCH=y
|
||||
CONFIG_VI=y
|
||||
CONFIG_FEATURE_VI_MAX_LEN=4096
|
||||
CONFIG_FEATURE_VI_8BIT=y
|
||||
CONFIG_FEATURE_VI_COLON=y
|
||||
CONFIG_FEATURE_VI_YANKMARK=y
|
||||
CONFIG_FEATURE_VI_SEARCH=y
|
||||
# CONFIG_VI is not set
|
||||
CONFIG_FEATURE_VI_MAX_LEN=0
|
||||
# CONFIG_FEATURE_VI_8BIT is not set
|
||||
# CONFIG_FEATURE_VI_COLON is not set
|
||||
# CONFIG_FEATURE_VI_YANKMARK is not set
|
||||
# CONFIG_FEATURE_VI_SEARCH is not set
|
||||
# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
|
||||
CONFIG_FEATURE_VI_USE_SIGNALS=y
|
||||
CONFIG_FEATURE_VI_DOT_CMD=y
|
||||
CONFIG_FEATURE_VI_READONLY=y
|
||||
CONFIG_FEATURE_VI_SETOPTS=y
|
||||
CONFIG_FEATURE_VI_SET=y
|
||||
CONFIG_FEATURE_VI_WIN_RESIZE=y
|
||||
CONFIG_FEATURE_VI_ASK_TERMINAL=y
|
||||
CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
|
||||
CONFIG_AWK=y
|
||||
CONFIG_FEATURE_AWK_LIBM=y
|
||||
# CONFIG_FEATURE_VI_USE_SIGNALS is not set
|
||||
# CONFIG_FEATURE_VI_DOT_CMD is not set
|
||||
# CONFIG_FEATURE_VI_READONLY is not set
|
||||
# CONFIG_FEATURE_VI_SETOPTS is not set
|
||||
# CONFIG_FEATURE_VI_SET is not set
|
||||
# CONFIG_FEATURE_VI_WIN_RESIZE is not set
|
||||
# CONFIG_FEATURE_VI_ASK_TERMINAL is not set
|
||||
# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
|
||||
# CONFIG_AWK is not set
|
||||
# CONFIG_FEATURE_AWK_LIBM is not set
|
||||
CONFIG_CMP=y
|
||||
CONFIG_DIFF=y
|
||||
# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
|
||||
CONFIG_FEATURE_DIFF_DIR=y
|
||||
CONFIG_ED=y
|
||||
CONFIG_SED=y
|
||||
CONFIG_FEATURE_ALLOW_EXEC=y
|
||||
# CONFIG_ED is not set
|
||||
# CONFIG_SED is not set
|
||||
# CONFIG_FEATURE_ALLOW_EXEC is not set
|
||||
|
||||
#
|
||||
# Finding Utilities
|
||||
#
|
||||
CONFIG_FIND=y
|
||||
CONFIG_FEATURE_FIND_PRINT0=y
|
||||
CONFIG_FEATURE_FIND_MTIME=y
|
||||
CONFIG_FEATURE_FIND_MMIN=y
|
||||
CONFIG_FEATURE_FIND_PERM=y
|
||||
CONFIG_FEATURE_FIND_TYPE=y
|
||||
CONFIG_FEATURE_FIND_XDEV=y
|
||||
CONFIG_FEATURE_FIND_MAXDEPTH=y
|
||||
CONFIG_FEATURE_FIND_NEWER=y
|
||||
CONFIG_FEATURE_FIND_INUM=y
|
||||
CONFIG_FEATURE_FIND_EXEC=y
|
||||
CONFIG_FEATURE_FIND_USER=y
|
||||
CONFIG_FEATURE_FIND_GROUP=y
|
||||
CONFIG_FEATURE_FIND_NOT=y
|
||||
CONFIG_FEATURE_FIND_DEPTH=y
|
||||
CONFIG_FEATURE_FIND_PAREN=y
|
||||
CONFIG_FEATURE_FIND_SIZE=y
|
||||
CONFIG_FEATURE_FIND_PRUNE=y
|
||||
CONFIG_FEATURE_FIND_DELETE=y
|
||||
CONFIG_FEATURE_FIND_PATH=y
|
||||
CONFIG_FEATURE_FIND_REGEX=y
|
||||
# CONFIG_FIND is not set
|
||||
# CONFIG_FEATURE_FIND_PRINT0 is not set
|
||||
# CONFIG_FEATURE_FIND_MTIME is not set
|
||||
# CONFIG_FEATURE_FIND_MMIN is not set
|
||||
# CONFIG_FEATURE_FIND_PERM is not set
|
||||
# CONFIG_FEATURE_FIND_TYPE is not set
|
||||
# CONFIG_FEATURE_FIND_XDEV is not set
|
||||
# CONFIG_FEATURE_FIND_MAXDEPTH is not set
|
||||
# CONFIG_FEATURE_FIND_NEWER is not set
|
||||
# CONFIG_FEATURE_FIND_INUM is not set
|
||||
# CONFIG_FEATURE_FIND_EXEC is not set
|
||||
# CONFIG_FEATURE_FIND_USER is not set
|
||||
# CONFIG_FEATURE_FIND_GROUP is not set
|
||||
# CONFIG_FEATURE_FIND_NOT is not set
|
||||
# CONFIG_FEATURE_FIND_DEPTH is not set
|
||||
# CONFIG_FEATURE_FIND_PAREN is not set
|
||||
# CONFIG_FEATURE_FIND_SIZE is not set
|
||||
# CONFIG_FEATURE_FIND_PRUNE is not set
|
||||
# CONFIG_FEATURE_FIND_DELETE is not set
|
||||
# CONFIG_FEATURE_FIND_PATH is not set
|
||||
# CONFIG_FEATURE_FIND_REGEX is not set
|
||||
# CONFIG_FEATURE_FIND_CONTEXT is not set
|
||||
CONFIG_FEATURE_FIND_LINKS=y
|
||||
CONFIG_GREP=y
|
||||
CONFIG_FEATURE_GREP_EGREP_ALIAS=y
|
||||
CONFIG_FEATURE_GREP_FGREP_ALIAS=y
|
||||
CONFIG_FEATURE_GREP_CONTEXT=y
|
||||
# CONFIG_FEATURE_FIND_LINKS is not set
|
||||
# CONFIG_GREP is not set
|
||||
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
|
||||
# CONFIG_FEATURE_GREP_FGREP_ALIAS is not set
|
||||
# CONFIG_FEATURE_GREP_CONTEXT is not set
|
||||
CONFIG_XARGS=y
|
||||
CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
|
||||
CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
|
||||
@@ -436,9 +430,9 @@ CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
|
||||
#
|
||||
# Init Utilities
|
||||
#
|
||||
CONFIG_BOOTCHARTD=y
|
||||
CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER=y
|
||||
CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE=y
|
||||
# CONFIG_BOOTCHARTD is not set
|
||||
# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
|
||||
# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
|
||||
CONFIG_HALT=y
|
||||
# CONFIG_FEATURE_CALL_TELINIT is not set
|
||||
CONFIG_TELINIT_PATH=""
|
||||
@@ -478,7 +472,6 @@ CONFIG_LAST_SYSTEM_ID=0
|
||||
# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
|
||||
# CONFIG_GETTY is not set
|
||||
# CONFIG_LOGIN is not set
|
||||
# CONFIG_LOGIN_SESSION_AS_CHILD is not set
|
||||
# CONFIG_PAM is not set
|
||||
# CONFIG_LOGIN_SCRIPTS is not set
|
||||
# CONFIG_FEATURE_NOLOGIN is not set
|
||||
@@ -536,17 +529,11 @@ CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
|
||||
# Linux System Utilities
|
||||
#
|
||||
CONFIG_BLOCKDEV=y
|
||||
CONFIG_MDEV=y
|
||||
CONFIG_FEATURE_MDEV_CONF=y
|
||||
CONFIG_FEATURE_MDEV_RENAME=y
|
||||
CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
|
||||
CONFIG_FEATURE_MDEV_EXEC=y
|
||||
CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
|
||||
CONFIG_REV=y
|
||||
# CONFIG_ACPID is not set
|
||||
# CONFIG_FEATURE_ACPID_COMPAT is not set
|
||||
CONFIG_BLKID=y
|
||||
CONFIG_FEATURE_BLKID_TYPE=y
|
||||
# CONFIG_FEATURE_BLKID_TYPE is not set
|
||||
CONFIG_DMESG=y
|
||||
CONFIG_FEATURE_DMESG_PRETTY=y
|
||||
CONFIG_FBSET=y
|
||||
@@ -577,7 +564,7 @@ CONFIG_FEATURE_GETOPT_LONG=y
|
||||
CONFIG_HEXDUMP=y
|
||||
CONFIG_FEATURE_HEXDUMP_REVERSE=y
|
||||
CONFIG_HD=y
|
||||
CONFIG_HWCLOCK=y
|
||||
# CONFIG_HWCLOCK is not set
|
||||
# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
|
||||
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
|
||||
# CONFIG_IPCRM is not set
|
||||
@@ -585,6 +572,12 @@ CONFIG_HWCLOCK=y
|
||||
CONFIG_LOSETUP=y
|
||||
CONFIG_LSPCI=y
|
||||
CONFIG_LSUSB=y
|
||||
# CONFIG_MDEV is not set
|
||||
# CONFIG_FEATURE_MDEV_CONF is not set
|
||||
# CONFIG_FEATURE_MDEV_RENAME is not set
|
||||
# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
|
||||
# CONFIG_FEATURE_MDEV_EXEC is not set
|
||||
# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
|
||||
CONFIG_MKSWAP=y
|
||||
CONFIG_FEATURE_MKSWAP_UUID=y
|
||||
CONFIG_MORE=y
|
||||
@@ -607,7 +600,7 @@ CONFIG_SCRIPTREPLAY=y
|
||||
# CONFIG_SETARCH is not set
|
||||
# CONFIG_SWAPONOFF is not set
|
||||
# CONFIG_FEATURE_SWAPON_PRI is not set
|
||||
CONFIG_SWITCH_ROOT=y
|
||||
# CONFIG_SWITCH_ROOT is not set
|
||||
# CONFIG_UMOUNT is not set
|
||||
# CONFIG_FEATURE_UMOUNT_ALL is not set
|
||||
# CONFIG_FEATURE_MOUNT_LOOP is not set
|
||||
@@ -640,16 +633,6 @@ CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
|
||||
# Miscellaneous Utilities
|
||||
#
|
||||
# CONFIG_CONSPY is not set
|
||||
CONFIG_LESS=y
|
||||
CONFIG_FEATURE_LESS_MAXLINES=9999999
|
||||
CONFIG_FEATURE_LESS_BRACKETS=y
|
||||
CONFIG_FEATURE_LESS_FLAGS=y
|
||||
CONFIG_FEATURE_LESS_MARKS=y
|
||||
CONFIG_FEATURE_LESS_REGEXP=y
|
||||
CONFIG_FEATURE_LESS_WINCH=y
|
||||
CONFIG_FEATURE_LESS_ASK_TERMINAL=y
|
||||
CONFIG_FEATURE_LESS_DASHCMD=y
|
||||
CONFIG_FEATURE_LESS_LINENUMS=y
|
||||
# CONFIG_NANDWRITE is not set
|
||||
CONFIG_NANDDUMP=y
|
||||
CONFIG_SETSERIAL=y
|
||||
@@ -674,11 +657,11 @@ CONFIG_FEATURE_CHAT_SEND_ESCAPES=y
|
||||
CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y
|
||||
CONFIG_FEATURE_CHAT_CLR_ABORT=y
|
||||
CONFIG_CHRT=y
|
||||
CONFIG_CROND=y
|
||||
CONFIG_FEATURE_CROND_D=y
|
||||
CONFIG_FEATURE_CROND_CALL_SENDMAIL=y
|
||||
CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
|
||||
CONFIG_CRONTAB=y
|
||||
# CONFIG_CROND is not set
|
||||
# CONFIG_FEATURE_CROND_D is not set
|
||||
# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
|
||||
CONFIG_FEATURE_CROND_DIR=""
|
||||
# CONFIG_CRONTAB is not set
|
||||
CONFIG_DC=y
|
||||
CONFIG_FEATURE_DC_LIBM=y
|
||||
# CONFIG_DEVFSD is not set
|
||||
@@ -699,6 +682,15 @@ CONFIG_INOTIFYD=y
|
||||
# CONFIG_LAST is not set
|
||||
# CONFIG_FEATURE_LAST_SMALL is not set
|
||||
# CONFIG_FEATURE_LAST_FANCY is not set
|
||||
# CONFIG_LESS is not set
|
||||
CONFIG_FEATURE_LESS_MAXLINES=0
|
||||
# CONFIG_FEATURE_LESS_BRACKETS is not set
|
||||
# CONFIG_FEATURE_LESS_FLAGS is not set
|
||||
# CONFIG_FEATURE_LESS_MARKS is not set
|
||||
# CONFIG_FEATURE_LESS_REGEXP is not set
|
||||
# CONFIG_FEATURE_LESS_WINCH is not set
|
||||
# CONFIG_FEATURE_LESS_DASHCMD is not set
|
||||
# CONFIG_FEATURE_LESS_LINENUMS is not set
|
||||
CONFIG_HDPARM=y
|
||||
CONFIG_FEATURE_HDPARM_GET_IDENTITY=y
|
||||
CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y
|
||||
@@ -739,9 +731,9 @@ CONFIG_NC=y
|
||||
CONFIG_NC_SERVER=y
|
||||
CONFIG_NC_EXTRA=y
|
||||
# CONFIG_NC_110_COMPAT is not set
|
||||
CONFIG_PING=y
|
||||
# CONFIG_PING is not set
|
||||
# CONFIG_PING6 is not set
|
||||
CONFIG_FEATURE_FANCY_PING=y
|
||||
# CONFIG_FEATURE_FANCY_PING is not set
|
||||
CONFIG_WHOIS=y
|
||||
# CONFIG_FEATURE_IPV6 is not set
|
||||
# CONFIG_FEATURE_UNIX_LOCAL is not set
|
||||
@@ -791,7 +783,7 @@ CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
|
||||
CONFIG_FEATURE_IFUPDOWN_IPV4=y
|
||||
# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
|
||||
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
|
||||
CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y
|
||||
# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
|
||||
# CONFIG_INETD is not set
|
||||
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
|
||||
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
|
||||
@@ -825,31 +817,26 @@ CONFIG_PSCAN=y
|
||||
CONFIG_ROUTE=y
|
||||
# CONFIG_SLATTACH is not set
|
||||
CONFIG_TCPSVD=y
|
||||
CONFIG_TELNET=y
|
||||
CONFIG_FEATURE_TELNET_TTYPE=y
|
||||
CONFIG_FEATURE_TELNET_AUTOLOGIN=y
|
||||
CONFIG_TELNETD=y
|
||||
CONFIG_FEATURE_TELNETD_STANDALONE=y
|
||||
CONFIG_FEATURE_TELNETD_INETD_WAIT=y
|
||||
CONFIG_TFTP=y
|
||||
CONFIG_TFTPD=y
|
||||
|
||||
#
|
||||
# Common options for tftp/tftpd
|
||||
#
|
||||
CONFIG_FEATURE_TFTP_GET=y
|
||||
CONFIG_FEATURE_TFTP_PUT=y
|
||||
CONFIG_FEATURE_TFTP_BLOCKSIZE=y
|
||||
CONFIG_FEATURE_TFTP_PROGRESS_BAR=y
|
||||
# CONFIG_TELNET is not set
|
||||
# CONFIG_FEATURE_TELNET_TTYPE is not set
|
||||
# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
|
||||
# CONFIG_TELNETD is not set
|
||||
# CONFIG_FEATURE_TELNETD_STANDALONE is not set
|
||||
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
|
||||
# CONFIG_TFTP is not set
|
||||
# CONFIG_TFTPD is not set
|
||||
# CONFIG_FEATURE_TFTP_GET is not set
|
||||
# CONFIG_FEATURE_TFTP_PUT is not set
|
||||
# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
|
||||
# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
|
||||
# CONFIG_TFTP_DEBUG is not set
|
||||
CONFIG_TRACEROUTE=y
|
||||
# CONFIG_TRACEROUTE is not set
|
||||
# CONFIG_TRACEROUTE6 is not set
|
||||
CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
|
||||
# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
|
||||
# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
|
||||
# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
|
||||
CONFIG_TUNCTL=y
|
||||
CONFIG_FEATURE_TUNCTL_UG=y
|
||||
# CONFIG_UDHCPC6 is not set
|
||||
# CONFIG_UDHCPD is not set
|
||||
# CONFIG_DHCPRELAY is not set
|
||||
# CONFIG_DUMPLEASES is not set
|
||||
@@ -858,15 +845,15 @@ CONFIG_FEATURE_TUNCTL_UG=y
|
||||
CONFIG_DHCPD_LEASES_FILE=""
|
||||
CONFIG_UDHCPC=y
|
||||
CONFIG_FEATURE_UDHCPC_ARPING=y
|
||||
CONFIG_FEATURE_UDHCP_PORT=y
|
||||
# CONFIG_FEATURE_UDHCP_PORT is not set
|
||||
CONFIG_UDHCP_DEBUG=9
|
||||
CONFIG_FEATURE_UDHCP_RFC3397=y
|
||||
CONFIG_FEATURE_UDHCP_8021Q=y
|
||||
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
|
||||
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
|
||||
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
|
||||
CONFIG_UDPSVD=y
|
||||
CONFIG_VCONFIG=y
|
||||
# CONFIG_UDPSVD is not set
|
||||
# CONFIG_VCONFIG is not set
|
||||
CONFIG_WGET=y
|
||||
CONFIG_FEATURE_WGET_STATUSBAR=y
|
||||
CONFIG_FEATURE_WGET_AUTHENTICATION=y
|
||||
@@ -903,9 +890,7 @@ CONFIG_POWERTOP=y
|
||||
CONFIG_PSTREE=y
|
||||
CONFIG_PWDX=y
|
||||
CONFIG_SMEMCAP=y
|
||||
CONFIG_UPTIME=y
|
||||
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
|
||||
CONFIG_FREE=y
|
||||
# CONFIG_FREE is not set
|
||||
CONFIG_FUSER=y
|
||||
# CONFIG_KILL is not set
|
||||
# CONFIG_KILLALL is not set
|
||||
@@ -915,11 +900,10 @@ CONFIG_PIDOF=y
|
||||
CONFIG_FEATURE_PIDOF_SINGLE=y
|
||||
CONFIG_FEATURE_PIDOF_OMIT=y
|
||||
# CONFIG_PKILL is not set
|
||||
CONFIG_PS=y
|
||||
# CONFIG_PS is not set
|
||||
# CONFIG_FEATURE_PS_WIDE is not set
|
||||
# CONFIG_FEATURE_PS_LONG is not set
|
||||
CONFIG_FEATURE_PS_TIME=y
|
||||
CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
|
||||
# CONFIG_FEATURE_PS_TIME is not set
|
||||
# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
|
||||
# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
|
||||
CONFIG_RENICE=y
|
||||
CONFIG_BB_SYSCTL=y
|
||||
@@ -931,6 +915,7 @@ CONFIG_FEATURE_TOP_DECIMALS=y
|
||||
CONFIG_FEATURE_TOP_SMP_PROCESS=y
|
||||
CONFIG_FEATURE_TOPMEM=y
|
||||
CONFIG_FEATURE_SHOW_THREADS=y
|
||||
# CONFIG_UPTIME is not set
|
||||
CONFIG_WATCH=y
|
||||
|
||||
#
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -92,7 +92,7 @@ CONFIG_PREFIX="./_install"
|
||||
# CONFIG_FEATURE_SYSTEMD is not set
|
||||
CONFIG_FEATURE_RTMINMAX=y
|
||||
CONFIG_PASSWORD_MINLEN=6
|
||||
CONFIG_MD5_SMALL=1
|
||||
CONFIG_MD5_SIZE_VS_SPEED=2
|
||||
CONFIG_FEATURE_FAST_TOP=y
|
||||
# CONFIG_FEATURE_ETC_NETWORKS is not set
|
||||
CONFIG_FEATURE_USE_TERMIOS=y
|
||||
|
||||
@@ -90,7 +90,7 @@ CONFIG_PREFIX="./_install"
|
||||
# Busybox Library Tuning
|
||||
#
|
||||
CONFIG_PASSWORD_MINLEN=6
|
||||
CONFIG_MD5_SMALL=1
|
||||
CONFIG_MD5_SIZE_VS_SPEED=2
|
||||
CONFIG_FEATURE_FAST_TOP=y
|
||||
# CONFIG_FEATURE_ETC_NETWORKS is not set
|
||||
CONFIG_FEATURE_USE_TERMIOS=y
|
||||
|
||||
@@ -269,6 +269,13 @@ config FEATURE_FANCY_HEAD
|
||||
help
|
||||
This enables the head options (-c, -q, and -v).
|
||||
|
||||
config HOSTID
|
||||
bool "hostid"
|
||||
default y
|
||||
help
|
||||
hostid prints the numeric identifier (in hexadecimal) for
|
||||
the current host.
|
||||
|
||||
config INSTALL
|
||||
bool "install"
|
||||
default y
|
||||
|
||||
@@ -36,6 +36,7 @@ lib-$(CONFIG_FALSE) += false.o
|
||||
lib-$(CONFIG_FOLD) += fold.o
|
||||
lib-$(CONFIG_FSYNC) += fsync.o
|
||||
lib-$(CONFIG_HEAD) += head.o
|
||||
lib-$(CONFIG_HOSTID) += hostid.o
|
||||
lib-$(CONFIG_INSTALL) += install.o
|
||||
#lib-$(CONFIG_LENGTH) += length.o
|
||||
lib-$(CONFIG_LN) += ln.o
|
||||
|
||||
@@ -31,6 +31,7 @@ int chroot_main(int argc UNUSED_PARAM, char **argv)
|
||||
if (!*argv)
|
||||
bb_show_usage();
|
||||
xchroot(*argv);
|
||||
xchdir("/");
|
||||
|
||||
++argv;
|
||||
if (!*argv) { /* no 2nd param (PROG), use shell */
|
||||
|
||||
+2
-2
@@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
//usage:#define cp_trivial_usage
|
||||
//usage: "[OPTIONS] SOURCE... DEST"
|
||||
//usage: "[OPTIONS] SOURCE DEST"
|
||||
//usage:#define cp_full_usage "\n\n"
|
||||
//usage: "Copy SOURCE(s) to DEST\n"
|
||||
//usage: "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n"
|
||||
//usage: "\n -a Same as -dpR"
|
||||
//usage: IF_SELINUX(
|
||||
//usage: "\n -c Preserve security context"
|
||||
|
||||
@@ -129,9 +129,6 @@
|
||||
//usage: "\n [YYYY.]MM.DD-hh:mm[:ss]"
|
||||
//usage: "\n YYYY-MM-DD hh:mm[:ss]"
|
||||
//usage: "\n [[[[[YY]YY]MM]DD]hh]mm[.ss]"
|
||||
//usage: IF_FEATURE_DATE_COMPAT(
|
||||
//usage: "\n 'date TIME' form accepts MMDDhhmm[[YY]YY][.ss] instead"
|
||||
//usage: )
|
||||
//usage:
|
||||
//usage:#define date_example_usage
|
||||
//usage: "$ date\n"
|
||||
|
||||
+13
-14
@@ -26,7 +26,11 @@
|
||||
//usage:#define du_trivial_usage
|
||||
//usage: "[-aHLdclsx" IF_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
|
||||
//usage:#define du_full_usage "\n\n"
|
||||
//usage: "Summarize disk space used for each FILE and/or directory\n"
|
||||
//usage: "Summarize disk space used for each FILE and/or directory.\n"
|
||||
//usage: "Disk space is printed in units of "
|
||||
//usage: IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024")
|
||||
//usage: IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512")
|
||||
//usage: " bytes.\n"
|
||||
//usage: "\n -a Show file sizes too"
|
||||
//usage: "\n -L Follow all symlinks"
|
||||
//usage: "\n -H Follow symlinks on command line"
|
||||
@@ -36,13 +40,11 @@
|
||||
//usage: "\n -s Display only a total for each argument"
|
||||
//usage: "\n -x Skip directories on different filesystems"
|
||||
//usage: IF_FEATURE_HUMAN_READABLE(
|
||||
//usage: "\n -h Sizes in human readable format (e.g., 1K 243M 2G)"
|
||||
//usage: "\n -h Sizes in human readable format (e.g., 1K 243M 2G )"
|
||||
//usage: "\n -m Sizes in megabytes"
|
||||
//usage: )
|
||||
//usage: "\n -k Sizes in kilobytes" IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)")
|
||||
//usage: IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(
|
||||
//usage: "\n Default unit is 512 bytes"
|
||||
//usage: )
|
||||
//usage: "\n -k Sizes in kilobytes"
|
||||
//usage: IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)")
|
||||
//usage:
|
||||
//usage:#define du_example_usage
|
||||
//usage: "$ du\n"
|
||||
@@ -86,10 +88,9 @@ struct globals {
|
||||
dev_t dir_dev;
|
||||
} FIX_ALIASING;
|
||||
#define G (*(struct globals*)&bb_common_bufsiz1)
|
||||
#define INIT_G() do { } while (0)
|
||||
|
||||
|
||||
static void print(unsigned long long size, const char *filename)
|
||||
static void print(unsigned long size, const char *filename)
|
||||
{
|
||||
/* TODO - May not want to defer error checking here. */
|
||||
#if ENABLE_FEATURE_HUMAN_READABLE
|
||||
@@ -103,15 +104,15 @@ static void print(unsigned long long size, const char *filename)
|
||||
size++;
|
||||
size >>= 1;
|
||||
}
|
||||
printf("%llu\t%s\n", size, filename);
|
||||
printf("%lu\t%s\n", size, filename);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* tiny recursive du */
|
||||
static unsigned long long du(const char *filename)
|
||||
static unsigned long du(const char *filename)
|
||||
{
|
||||
struct stat statbuf;
|
||||
unsigned long long sum;
|
||||
unsigned long sum;
|
||||
|
||||
if (lstat(filename, &statbuf) != 0) {
|
||||
bb_simple_perror_msg(filename);
|
||||
@@ -188,12 +189,10 @@ static unsigned long long du(const char *filename)
|
||||
int du_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int du_main(int argc UNUSED_PARAM, char **argv)
|
||||
{
|
||||
unsigned long long total;
|
||||
unsigned long total;
|
||||
int slink_depth_save;
|
||||
unsigned opt;
|
||||
|
||||
INIT_G();
|
||||
|
||||
#if ENABLE_FEATURE_HUMAN_READABLE
|
||||
IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 1024;)
|
||||
IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 512;)
|
||||
|
||||
@@ -100,7 +100,6 @@ struct globals {
|
||||
char **args;
|
||||
} FIX_ALIASING;
|
||||
#define G (*(struct globals*)&bb_common_bufsiz1)
|
||||
#define INIT_G() do { } while (0)
|
||||
|
||||
/* forward declarations */
|
||||
static VALUE *eval(void);
|
||||
@@ -520,8 +519,6 @@ int expr_main(int argc UNUSED_PARAM, char **argv)
|
||||
{
|
||||
VALUE *v;
|
||||
|
||||
INIT_G();
|
||||
|
||||
xfunc_error_retval = 2; /* coreutils compat */
|
||||
G.args = argv + 1;
|
||||
if (*G.args == NULL) {
|
||||
|
||||
+1
-12
@@ -9,17 +9,6 @@
|
||||
|
||||
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
|
||||
|
||||
//config:config HOSTID
|
||||
//config: bool "hostid"
|
||||
//config: default y
|
||||
//config: help
|
||||
//config: hostid prints the numeric identifier (in hexadecimal) for
|
||||
//config: the current host.
|
||||
|
||||
//applet:IF_HOSTID(APPLET_NOFORK(hostid, hostid, BB_DIR_USR_BIN, BB_SUID_DROP, hostid))
|
||||
|
||||
//kbuild:lib-$(CONFIG_HOSTID) += hostid.o
|
||||
|
||||
//usage:#define hostid_trivial_usage
|
||||
//usage: ""
|
||||
//usage:#define hostid_full_usage "\n\n"
|
||||
@@ -36,7 +25,7 @@ int hostid_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||
bb_show_usage();
|
||||
}
|
||||
|
||||
printf("%08lx\n", gethostid());
|
||||
printf("%lx\n", gethostid());
|
||||
|
||||
return fflush_all();
|
||||
}
|
||||
+2
-2
@@ -69,8 +69,8 @@ int ln_main(int argc, char **argv)
|
||||
src = last;
|
||||
|
||||
if (is_directory(src,
|
||||
(opts & LN_NODEREFERENCE) ^ LN_NODEREFERENCE
|
||||
)
|
||||
(opts & LN_NODEREFERENCE) ^ LN_NODEREFERENCE,
|
||||
NULL)
|
||||
) {
|
||||
src_name = xstrdup(*argv);
|
||||
src = concat_path_file(src, bb_get_last_path_component_strip(src_name));
|
||||
|
||||
+3
-4
@@ -54,7 +54,7 @@ static const char mkdir_longopts[] ALIGN1 =
|
||||
int mkdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int mkdir_main(int argc UNUSED_PARAM, char **argv)
|
||||
{
|
||||
long mode = -1;
|
||||
mode_t mode = (mode_t)(-1);
|
||||
int status = EXIT_SUCCESS;
|
||||
int flags = 0;
|
||||
unsigned opt;
|
||||
@@ -68,11 +68,10 @@ int mkdir_main(int argc UNUSED_PARAM, char **argv)
|
||||
#endif
|
||||
opt = getopt32(argv, "m:p" IF_SELINUX("Z:"), &smode IF_SELINUX(,&scontext));
|
||||
if (opt & 1) {
|
||||
mode_t mmode = 0777;
|
||||
if (!bb_parse_mode(smode, &mmode)) {
|
||||
mode = 0777;
|
||||
if (!bb_parse_mode(smode, &mode)) {
|
||||
bb_error_msg_and_die("invalid mode '%s'", smode);
|
||||
}
|
||||
mode = mmode;
|
||||
}
|
||||
if (opt & 2)
|
||||
flags |= FILEUTILS_RECUR;
|
||||
|
||||
+6
-20
@@ -36,12 +36,13 @@
|
||||
David MacKenzie <djm@gnu.ai.mit.edu>
|
||||
*/
|
||||
|
||||
/* 19990508 Busy Boxed! Dave Cinege */
|
||||
// 19990508 Busy Boxed! Dave Cinege
|
||||
|
||||
//usage:#define printf_trivial_usage
|
||||
//usage: "FORMAT [ARG]..."
|
||||
//usage: "FORMAT [ARGUMENT]..."
|
||||
//usage:#define printf_full_usage "\n\n"
|
||||
//usage: "Format and print ARG(s) according to FORMAT (a-la C printf)"
|
||||
//usage: "Format and print ARGUMENT(s) according to FORMAT,\n"
|
||||
//usage: "where FORMAT controls the output exactly as in C printf"
|
||||
//usage:
|
||||
//usage:#define printf_example_usage
|
||||
//usage: "$ printf \"Val=%d\\n\" 5\n"
|
||||
@@ -131,28 +132,13 @@ static double my_xstrtod(const char *arg)
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Handles %b */
|
||||
static void print_esc_string(const char *str)
|
||||
{
|
||||
char c;
|
||||
while ((c = *str) != '\0') {
|
||||
str++;
|
||||
if (c == '\\') {
|
||||
/* %b also accepts 4-digit octals of the form \0### */
|
||||
if (*str == '0') {
|
||||
if ((unsigned char)(str[1] - '0') < 8) {
|
||||
/* 2nd char is 0..7: skip leading '0' */
|
||||
str++;
|
||||
}
|
||||
}
|
||||
{
|
||||
/* optimization: don't force arg to be on-stack,
|
||||
* use another variable for that. */
|
||||
const char *z = str;
|
||||
c = bb_process_escape_sequence(&z);
|
||||
str = z;
|
||||
}
|
||||
}
|
||||
if (c == '\\')
|
||||
c = bb_process_escape_sequence(&str);
|
||||
putchar(c);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-51
@@ -20,63 +20,13 @@
|
||||
|
||||
/* This is a NOFORK applet. Be very careful! */
|
||||
|
||||
static int logical_getcwd(void)
|
||||
{
|
||||
struct stat st1;
|
||||
struct stat st2;
|
||||
char *wd;
|
||||
char *p;
|
||||
|
||||
wd = getenv("PWD");
|
||||
if (!wd || wd[0] != '/')
|
||||
return 0;
|
||||
|
||||
p = wd;
|
||||
while (*p) {
|
||||
/* doing strstr(p, "/.") by hand is smaller and faster... */
|
||||
if (*p++ != '/')
|
||||
continue;
|
||||
if (*p != '.')
|
||||
continue;
|
||||
/* we found "/.", skip to next char */
|
||||
p++;
|
||||
if (*p == '.')
|
||||
p++; /* we found "/.." */
|
||||
if (*p == '\0' || *p == '/')
|
||||
return 0; /* "/./" or "/../" component: bad */
|
||||
}
|
||||
|
||||
if (stat(wd, &st1) != 0)
|
||||
return 0;
|
||||
if (stat(".", &st2) != 0)
|
||||
return 0;
|
||||
if (st1.st_ino != st2.st_ino)
|
||||
return 0;
|
||||
if (st1.st_dev != st2.st_dev)
|
||||
return 0;
|
||||
|
||||
puts(wd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int pwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int pwd_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||
{
|
||||
char *buf;
|
||||
|
||||
if (ENABLE_DESKTOP) {
|
||||
/* TODO: assume -L if $POSIXLY_CORRECT? (coreutils does that)
|
||||
* Rationale:
|
||||
* POSIX requires a default of -L, but most scripts expect -P
|
||||
*/
|
||||
unsigned opt = getopt32(argv, "LP");
|
||||
if ((opt & 1) && logical_getcwd())
|
||||
return fflush_all();
|
||||
}
|
||||
|
||||
buf = xrealloc_getcwd_or_warn(NULL);
|
||||
|
||||
if (buf) {
|
||||
if (buf != NULL) {
|
||||
puts(buf);
|
||||
free(buf);
|
||||
return fflush_all();
|
||||
|
||||
+5
-7
@@ -1404,15 +1404,13 @@ int stty_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
/* Specifying both -a and -g is an error */
|
||||
if ((stty_state & (STTY_verbose_output | STTY_recoverable_output)) ==
|
||||
(STTY_verbose_output | STTY_recoverable_output)
|
||||
) {
|
||||
bb_error_msg_and_die("-a and -g are mutually exclusive");
|
||||
}
|
||||
(STTY_verbose_output | STTY_recoverable_output))
|
||||
bb_error_msg_and_die("verbose and stty-readable output styles are mutually exclusive");
|
||||
/* Specifying -a or -g with non-options is an error */
|
||||
if ((stty_state & (STTY_verbose_output | STTY_recoverable_output))
|
||||
&& !(stty_state & STTY_noargs)
|
||||
if (!(stty_state & STTY_noargs)
|
||||
&& (stty_state & (STTY_verbose_output | STTY_recoverable_output))
|
||||
) {
|
||||
bb_error_msg_and_die("modes may not be set when -a or -g is used");
|
||||
bb_error_msg_and_die("modes may not be set when specifying an output style");
|
||||
}
|
||||
|
||||
/* Now it is safe to start doing things */
|
||||
|
||||
@@ -62,7 +62,6 @@ struct globals {
|
||||
bool exitcode;
|
||||
} FIX_ALIASING;
|
||||
#define G (*(struct globals*)&bb_common_bufsiz1)
|
||||
#define INIT_G() do { } while (0)
|
||||
|
||||
static void tail_xprint_header(const char *fmt, const char *filename)
|
||||
{
|
||||
@@ -121,8 +120,6 @@ int tail_main(int argc, char **argv)
|
||||
int *fds;
|
||||
const char *fmt;
|
||||
|
||||
INIT_G();
|
||||
|
||||
#if ENABLE_INCLUDE_SUSv2 || ENABLE_FEATURE_FANCY_TAIL
|
||||
/* Allow legacy syntax of an initial numeric option without -n. */
|
||||
if (argv[1] && (argv[1][0] == '+' || argv[1][0] == '-')
|
||||
|
||||
+7
-8
@@ -710,8 +710,7 @@ static number_t nexpr(enum token n)
|
||||
if (n == EOI) {
|
||||
/* special case: [ ! ], [ a -a ! ] are valid */
|
||||
/* IOW, "! ARG" may miss ARG */
|
||||
args--;
|
||||
unnest_msg("<nexpr:1 (!EOI), args:%s(%p)\n", args[0], &args[0]);
|
||||
unnest_msg("<nexpr:1 (!EOI)\n");
|
||||
return 1;
|
||||
}
|
||||
res = !nexpr(n);
|
||||
@@ -730,15 +729,15 @@ static number_t aexpr(enum token n)
|
||||
|
||||
nest_msg(">aexpr(%s)\n", TOKSTR[n]);
|
||||
res = nexpr(n);
|
||||
dbg_msg("aexpr: nexpr:%lld, next args:%s(%p)\n", res, args[1], &args[1]);
|
||||
dbg_msg("aexpr: nexpr:%lld, next args:%s\n", res, args[1]);
|
||||
if (check_operator(*++args) == BAND) {
|
||||
dbg_msg("aexpr: arg is AND, next args:%s(%p)\n", args[1], &args[1]);
|
||||
dbg_msg("aexpr: arg is AND, next args:%s\n", args[1]);
|
||||
res = aexpr(check_operator(*++args)) && res;
|
||||
unnest_msg("<aexpr:%lld\n", res);
|
||||
return res;
|
||||
}
|
||||
args--;
|
||||
unnest_msg("<aexpr:%lld, args:%s(%p)\n", res, args[0], &args[0]);
|
||||
unnest_msg("<aexpr:%lld, args:%s\n", res, args[0]);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -749,15 +748,15 @@ static number_t oexpr(enum token n)
|
||||
|
||||
nest_msg(">oexpr(%s)\n", TOKSTR[n]);
|
||||
res = aexpr(n);
|
||||
dbg_msg("oexpr: aexpr:%lld, next args:%s(%p)\n", res, args[1], &args[1]);
|
||||
dbg_msg("oexpr: aexpr:%lld, next args:%s\n", res, args[1]);
|
||||
if (check_operator(*++args) == BOR) {
|
||||
dbg_msg("oexpr: next arg is OR, next args:%s(%p)\n", args[1], &args[1]);
|
||||
dbg_msg("oexpr: next arg is OR, next args:%s\n", args[1]);
|
||||
res = oexpr(check_operator(*++args)) || res;
|
||||
unnest_msg("<oexpr:%lld\n", res);
|
||||
return res;
|
||||
}
|
||||
args--;
|
||||
unnest_msg("<oexpr:%lld, args:%s(%p)\n", res, args[0], &args[0]);
|
||||
unnest_msg("<oexpr:%lld, args:%s\n", res, args[0]);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
+9
-17
@@ -7,7 +7,7 @@
|
||||
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
||||
*/
|
||||
|
||||
/* BB_AUDIT SUSv3 _NOT_ compliant -- options -a, -m not supported. */
|
||||
/* BB_AUDIT SUSv3 _NOT_ compliant -- options -a, -m, -r, -t not supported. */
|
||||
/* http://www.opengroup.org/onlinepubs/007904975/utilities/touch.html */
|
||||
|
||||
/* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org)
|
||||
@@ -25,26 +25,18 @@
|
||||
//config: help
|
||||
//config: touch is used to create or change the access and/or
|
||||
//config: modification timestamp of specified files.
|
||||
//config:
|
||||
//config:config FEATURE_TOUCH_SUSV3
|
||||
//config: bool "Add support for SUSV3 features (-d -t -r)"
|
||||
//config: default y
|
||||
//config: depends on TOUCH
|
||||
//config: help
|
||||
//config: Enable touch to use a reference file or a given date/time argument.
|
||||
|
||||
//applet:IF_TOUCH(APPLET_NOFORK(touch, touch, BB_DIR_BIN, BB_SUID_DROP, touch))
|
||||
|
||||
//kbuild:lib-$(CONFIG_TOUCH) += touch.o
|
||||
|
||||
//usage:#define touch_trivial_usage
|
||||
//usage: "[-c]" IF_FEATURE_TOUCH_SUSV3(" [-d DATE] [-t DATE] [-r FILE]") " FILE..."
|
||||
//usage: "[-c]" IF_DESKTOP(" [-d DATE] [-r FILE]") " FILE [FILE]..."
|
||||
//usage:#define touch_full_usage "\n\n"
|
||||
//usage: "Update the last-modified date on the given FILE[s]\n"
|
||||
//usage: "\n -c Don't create files"
|
||||
//usage: IF_FEATURE_TOUCH_SUSV3(
|
||||
//usage: IF_DESKTOP(
|
||||
//usage: "\n -d DT Date/time to use"
|
||||
//usage: "\n -t DT Date/time to use"
|
||||
//usage: "\n -r FILE Use FILE's date/time"
|
||||
//usage: )
|
||||
//usage:
|
||||
@@ -79,7 +71,7 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
|
||||
int fd;
|
||||
int status = EXIT_SUCCESS;
|
||||
int opts;
|
||||
#if ENABLE_FEATURE_TOUCH_SUSV3
|
||||
#if ENABLE_DESKTOP
|
||||
# if ENABLE_LONG_OPTS
|
||||
static const char touch_longopts[] ALIGN1 =
|
||||
/* name, has_arg, val */
|
||||
@@ -98,17 +90,17 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
|
||||
# define timebuf ((struct timeval*)NULL)
|
||||
#endif
|
||||
|
||||
#if ENABLE_FEATURE_TOUCH_SUSV3 && ENABLE_LONG_OPTS
|
||||
#if ENABLE_DESKTOP && ENABLE_LONG_OPTS
|
||||
applet_long_options = touch_longopts;
|
||||
#endif
|
||||
/* -d and -t both set time. In coreutils,
|
||||
* accepted data format differs a bit between -d and -t.
|
||||
* We accept the same formats for both */
|
||||
opts = getopt32(argv, "c" IF_FEATURE_TOUCH_SUSV3("r:d:t:")
|
||||
opts = getopt32(argv, "c" IF_DESKTOP("r:d:t:")
|
||||
/*ignored:*/ "fma"
|
||||
IF_FEATURE_TOUCH_SUSV3(, &reference_file)
|
||||
IF_FEATURE_TOUCH_SUSV3(, &date_str)
|
||||
IF_FEATURE_TOUCH_SUSV3(, &date_str)
|
||||
IF_DESKTOP(, &reference_file)
|
||||
IF_DESKTOP(, &date_str)
|
||||
IF_DESKTOP(, &date_str)
|
||||
);
|
||||
|
||||
opts &= 1; /* only -c bit is left */
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
//usage: "[-o OUTFILE] [INFILE]"
|
||||
//usage:#define uudecode_full_usage "\n\n"
|
||||
//usage: "Uudecode a file\n"
|
||||
//usage: "Finds OUTFILE in uuencoded source unless -o is given"
|
||||
//usage: "Finds outfile name in uuencoded source unless -o is given"
|
||||
//usage:
|
||||
//usage:#define uudecode_example_usage
|
||||
//usage: "$ uudecode -o busybox busybox.uu\n"
|
||||
@@ -125,11 +125,10 @@ int uudecode_main(int argc UNUSED_PARAM, char **argv)
|
||||
mode = bb_strtou(line_ptr, NULL, 8);
|
||||
if (outname == NULL) {
|
||||
outname = strchr(line_ptr, ' ');
|
||||
if (!outname)
|
||||
if ((outname == NULL) || (*outname == '\0')) {
|
||||
break;
|
||||
}
|
||||
outname++;
|
||||
if (!outname[0])
|
||||
break;
|
||||
}
|
||||
dst_stream = stdout;
|
||||
if (NOT_LONE_DASH(outname)) {
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
*/
|
||||
|
||||
//usage:#define uuencode_trivial_usage
|
||||
//usage: "[-m] [FILE] STORED_FILENAME"
|
||||
//usage: "[-m] [INFILE] STORED_FILENAME"
|
||||
//usage:#define uuencode_full_usage "\n\n"
|
||||
//usage: "Uuencode FILE (or stdin) to stdout\n"
|
||||
//usage: "Uuencode a file to stdout\n"
|
||||
//usage: "\n -m Use base64 encoding per RFC1521"
|
||||
//usage:
|
||||
//usage:#define uuencode_example_usage
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
//usage:#define who_full_usage "\n\n"
|
||||
//usage: "Show who is logged on\n"
|
||||
//usage: "\n -a Show all"
|
||||
//usage: "\n -H Print column headers"
|
||||
|
||||
#include "libbb.h"
|
||||
|
||||
|
||||
+3
-20
@@ -41,7 +41,6 @@
|
||||
////usage: "\n -q Fail silently on errors" - we ignore this opt
|
||||
//usage: "\n -t Prepend base directory name to TEMPLATE"
|
||||
//usage: "\n -p DIR Use DIR as a base directory (implies -t)"
|
||||
//usage: "\n -u Do not create anything; print a name"
|
||||
//usage: "\n"
|
||||
//usage: "\nBase directory is: -p DIR, else $TMPDIR, else /tmp"
|
||||
//usage:
|
||||
@@ -64,7 +63,6 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv)
|
||||
OPT_q = 1 << 1,
|
||||
OPT_t = 1 << 2,
|
||||
OPT_p = 1 << 3,
|
||||
OPT_u = 1 << 4,
|
||||
};
|
||||
|
||||
path = getenv("TMPDIR");
|
||||
@@ -73,7 +71,7 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
/* -q is ignored */
|
||||
opt_complementary = "?1"; /* 1 argument max */
|
||||
opts = getopt32(argv, "dqtp:u", &path);
|
||||
opts = getopt32(argv, "dqtp:", &path);
|
||||
|
||||
chp = argv[optind];
|
||||
if (!chp) {
|
||||
@@ -83,22 +81,6 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv)
|
||||
chp = xstrdup("tmp.XXXXXX");
|
||||
opts |= OPT_t;
|
||||
}
|
||||
|
||||
if (opts & OPT_u) {
|
||||
/* Remove (up to) 6 X's */
|
||||
unsigned len = strlen(chp);
|
||||
int cnt = len > 6 ? 6 : len;
|
||||
while (--cnt >= 0 && chp[--len] == 'X')
|
||||
chp[len] = '\0';
|
||||
|
||||
chp = tempnam(opts & (OPT_t|OPT_p) ? path : "./", chp);
|
||||
if (!chp)
|
||||
return EXIT_FAILURE;
|
||||
if (!(opts & (OPT_t|OPT_p)))
|
||||
chp += 2;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
if (opts & (OPT_t|OPT_p))
|
||||
chp = concat_path_file(path, chp);
|
||||
|
||||
@@ -109,7 +91,8 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv)
|
||||
if (mkstemp(chp) < 0)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
ret:
|
||||
|
||||
puts(chp);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
@@ -66,7 +66,6 @@ struct globals {
|
||||
#define names (G.names)
|
||||
#define cur (G.cur )
|
||||
#define cmd (G.cmd )
|
||||
#define INIT_G() do { } while (0)
|
||||
|
||||
enum { NUM_CMD = (COMMON_BUFSIZE - sizeof(G)) / sizeof(cmd[0]) - 1 };
|
||||
|
||||
@@ -144,8 +143,6 @@ int run_parts_main(int argc UNUSED_PARAM, char **argv)
|
||||
unsigned n;
|
||||
int ret;
|
||||
|
||||
INIT_G();
|
||||
|
||||
#if ENABLE_FEATURE_RUN_PARTS_LONG_OPTIONS
|
||||
applet_long_options = runparts_longopts;
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,7 @@ Options controlling process matching
|
||||
[TODO: can PROCESS_NAME be a full pathname? Should we require full match then
|
||||
with /proc/$PID/exe or argv[0] (comm can't be matched, it never contains path)]
|
||||
-x,--exec EXECUTABLE Look for processes that were started with this
|
||||
command in /proc/$PID/exe and /proc/$PID/cmdline
|
||||
(/proc/$PID/cmdline is a bbox extension)
|
||||
command in /proc/$PID/cmdline.
|
||||
Unlike -n, we match against the full path:
|
||||
"ntpd" != "./ntpd" != "/path/to/ntpd"
|
||||
-p,--pidfile PID_FILE Look for processes with PID from this file
|
||||
@@ -69,7 +68,7 @@ Misc options:
|
||||
//usage: "\n -n,--name NAME Match processes with NAME"
|
||||
//usage: "\n in comm field in /proc/PID/stat"
|
||||
//usage: "\n -x,--exec EXECUTABLE Match processes with this command"
|
||||
//usage: "\n in /proc/PID/{exe,cmdline}"
|
||||
//usage: "\n in /proc/PID/cmdline"
|
||||
//usage: "\n -p,--pidfile FILE Match a process with PID from the file"
|
||||
//usage: "\n All specified conditions must match"
|
||||
//usage: "\n-S only:"
|
||||
@@ -199,18 +198,8 @@ static int pid_is_exec(pid_t pid)
|
||||
{
|
||||
ssize_t bytes;
|
||||
char buf[sizeof("/proc/%u/cmdline") + sizeof(int)*3];
|
||||
char *procname, *exelink;
|
||||
int match;
|
||||
|
||||
procname = buf + sprintf(buf, "/proc/%u/exe", (unsigned)pid) - 3;
|
||||
|
||||
exelink = xmalloc_readlink(buf);
|
||||
match = (exelink && strcmp(execname, exelink) == 0);
|
||||
free(exelink);
|
||||
if (match)
|
||||
return match;
|
||||
|
||||
strcpy(procname, "cmdline");
|
||||
sprintf(buf, "/proc/%u/cmdline", (unsigned)pid);
|
||||
bytes = open_read_close(buf, G.execname_cmpbuf, G.execname_sizeof);
|
||||
if (bytes > 0) {
|
||||
G.execname_cmpbuf[bytes] = '\0';
|
||||
@@ -485,7 +474,7 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
|
||||
*--argv = startas;
|
||||
if (opt & OPT_BACKGROUND) {
|
||||
#if BB_MMU
|
||||
bb_daemonize(DAEMON_DEVNULL_STDIO + DAEMON_CLOSE_EXTRA_FDS + DAEMON_DOUBLE_FORK);
|
||||
bb_daemonize(DAEMON_DEVNULL_STDIO + DAEMON_CLOSE_EXTRA_FDS);
|
||||
/* DAEMON_DEVNULL_STDIO is superfluous -
|
||||
* it's always done by bb_daemonize() */
|
||||
#else
|
||||
@@ -513,16 +502,8 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
|
||||
if (opt & OPT_c) {
|
||||
struct bb_uidgid_t ugid = { -1, -1 };
|
||||
parse_chown_usergroup_or_die(&ugid, chuid);
|
||||
if (ugid.uid != (uid_t) -1) {
|
||||
struct passwd *pw = xgetpwuid(ugid.uid);
|
||||
if (ugid.gid != (gid_t) -1)
|
||||
pw->pw_gid = ugid.gid;
|
||||
/* initgroups, setgid, setuid: */
|
||||
change_identity(pw);
|
||||
} else if (ugid.gid != (gid_t) -1) {
|
||||
xsetgid(ugid.gid);
|
||||
setgroups(1, &ugid.gid);
|
||||
}
|
||||
if (ugid.gid != (gid_t) -1) xsetgid(ugid.gid);
|
||||
if (ugid.uid != (uid_t) -1) xsetuid(ugid.uid);
|
||||
}
|
||||
#if ENABLE_FEATURE_START_STOP_DAEMON_FANCY
|
||||
if (opt & OPT_NICELEVEL) {
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
<p>Before looking at the Linux implementation, first a general Unix
|
||||
description of threads, processes, process groups and sessions.
|
||||
</p><p>
|
||||
(See also <a href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap11.html">General Terminal Interface</a>)
|
||||
</p><p>A session contains a number of process groups, and a process group
|
||||
contains a number of processes, and a process contains a number
|
||||
of threads.
|
||||
@@ -279,7 +277,6 @@ and inspect it by
|
||||
Again, if TOSTOP is set but the background process ignores or blocks
|
||||
the SIGTTOU signal, or if its process group is orphaned (see below),
|
||||
then the write() returns an EIO error, and no signal is sent.
|
||||
[vda: correction. SUS says that if SIGTTOU is blocked/ignored, write succeeds. ]
|
||||
<p>
|
||||
</p><h3>Orphaned process groups</h3>
|
||||
|
||||
|
||||
+3
-9
@@ -51,25 +51,19 @@ device nodes if your system needs something more than the default root/root
|
||||
660 permissions.
|
||||
|
||||
The file has the format:
|
||||
[-]<device regex> <uid>:<gid> <permissions>
|
||||
or
|
||||
@<maj[,min1[-min2]]> <uid>:<gid> <permissions>
|
||||
or
|
||||
$envvar=<regex> <uid>:<gid> <permissions>
|
||||
<device regex> <uid>:<gid> <permissions>
|
||||
or @<maj[,min1[-min2]]> <uid>:<gid> <permissions>
|
||||
|
||||
For example:
|
||||
hd[a-z][0-9]* 0:3 660
|
||||
hd[a-z][0-9]* 0:3 660
|
||||
|
||||
The config file parsing stops at the first matching line. If no line is
|
||||
matched, then the default of 0:0 660 is used. To set your own default, simply
|
||||
create your own total match like so:
|
||||
|
||||
.* 1:1 777
|
||||
|
||||
You can rename/move device nodes by using the next optional field.
|
||||
|
||||
<device regex> <uid>:<gid> <permissions> [=path]
|
||||
|
||||
So if you want to place the device node into a subdirectory, make sure the path
|
||||
has a trailing /. If you want to rename the device node, just place the name.
|
||||
hda 0:3 660 =drives/
|
||||
|
||||
@@ -422,27 +422,9 @@ struct ext2_super_block {
|
||||
uint16_t s_reserved_word_pad;
|
||||
uint32_t s_default_mount_opts;
|
||||
uint32_t s_first_meta_bg; /* First metablock group */
|
||||
/* ext3 additions */
|
||||
uint32_t s_mkfs_time; /* When the filesystem was created */
|
||||
uint32_t s_jnl_blocks[17]; /* Backup of the journal inode */
|
||||
/* 64bit support valid if EXT4_FEATURE_COMPAT_64BIT */
|
||||
/*150*/ uint32_t s_blocks_count_hi; /* Blocks count */
|
||||
uint32_t s_r_blocks_count_hi; /* Reserved blocks count */
|
||||
uint32_t s_free_blocks_count_hi; /* Free blocks count */
|
||||
uint16_t s_min_extra_isize; /* All inodes have at least # bytes */
|
||||
uint16_t s_want_extra_isize; /* New inodes should reserve # bytes */
|
||||
uint32_t s_flags; /* Miscellaneous flags */
|
||||
uint16_t s_raid_stride; /* RAID stride */
|
||||
uint16_t s_mmp_interval; /* # seconds to wait in MMP checking */
|
||||
uint64_t s_mmp_block; /* Block for multi-mount protection */
|
||||
uint32_t s_raid_stripe_width; /* blocks on all data disks (N*stride)*/
|
||||
uint8_t s_log_groups_per_flex; /* FLEX_BG group size */
|
||||
uint8_t s_reserved_char_pad2;
|
||||
uint16_t s_reserved_pad;
|
||||
uint32_t s_reserved[162]; /* Padding to the end of the block */
|
||||
};
|
||||
struct BUG_ext2_super_block {
|
||||
char bug[sizeof(struct ext2_super_block) == 1024 ? 1 : -1];
|
||||
uint32_t s_reserved[172]; /* Padding to the end of the block */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -485,7 +467,7 @@ struct BUG_ext2_super_block {
|
||||
#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
|
||||
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
|
||||
#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
|
||||
#define EXT2_FEATURE_COMPAT_RESIZE_INO 0x0010
|
||||
#define EXT2_FEATURE_COMPAT_RESIZE_INODE 0x0010
|
||||
#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
|
||||
|
||||
#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/* Constants and structures */
|
||||
#include "bb_e2fs_defs.h"
|
||||
#include "e2fs_defs.h"
|
||||
|
||||
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
|
||||
|
||||
|
||||
@@ -575,12 +575,8 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev)
|
||||
printf("need to revalidate %s (time since last check %lu)\n",
|
||||
dev->bid_name, diff));
|
||||
|
||||
fd = open(dev->bid_name, O_RDONLY);
|
||||
if (fd < 0
|
||||
|| fstat(fd, &st) < 0
|
||||
) {
|
||||
if (fd >= 0)
|
||||
close(fd);
|
||||
if (((fd = open(dev->bid_name, O_RDONLY)) < 0) ||
|
||||
(fstat(fd, &st) < 0)) {
|
||||
if (errno == ENXIO || errno == ENODEV || errno == ENOENT) {
|
||||
blkid_free_dev(dev);
|
||||
return NULL;
|
||||
@@ -657,7 +653,6 @@ try_again:
|
||||
|
||||
if (!dev->bid_type) {
|
||||
blkid_free_dev(dev);
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -11577,7 +11577,7 @@ static void check_resize_inode(e2fsck_t ctx)
|
||||
* s_reserved_gdt_blocks must be zero.
|
||||
*/
|
||||
if (!(fs->super->s_feature_compat &
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INO)) {
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INODE)) {
|
||||
if (fs->super->s_reserved_gdt_blocks) {
|
||||
pctx.num = fs->super->s_reserved_gdt_blocks;
|
||||
if (fix_problem(ctx, PR_0_NONZERO_RESERVED_GDT_BLOCKS,
|
||||
@@ -11593,7 +11593,7 @@ static void check_resize_inode(e2fsck_t ctx)
|
||||
retval = ext2fs_read_inode(fs, EXT2_RESIZE_INO, &inode);
|
||||
if (retval) {
|
||||
if (fs->super->s_feature_compat &
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INO)
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INODE)
|
||||
ctx->flags |= E2F_FLAG_RESIZE_INODE;
|
||||
return;
|
||||
}
|
||||
@@ -11603,7 +11603,7 @@ static void check_resize_inode(e2fsck_t ctx)
|
||||
* the resize inode is cleared; then we're done.
|
||||
*/
|
||||
if (!(fs->super->s_feature_compat &
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INO)) {
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INODE)) {
|
||||
for (i=0; i < EXT2_N_BLOCKS; i++) {
|
||||
if (inode.i_block[i])
|
||||
break;
|
||||
|
||||
@@ -34,7 +34,7 @@ static const struct feature feature_list[] = {
|
||||
"ext_attr" },
|
||||
{ E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_DIR_INDEX,
|
||||
"dir_index" },
|
||||
{ E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_RESIZE_INO,
|
||||
{ E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_RESIZE_INODE,
|
||||
"resize_inode" },
|
||||
{ E2P_FEATURE_RO_INCOMPAT, EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER,
|
||||
"sparse_super" },
|
||||
|
||||
@@ -475,7 +475,7 @@ struct ext2_super_block {
|
||||
#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
|
||||
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
|
||||
#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
|
||||
#define EXT2_FEATURE_COMPAT_RESIZE_INO 0x0010
|
||||
#define EXT2_FEATURE_COMPAT_RESIZE_INODE 0x0010
|
||||
#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
|
||||
|
||||
#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
|
||||
|
||||
@@ -383,7 +383,7 @@ typedef struct ext2_icount *ext2_icount_t;
|
||||
#define EXT2_LIB_FEATURE_COMPAT_SUPP (EXT2_FEATURE_COMPAT_DIR_PREALLOC|\
|
||||
EXT2_FEATURE_COMPAT_IMAGIC_INODES|\
|
||||
EXT3_FEATURE_COMPAT_HAS_JOURNAL|\
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INO|\
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INODE|\
|
||||
EXT2_FEATURE_COMPAT_DIR_INDEX|\
|
||||
EXT2_FEATURE_COMPAT_EXT_ATTR)
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ retry:
|
||||
/*
|
||||
* check the number of reserved group descriptor table blocks
|
||||
*/
|
||||
if (super->s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INO)
|
||||
if (super->s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE)
|
||||
rsv_gdt = calc_reserved_gdt_blocks(fs);
|
||||
else
|
||||
rsv_gdt = 0;
|
||||
|
||||
@@ -757,7 +757,7 @@ static void parse_extended_opts(struct ext2_super_block *sb_param,
|
||||
|
||||
if (rsv_gdb > 0) {
|
||||
sb_param->s_feature_compat |=
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INO;
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INODE;
|
||||
|
||||
sb_param->s_reserved_gdt_blocks = rsv_gdb;
|
||||
}
|
||||
@@ -778,7 +778,7 @@ static void parse_extended_opts(struct ext2_super_block *sb_param,
|
||||
|
||||
static __u32 ok_features[3] = {
|
||||
EXT3_FEATURE_COMPAT_HAS_JOURNAL |
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INO |
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INODE |
|
||||
EXT2_FEATURE_COMPAT_DIR_INDEX, /* Compat */
|
||||
EXT2_FEATURE_INCOMPAT_FILETYPE| /* Incompat */
|
||||
EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|
|
||||
@@ -1123,7 +1123,7 @@ static int PRS(int argc, char **argv)
|
||||
/* Since sparse_super is the default, we would only have a problem
|
||||
* here if it was explicitly disabled.
|
||||
*/
|
||||
if ((param.s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INO) &&
|
||||
if ((param.s_feature_compat & EXT2_FEATURE_COMPAT_RESIZE_INODE) &&
|
||||
!(param.s_feature_ro_compat&EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) {
|
||||
bb_error_msg_and_die("reserved online resize blocks not supported "
|
||||
"on non-sparse filesystem");
|
||||
@@ -1312,7 +1312,7 @@ int mke2fs_main (int argc, char **argv)
|
||||
reserve_inodes(fs);
|
||||
create_bad_block_inode(fs, bb_list);
|
||||
if (fs->super->s_feature_compat &
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INO) {
|
||||
EXT2_FEATURE_COMPAT_RESIZE_INODE) {
|
||||
retval = ext2fs_create_resize_inode(fs);
|
||||
mke2fs_error_msg_and_die(retval, "reserve blocks for online resize");
|
||||
}
|
||||
|
||||
+5
-12
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
#include "libbb.h"
|
||||
#include <linux/fs.h>
|
||||
#include "bb_e2fs_defs.h"
|
||||
#include <linux/ext2_fs.h>
|
||||
|
||||
// storage helpers
|
||||
char BUG_wrong_field_size(void);
|
||||
@@ -28,13 +28,12 @@ do { \
|
||||
(sizeof(field) == 4 ? SWAP_LE32(field) : BUG_wrong_field_size())
|
||||
|
||||
//usage:#define tune2fs_trivial_usage
|
||||
//usage: "[-c MAX_MOUNT_COUNT] "
|
||||
//usage: "[-c MOUNT_CNT] "
|
||||
////usage: "[-e errors-behavior] [-g group] "
|
||||
//usage: "[-i DAYS] "
|
||||
////usage: "[-j] [-J journal-options] [-l] [-s sparse-flag] "
|
||||
////usage: "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] "
|
||||
////usage: "[-r reserved-blocks-count] [-u user] "
|
||||
//usage: "[-C MOUNT_COUNT] "
|
||||
////usage: "[-r reserved-blocks-count] [-u user] [-C mount-count] "
|
||||
//usage: "[-L LABEL] "
|
||||
////usage: "[-M last-mounted-dir] [-O [^]feature[,...]] "
|
||||
////usage: "[-T last-check-time] [-U UUID] "
|
||||
@@ -47,19 +46,18 @@ enum {
|
||||
OPT_L = 1 << 0, // label
|
||||
OPT_c = 1 << 1, // max mount count
|
||||
OPT_i = 1 << 2, // check interval
|
||||
OPT_C = 1 << 3, // current mount count
|
||||
};
|
||||
|
||||
int tune2fs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int tune2fs_main(int argc UNUSED_PARAM, char **argv)
|
||||
{
|
||||
unsigned opts;
|
||||
const char *label, *str_c, *str_i, *str_C;
|
||||
const char *label, *str_c, *str_i;
|
||||
struct ext2_super_block *sb;
|
||||
int fd;
|
||||
|
||||
opt_complementary = "=1";
|
||||
opts = getopt32(argv, "L:c:i:C:", &label, &str_c, &str_i, &str_C);
|
||||
opts = getopt32(argv, "L:c:i:", &label, &str_c, &str_i);
|
||||
if (!opts)
|
||||
bb_show_usage();
|
||||
argv += optind; // argv[0] -- device
|
||||
@@ -73,11 +71,6 @@ int tune2fs_main(int argc UNUSED_PARAM, char **argv)
|
||||
// mangle superblock
|
||||
//STORE_LE(sb->s_wtime, time(NULL)); - why bother?
|
||||
|
||||
if (opts & OPT_C) {
|
||||
int n = xatoi_range(str_C, 1, 0xfffe);
|
||||
STORE_LE(sb->s_mnt_count, (unsigned)n);
|
||||
}
|
||||
|
||||
// set the label
|
||||
if (opts & OPT_L)
|
||||
safe_strncpy((char *)sb->s_volume_name, label, sizeof(sb->s_volume_name));
|
||||
|
||||
Loaded 100 of 242 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user