Compare commits

..
2 Commits
Author SHA1 Message Date
Denys Vlasenko 12d97b6680 apply post-1.18.1 patches, bump version to 1.18.2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-16 20:00:24 +01:00
Denys Vlasenko 2a1571bfa0 apply post-1.18.0 patches, bump version to 1.18.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-21 05:31:47 +01:00
527 changed files with 11423 additions and 19109 deletions

No files matched your search

-1
View File
@@ -18,7 +18,6 @@ Config.in
# Normal output
#
/busybox
/busybox_old
/busybox_unstripped*
#
+27 -44
View File
@@ -126,6 +126,7 @@ config FEATURE_INSTALLER
config INSTALL_NO_USR
bool "Don't use /usr"
default n
depends on FEATURE_INSTALLER
help
Disable use of /usr. busybox --install and "make install"
will install applets only to /bin and /sbin,
@@ -248,9 +249,8 @@ config UNICODE_PRESERVE_BROKEN
default n
depends on UNICODE_SUPPORT
help
With this option on, on line-editing input (such as used by shells)
invalid UTF-8 bytes are not substituted with the selected
substitution character.
With this option on, invalid UTF-8 bytes are not substituted
with the selected substitution character.
For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
at shell prompt will list file named 0xff (single char name
with char value 255), not file named '?'.
@@ -284,6 +284,17 @@ config FEATURE_CLEAN_UP
Don't enable this unless you have a really good reason to clean
things up manually.
config FEATURE_WTMP
bool "Support wtmp file"
default y
select FEATURE_UTMP
help
The file /var/run/wtmp is used to track when users have logged into
and logged out of the system.
With this option on, certain applets (getty, login, telnetd etc)
will append new entries there.
"last" applet requires this option.
config FEATURE_UTMP
bool "Support utmp file"
default y
@@ -293,17 +304,6 @@ config FEATURE_UTMP
will create and delete entries there.
"who" applet requires this option.
config FEATURE_WTMP
bool "Support wtmp file"
default y
depends on FEATURE_UTMP
help
The file /var/run/wtmp is used to track when users have logged into
and logged out of the system.
With this option on, certain applets (getty, login, telnetd etc)
will append new entries there.
"last" applet requires this option.
config FEATURE_PIDFILE
bool "Support writing pidfiles"
default y
@@ -328,39 +328,21 @@ config FEATURE_SUID
symlinks pointing to each binary), and only set the suid bit on the
one that needs it.
The applets which require root rights (need suid bit or
to be run by root) and will refuse to execute otherwise:
crontab, login, passwd, su, vlock, wall.
The applets currently marked to need the suid bit are:
The applets which will use root rights if they have them
(via suid bit, or because run by root), but would try to work
without root right nevertheless:
findfs, ping[6], traceroute[6], mount.
Note that if you DONT select this option, but DO make busybox
suid root, ALL applets will run under root, which is a huge
security hole (think "cp /some/file /etc/passwd").
crontab, dnsd, findfs, ipcrm, ipcs, login, passwd, ping, su,
traceroute, vlock.
config FEATURE_SUID_CONFIG
bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
default y
default y if FEATURE_SUID
depends on FEATURE_SUID
help
Allow the SUID / SGID state of an applet to be determined at runtime
by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
The format of this file is as follows:
APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
s: USER or GROUP is allowed to execute APPLET.
APPLET will run under USER or GROUP
(reagardless of who's running it).
S: USER or GROUP is NOT allowed to execute APPLET.
APPLET will run under USER or GROUP.
This option is not very sensical.
x: USER/GROUP/others are allowed to execute APPLET.
No UID/GID change will be done when it is run.
-: USER/GROUP/others are not allowed to execute APPLET.
<applet> = [Ssx-][Ssx-][x-] (<username>|<uid>).(<groupname>|<gid>)
An example might help:
@@ -370,8 +352,7 @@ config FEATURE_SUID_CONFIG
su = ssx # exactly the same
mount = sx- root.disk # applet mount can be run by root and members
# of group disk (but not anyone else)
# and runs with euid=0 (egid is not changed)
# of group disk and runs with euid=0
cp = --- # disable applet cp for everyone
@@ -397,7 +378,7 @@ config FEATURE_SUID_CONFIG_QUIET
config SELINUX
bool "Support NSA Security Enhanced Linux"
default n
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
Enable support for SELinux in applets ls, ps, and id. Also provide
the option of compiling in SELinux applets.
@@ -478,10 +459,7 @@ config PIE
default n
depends on !STATIC
help
Hardened code option. PIE binaries are loaded at a different
address at each invocation. This has some overhead,
particularly on x86-32 which is short on registers.
(TODO: what is it and why/when is it useful?)
Most people will leave this set to 'N'.
config NOMMU
@@ -578,6 +556,7 @@ config FEATURE_SHARED_BUSYBOX
config LFS
bool "Build with Large File Support (for accessing files > 2 GB)"
default y
select FDISK_SUPPORT_LARGE_DISKS
help
If you want to build BusyBox with large file support, then enable
this option. This will have no effect if your kernel or your C
@@ -681,6 +660,9 @@ config EFENCE
endchoice
### config PARSE
### bool "Uniform config file parser debugging applet: parse"
endmenu
menu 'Installation Options ("make install" behavior)'
@@ -711,6 +693,7 @@ config INSTALL_APPLET_SCRIPT_WRAPPERS
config INSTALL_APPLET_DONT
bool "not installed"
depends on FEATURE_INSTALLER || FEATURE_SH_STANDALONE || FEATURE_PREFER_APPLETS
help
Do not install applet links. Useful when you plan to use
busybox --install for installing links, or plan to use
+2 -4
View File
@@ -70,9 +70,7 @@ create a known starting point.
Other starting configurations (mostly used for testing purposes) include
"make allbareconfig" (enables all applets but disables all optional features),
"make allyesconfig" (enables absolutely everything including debug features),
and "make randconfig" (produce a random configuration). The configs/ directory
contains a number of additional configuration files ending in _defconfig which
are useful in specific cases. "make help" will list them.
and "make randconfig" (produce a random configuration).
Configuring BusyBox produces a file ".config", which can be saved for future
use. Run "make oldconfig" to bring a .config file from an older version of
@@ -99,7 +97,7 @@ first argument to determine which applet to behave as, for example
"./busybox cat LICENSE". (Running the busybox applet with no arguments gives
a list of all enabled applets.) The standalone shell can also call busybox
applets without links to busybox under other names in the filesystem. You can
also configure a standalone install capability into the busybox base applet,
also configure a standaone install capability into the busybox base applet,
and then install such links at runtime with one of "busybox --install" (for
hardlinks) or "busybox --install -s" (for symlinks).
+13 -8
View File
@@ -1,5 +1,5 @@
VERSION = 1
PATCHLEVEL = 19
PATCHLEVEL = 18
SUBLEVEL = 2
EXTRAVERSION =
NAME = Unnamed
@@ -963,14 +963,10 @@ CLEAN_FILES += busybox busybox_unstripped* busybox.links \
# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include2
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
include/NUM_APPLETS.h \
include/autoconf.h \
include/bbconfigopts.h \
include/bbconfigopts_bz2.h \
include/usage_compressed.h \
include/applet_tables.h \
include/applets.h \
include/usage.h \
applets/usage \
.kernelrelease Module.symvers tags TAGS cscope* \
busybox_old
@@ -1012,8 +1008,8 @@ $(mrproper-dirs):
mrproper: clean archmrproper $(mrproper-dirs)
$(call cmd,rmdirs)
$(call cmd,rmfiles)
@find . -name Config.src | sed 's/.src$$/.in/' | xargs -r rm -f
@find . -name Kbuild.src | sed 's/.src$$//' | xargs -r rm -f
@find -name Config.src | sed 's/.src$$/.in/' | xargs -r rm -f
@find -name Kbuild.src | sed 's/.src$$//' | xargs -r rm -f
# distclean
#
@@ -1042,7 +1038,7 @@ rpm: FORCE
# Brief documentation of the typical targets used
# ---------------------------------------------------------------------------
boards := $(wildcard $(srctree)/configs/*_defconfig)
boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig)
boards := $(notdir $(boards))
-include $(srctree)/Makefile.help
@@ -1131,6 +1127,15 @@ clean: $(clean-dirs)
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \
-type f -print | xargs rm -f
help:
@echo ' Building external modules.'
@echo ' Syntax: make -C path/to/kernel/src M=$$PWD target'
@echo ''
@echo ' modules - default target, build the module(s)'
@echo ' modules_install - install the module'
@echo ' clean - remove generated files in module directory only'
@echo ''
# Dummies...
PHONY += prepare scripts
prepare: ;
+2 -2
View File
@@ -58,14 +58,14 @@ CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1
#CFLAGS += $(call cc-option,-Wconversion,)
ifneq ($(CONFIG_DEBUG),y)
CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,))
CFLAGS += $(call cc-option,-Os,)
else
CFLAGS += $(call cc-option,-g,)
#CFLAGS += "-D_FORTIFY_SOURCE=2"
ifeq ($(CONFIG_DEBUG_PESSIMIZE),y)
CFLAGS += $(call cc-option,-O0,)
else
CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,))
CFLAGS += $(call cc-option,-Os,)
endif
endif
-4
View File
@@ -25,10 +25,6 @@ help:
@echo ' You can use these commands if the commands on the host'
@echo ' is unusable. Afterwards use it like:'
@echo ' make SED="$(objtree)/sed"'
@$(if $(boards), \
$(foreach b, $(boards), \
printf " %-21s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \
echo '')
@echo
@echo 'Installation:'
@echo ' install - install busybox into CONFIG_PREFIX'
+2 -2
View File
@@ -44,7 +44,7 @@ Using busybox:
run (I.E. "./busybox ls -l /proc").
The "standalone shell" mode is an easy way to try out busybox; this is a
command shell that calls the built-in applets without needing them to be
command shell that calls the builtin applets without needing them to be
installed in the path. (Note that this requires /proc to be mounted, if
testing from a boot floppy or in a chroot environment.)
@@ -169,7 +169,7 @@ Portability:
MacOS X, Solaris, Cygwin, or the BSD Fork Du Jour). This generally involves
a different kernel and a different C library at the same time. While it
should be possible to port the majority of the code to work in one of
these environments, don't be surprised if it doesn't work out of the box. If
these environments, don't be suprised if it doesn't work out of the box. If
you're into that sort of thing, start small (selecting just a few applets)
and work your way up.
@@ -189,6 +189,7 @@ CONFIG_HOSTID=y
CONFIG_ID=y
CONFIG_INSTALL=y
CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
CONFIG_LENGTH=y
CONFIG_LN=y
CONFIG_LOGNAME=y
CONFIG_LS=y
@@ -211,6 +211,7 @@ CONFIG_FALSE=y
# CONFIG_ID is not set
# CONFIG_INSTALL is not set
# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
# CONFIG_LENGTH is not set
# CONFIG_LN is not set
# CONFIG_LOGNAME is not set
# CONFIG_LS is not set
@@ -200,6 +200,7 @@ CONFIG_HOSTID=y
CONFIG_ID=y
CONFIG_INSTALL=y
CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
CONFIG_LENGTH=y
CONFIG_LN=y
CONFIG_LOGNAME=y
CONFIG_LS=y
-1
View File
@@ -1,3 +1,2 @@
/applet_tables
/usage
/usage_pod
-3
View File
@@ -42,6 +42,3 @@ quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
include/applet_tables.h: applets/applet_tables
$(call cmd,gen_applet_tables)
include/NUM_APPLETS.h: applets/applet_tables
$(call cmd,gen_applet_tables)
+2 -8
View File
@@ -7,19 +7,13 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#undef ARRAY_SIZE
#define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0])))
#include "../include/autoconf.h"
#include "../include/applet_metadata.h"
#include "../include/busybox.h"
struct bb_applet {
const char *name;
+1 -1
View File
@@ -14,7 +14,7 @@ CONFIG_H=${1:-include/autoconf.h}
APPLETS_H=${2:-include/applets.h}
$HOSTCC -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H |
awk '/^[ \t]*LINK/{
dir=substr($2,7)
dir=substr($2,8)
gsub("_","/",dir)
if(dir=="/ROOT") dir=""
file=$3
+34 -37
View File
@@ -3,15 +3,12 @@
export LC_ALL=POSIX
export LC_CTYPE=POSIX
prefix=$1
prefix=${1}
if [ -z "$prefix" ]; then
echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--scriptwrapper]"
exit 1
exit 1;
fi
h=`sort busybox.links | uniq`
linkopts=""
scriptwrapper="n"
cleanup="0"
noclobber="0"
@@ -36,12 +33,12 @@ if [ -n "$DO_INSTALL_LIBS" ] && [ "$DO_INSTALL_LIBS" != "n" ]; then
libdir=/lib
fi
mkdir -p "$prefix/$libdir" || exit 1
mkdir -p $prefix/$libdir || exit 1
for i in $DO_INSTALL_LIBS; do
rm -f "$prefix/$libdir/$i" || exit 1
if [ -f "$i" ]; then
cp -pPR "$i" "$prefix/$libdir/" || exit 1
chmod 0644 "$prefix/$libdir/$i" || exit 1
rm -f $prefix/$libdir/$i || exit 1
if [ -f $i ]; then
cp -pPR $i $prefix/$libdir/ || exit 1
chmod 0644 $prefix/$libdir/$i || exit 1
fi
done
fi
@@ -49,35 +46,35 @@ fi
if [ "$cleanup" = "1" ] && [ -e "$prefix/bin/busybox" ]; then
inode=`ls -i "$prefix/bin/busybox" | awk '{print $1}'`
sub_shell_it=`
cd "$prefix"
for d in usr/sbin usr/bin sbin bin; do
pd=$PWD
if [ -d "$d" ]; then
cd "$d"
ls -iL . | grep "^ *$inode" | awk '{print $2}' | env -i xargs rm -f
fi
cd "$pd"
done
`
cd "$prefix"
for d in usr/sbin usr/bin sbin bin; do
pd=$PWD
if [ -d "$d" ]; then
cd $d
ls -iL . | grep "^ *$inode" | awk '{print $2}' | env -i xargs rm -f
fi
cd "$pd"
done
`
exit 0
fi
rm -f "$prefix/bin/busybox" || exit 1
mkdir -p "$prefix/bin" || exit 1
install -m 755 busybox "$prefix/bin/busybox" || exit 1
rm -f $prefix/bin/busybox || exit 1
mkdir -p $prefix/bin || exit 1
install -m 755 busybox $prefix/bin/busybox || exit 1
for i in $h; do
appdir=`dirname "$i"`
mkdir -p "$prefix/$appdir" || exit 1
appdir=`dirname $i`
mkdir -p $prefix/$appdir || exit 1
if [ "$scriptwrapper" = "y" ]; then
if [ "$swrapall" != "y" ] && [ "$i" = "/bin/sh" ]; then
ln $linkopts busybox "$prefix/$i" || exit 1
ln $linkopts busybox $prefix$i || exit 1
else
rm -f "$prefix/$i"
echo "#!/bin/busybox" >"$prefix/$i"
chmod +x "$prefix/$i"
rm -f $prefix$i
echo "#!/bin/busybox" > $prefix$i
chmod +x $prefix/$i
fi
echo " $prefix/$i"
echo " $prefix$i"
else
if [ "$2" = "--hardlinks" ]; then
bb_path="$prefix/bin/busybox"
@@ -92,20 +89,20 @@ for i in $h; do
/sbin)
bb_path="../bin/busybox"
;;
/usr/bin | /usr/sbin)
/usr/bin|/usr/sbin)
bb_path="../../bin/busybox"
;;
*)
echo "Unknown installation directory: $appdir"
exit 1
echo "Unknown installation directory: $appdir"
exit 1
;;
esac
fi
if [ "$noclobber" = "0" ] || [ ! -e "$prefix/$i" ]; then
echo " $prefix/$i -> $bb_path"
ln $linkopts "$bb_path" "$prefix/$i" || exit 1
if [ "$noclobber" = "0" ] || [ ! -e "$prefix$i" ]; then
echo " $prefix$i -> $bb_path"
ln $linkopts $bb_path $prefix$i || exit 1
else
echo " $prefix/$i already exists"
echo " $prefix$i already exists"
fi
fi
done
+2 -2
View File
@@ -31,8 +31,8 @@
#include "usage.h"
#define MAKE_USAGE(aname, usage) { aname, usage },
static struct usage_data {
const char *aname;
const char *usage;
const char *aname;
const char *usage;
} usage_array[] = {
#include "applets.h"
};
+1 -11
View File
@@ -17,16 +17,6 @@
* http://www.unix-systems.org/single_unix_specification_v2/xcu/ar.html
*/
//usage:#define ar_trivial_usage
//usage: "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
//usage:#define ar_full_usage "\n\n"
//usage: "Extract or list FILES from an ar archive\n"
//usage: "\n -o Preserve original dates"
//usage: "\n -p Extract to stdout"
//usage: "\n -t List"
//usage: "\n -x Extract"
//usage: "\n -v Verbose"
#include "libbb.h"
#include "archive.h"
#include "ar.h"
@@ -81,7 +71,7 @@ static void output_ar_header(archive_handle_t *handle)
}
/*
* when replacing files in an existing archive, copy from the
* when replacing files in an existing archive, copy from the the
* original archive those files that are to be left intact
*/
static void FAST_FUNC copy_data(archive_handle_t *handle)
+3 -72
View File
@@ -167,14 +167,6 @@ char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext)
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define uncompress_trivial_usage
//usage: "[-cf] [FILE]..."
//usage:#define uncompress_full_usage "\n\n"
//usage: "Decompress .Z file[s]\n"
//usage: "\n -c Write to stdout"
//usage: "\n -f Overwrite"
#if ENABLE_UNCOMPRESS
static
IF_DESKTOP(long long) int FAST_FUNC unpack_uncompress(unpack_info_t *info UNUSED_PARAM)
@@ -226,27 +218,6 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv)
* See the license_msg below and the file COPYING for the software license.
* See the file algorithm.doc for the compression algorithms and file formats.
*/
//usage:#define gunzip_trivial_usage
//usage: "[-cft] [FILE]..."
//usage:#define gunzip_full_usage "\n\n"
//usage: "Decompress FILEs (or stdin)\n"
//usage: "\n -c Write to stdout"
//usage: "\n -f Force"
//usage: "\n -t Test file integrity"
//usage:
//usage:#define gunzip_example_usage
//usage: "$ ls -la /tmp/BusyBox*\n"
//usage: "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n"
//usage: "$ gunzip /tmp/BusyBox-0.43.tar.gz\n"
//usage: "$ ls -la /tmp/BusyBox*\n"
//usage: "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n"
//usage:
//usage:#define zcat_trivial_usage
//usage: "FILE"
//usage:#define zcat_full_usage "\n\n"
//usage: "Decompress to stdout"
#if ENABLE_GUNZIP
static
char* FAST_FUNC make_new_name_gunzip(char *filename, const char *expected_ext UNUSED_PARAM)
@@ -337,14 +308,15 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv)
//usage: "[-cf] [FILE]..."
//usage:#define bunzip2_full_usage "\n\n"
//usage: "Decompress FILEs (or stdin)\n"
//usage: "\nOptions:"
//usage: "\n -c Write to stdout"
//usage: "\n -f Force"
//usage:#define bzcat_trivial_usage
//usage: "FILE"
//usage:#define bzcat_full_usage "\n\n"
//usage: "Decompress to stdout"
//applet:IF_BUNZIP2(APPLET(bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP))
//applet:IF_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP, bzcat))
//applet:IF_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_DROP))
//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(unpack_info_t *info UNUSED_PARAM)
@@ -372,47 +344,6 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
//usage:#define unlzma_trivial_usage
//usage: "[-cf] [FILE]..."
//usage:#define unlzma_full_usage "\n\n"
//usage: "Decompress FILE (or stdin)\n"
//usage: "\n -c Write to stdout"
//usage: "\n -f Force"
//usage:
//usage:#define lzma_trivial_usage
//usage: "-d [-cf] [FILE]..."
//usage:#define lzma_full_usage "\n\n"
//usage: "Decompress FILE (or stdin)\n"
//usage: "\n -d Decompress"
//usage: "\n -c Write to stdout"
//usage: "\n -f Force"
//usage:
//usage:#define lzcat_trivial_usage
//usage: "FILE"
//usage:#define lzcat_full_usage "\n\n"
//usage: "Decompress to stdout"
//usage:
//usage:#define unxz_trivial_usage
//usage: "[-cf] [FILE]..."
//usage:#define unxz_full_usage "\n\n"
//usage: "Decompress FILE (or stdin)\n"
//usage: "\n -c Write to stdout"
//usage: "\n -f Force"
//usage:
//usage:#define xz_trivial_usage
//usage: "-d [-cf] [FILE]..."
//usage:#define xz_full_usage "\n\n"
//usage: "Decompress FILE (or stdin)\n"
//usage: "\n -d Decompress"
//usage: "\n -c Write to stdout"
//usage: "\n -f Force"
//usage:
//usage:#define xzcat_trivial_usage
//usage: "FILE"
//usage:#define xzcat_full_usage "\n\n"
//usage: "Decompress to stdout"
#if ENABLE_UNLZMA
static
IF_DESKTOP(long long) int FAST_FUNC unpack_unlzma(unpack_info_t *info UNUSED_PARAM)
-9
View File
@@ -7,15 +7,6 @@
* about bzip2 library code.
*/
//usage:#define bzip2_trivial_usage
//usage: "[OPTIONS] [FILE]..."
//usage:#define bzip2_full_usage "\n\n"
//usage: "Compress FILEs (or stdin) with bzip2 algorithm\n"
//usage: "\n -1..9 Compression level"
//usage: "\n -d Decompress"
//usage: "\n -c Write to stdout"
//usage: "\n -f Force"
#include "libbb.h"
#include "archive.h"
+35 -65
View File
@@ -14,42 +14,13 @@
#include "libbb.h"
#include "archive.h"
//usage:#define cpio_trivial_usage
//usage: "[-dmvu] [-F FILE]" IF_FEATURE_CPIO_O(" [-H newc]")
//usage: " [-ti"IF_FEATURE_CPIO_O("o")"]" IF_FEATURE_CPIO_P(" [-p DIR]")
//usage: " [EXTR_FILE]..."
//usage:#define cpio_full_usage "\n\n"
//usage: "Extract or list files from a cpio archive"
//usage: IF_FEATURE_CPIO_O(", or"
//usage: "\ncreate an archive" IF_FEATURE_CPIO_P(" (-o) or copy files (-p)")
//usage: " using file list on stdin"
//usage: )
//usage: "\n"
//usage: "\nMain operation mode:"
//usage: "\n -t List"
//usage: "\n -i Extract EXTR_FILEs (or all)"
//usage: IF_FEATURE_CPIO_O(
//usage: "\n -o Create (requires -H newc)"
//usage: )
//usage: IF_FEATURE_CPIO_P(
//usage: "\n -p DIR Copy files to DIR"
//usage: )
//usage: "\n -d Make leading directories"
//usage: "\n -m Preserve mtime"
//usage: "\n -v Verbose"
//usage: "\n -u Overwrite"
//usage: "\n -F FILE Input (-t,-i,-p) or output (-o) file"
//usage: IF_FEATURE_CPIO_O(
//usage: "\n -H newc Archive format"
//usage: )
/* GNU cpio 2.9 --help (abridged):
Modes:
-t, --list List the archive
-i, --extract Extract files from an archive
-o, --create Create the archive
-p, --pass-through Copy-pass mode
-p, --pass-through Copy-pass mode [was ist das?!]
Options valid in any mode:
--block-size=SIZE I/O block size = SIZE * 512 bytes
@@ -107,28 +78,27 @@
--sparse Write files with blocks of zeros as sparse files
-u, --unconditional Replace all files unconditionally
*/
enum {
OPT_EXTRACT = (1 << 0),
OPT_TEST = (1 << 1),
OPT_NUL_TERMINATED = (1 << 2),
OPT_UNCONDITIONAL = (1 << 3),
OPT_VERBOSE = (1 << 4),
OPT_CREATE_LEADING_DIR = (1 << 5),
OPT_PRESERVE_MTIME = (1 << 6),
OPT_DEREF = (1 << 7),
OPT_FILE = (1 << 8),
CPIO_OPT_EXTRACT = (1 << 0),
CPIO_OPT_TEST = (1 << 1),
CPIO_OPT_NUL_TERMINATED = (1 << 2),
CPIO_OPT_UNCONDITIONAL = (1 << 3),
CPIO_OPT_VERBOSE = (1 << 4),
CPIO_OPT_CREATE_LEADING_DIR = (1 << 5),
CPIO_OPT_PRESERVE_MTIME = (1 << 6),
CPIO_OPT_DEREF = (1 << 7),
CPIO_OPT_FILE = (1 << 8),
OPTBIT_FILE = 8,
IF_FEATURE_CPIO_O(OPTBIT_CREATE ,)
IF_FEATURE_CPIO_O(OPTBIT_FORMAT ,)
IF_FEATURE_CPIO_P(OPTBIT_PASSTHROUGH,)
IF_LONG_OPTS( OPTBIT_QUIET ,)
IF_LONG_OPTS( OPTBIT_2STDOUT ,)
OPT_CREATE = IF_FEATURE_CPIO_O((1 << OPTBIT_CREATE )) + 0,
OPT_FORMAT = IF_FEATURE_CPIO_O((1 << OPTBIT_FORMAT )) + 0,
OPT_PASSTHROUGH = IF_FEATURE_CPIO_P((1 << OPTBIT_PASSTHROUGH)) + 0,
OPT_QUIET = IF_LONG_OPTS( (1 << OPTBIT_QUIET )) + 0,
OPT_2STDOUT = IF_LONG_OPTS( (1 << OPTBIT_2STDOUT )) + 0,
CPIO_OPT_CREATE = IF_FEATURE_CPIO_O((1 << OPTBIT_CREATE )) + 0,
CPIO_OPT_FORMAT = IF_FEATURE_CPIO_O((1 << OPTBIT_FORMAT )) + 0,
CPIO_OPT_PASSTHROUGH = IF_FEATURE_CPIO_P((1 << OPTBIT_PASSTHROUGH)) + 0,
CPIO_OPT_QUIET = IF_LONG_OPTS( (1 << OPTBIT_QUIET )) + 0,
CPIO_OPT_2STDOUT = IF_LONG_OPTS( (1 << OPTBIT_2STDOUT )) + 0,
};
#define OPTION_STR "it0uvdmLF:"
@@ -168,7 +138,7 @@ static NOINLINE int cpio_o(void)
char *line;
struct stat st;
line = (option_mask32 & OPT_NUL_TERMINATED)
line = (option_mask32 & CPIO_OPT_NUL_TERMINATED)
? bb_get_chunk_from_file(stdin, NULL)
: xmalloc_fgetline(stdin);
@@ -183,7 +153,7 @@ static NOINLINE int cpio_o(void)
free(line);
continue;
}
if ((option_mask32 & OPT_DEREF)
if ((option_mask32 & CPIO_OPT_DEREF)
? stat(name, &st)
: lstat(name, &st)
) {
@@ -340,22 +310,22 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
#if !ENABLE_FEATURE_CPIO_O
opt = getopt32(argv, OPTION_STR, &cpio_filename);
argv += optind;
if (opt & OPT_FILE) { /* -F */
if (opt & CPIO_OPT_FILE) { /* -F */
xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO);
}
#else
opt = getopt32(argv, OPTION_STR "oH:" IF_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt);
argv += optind;
if ((opt & (OPT_FILE|OPT_CREATE)) == OPT_FILE) { /* -F without -o */
if ((opt & (CPIO_OPT_FILE|CPIO_OPT_CREATE)) == CPIO_OPT_FILE) { /* -F without -o */
xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO);
}
if (opt & OPT_PASSTHROUGH) {
if (opt & CPIO_OPT_PASSTHROUGH) {
pid_t pid;
struct fd_pair pp;
if (argv[0] == NULL)
bb_show_usage();
if (opt & OPT_CREATE_LEADING_DIR)
if (opt & CPIO_OPT_CREATE_LEADING_DIR)
mkdir(argv[0], 0777);
/* Crude existence check:
* close(xopen(argv[0], O_RDONLY | O_DIRECTORY));
@@ -387,15 +357,15 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
xchdir(*argv++);
close(pp.wr);
xmove_fd(pp.rd, STDIN_FILENO);
//opt &= ~OPT_PASSTHROUGH;
opt |= OPT_EXTRACT;
//opt &= ~CPIO_OPT_PASSTHROUGH;
opt |= CPIO_OPT_EXTRACT;
goto skip;
}
/* -o */
if (opt & OPT_CREATE) {
if (opt & CPIO_OPT_CREATE) {
if (cpio_fmt[0] != 'n') /* we _require_ "-H newc" */
bb_show_usage();
if (opt & OPT_FILE) {
if (opt & CPIO_OPT_FILE) {
xmove_fd(xopen(cpio_filename, O_WRONLY | O_CREAT | O_TRUNC), STDOUT_FILENO);
}
dump:
@@ -405,35 +375,35 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
#endif
/* One of either extract or test options must be given */
if ((opt & (OPT_TEST | OPT_EXTRACT)) == 0) {
if ((opt & (CPIO_OPT_TEST | CPIO_OPT_EXTRACT)) == 0) {
bb_show_usage();
}
if (opt & OPT_TEST) {
if (opt & CPIO_OPT_TEST) {
/* if both extract and test options are given, ignore extract option */
opt &= ~OPT_EXTRACT;
opt &= ~CPIO_OPT_EXTRACT;
archive_handle->action_header = header_list;
}
if (opt & OPT_EXTRACT) {
if (opt & CPIO_OPT_EXTRACT) {
archive_handle->action_data = data_extract_all;
if (opt & OPT_2STDOUT)
if (opt & CPIO_OPT_2STDOUT)
archive_handle->action_data = data_extract_to_stdout;
}
if (opt & OPT_UNCONDITIONAL) {
if (opt & CPIO_OPT_UNCONDITIONAL) {
archive_handle->ah_flags |= ARCHIVE_UNLINK_OLD;
archive_handle->ah_flags &= ~ARCHIVE_EXTRACT_NEWER;
}
if (opt & OPT_VERBOSE) {
if (opt & CPIO_OPT_VERBOSE) {
if (archive_handle->action_header == header_list) {
archive_handle->action_header = header_verbose_list;
} else {
archive_handle->action_header = header_list;
}
}
if (opt & OPT_CREATE_LEADING_DIR) {
if (opt & CPIO_OPT_CREATE_LEADING_DIR) {
archive_handle->ah_flags |= ARCHIVE_CREATE_LEADING_DIRS;
}
if (opt & OPT_PRESERVE_MTIME) {
if (opt & CPIO_OPT_PRESERVE_MTIME) {
archive_handle->ah_flags |= ARCHIVE_RESTORE_DATE;
}
@@ -449,7 +419,7 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
continue;
if (archive_handle->cpio__blocks != (off_t)-1
&& !(opt & OPT_QUIET)
&& !(opt & CPIO_OPT_QUIET)
) {
fprintf(stderr, "%"OFF_FMT"u blocks\n", archive_handle->cpio__blocks);
}
+7 -27
View File
@@ -28,33 +28,6 @@
*
*/
//usage:#define dpkg_trivial_usage
//usage: "[-ilCPru] [-F OPT] PACKAGE"
//usage:#define dpkg_full_usage "\n\n"
//usage: "Install, remove and manage Debian packages\n"
//usage: IF_LONG_OPTS(
//usage: "\n -i,--install Install the package"
//usage: "\n -l,--list List of installed packages"
//usage: "\n --configure Configure an unpackaged package"
//usage: "\n -P,--purge Purge all files of a package"
//usage: "\n -r,--remove Remove all but the configuration files for a package"
//usage: "\n --unpack Unpack a package, but don't configure it"
//usage: "\n --force-depends Ignore dependency problems"
//usage: "\n --force-confnew Overwrite existing config files when installing"
//usage: "\n --force-confold Keep old config files when installing"
//usage: )
//usage: IF_NOT_LONG_OPTS(
//usage: "\n -i Install the package"
//usage: "\n -l List of installed packages"
//usage: "\n -C Configure an unpackaged package"
//usage: "\n -P Purge all files of a package"
//usage: "\n -r Remove all but the configuration files for a package"
//usage: "\n -u Unpack a package, but don't configure it"
//usage: "\n -F depends Ignore dependency problems"
//usage: "\n -F confnew Overwrite existing config files when installing"
//usage: "\n -F confold Keep old config files when installing"
//usage: )
#include "libbb.h"
#include <fnmatch.h>
#include "archive.h"
@@ -701,21 +674,28 @@ static unsigned get_status(const unsigned status_node, const int num)
static void set_status(const unsigned status_node_num, const char *new_value, const int position)
{
const unsigned new_value_len = strlen(new_value);
const unsigned new_value_num = search_name_hashtable(new_value);
unsigned want = get_status(status_node_num, 1);
unsigned flag = get_status(status_node_num, 2);
unsigned status = get_status(status_node_num, 3);
int want_len = strlen(name_hashtable[want]);
int flag_len = strlen(name_hashtable[flag]);
int status_len = strlen(name_hashtable[status]);
char *new_status;
switch (position) {
case 1:
want = new_value_num;
want_len = new_value_len;
break;
case 2:
flag = new_value_num;
flag_len = new_value_len;
break;
case 3:
status = new_value_num;
status_len = new_value_len;
break;
default:
bb_error_msg_and_die("DEBUG ONLY: this shouldnt happen");
-14
View File
@@ -4,20 +4,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define dpkg_deb_trivial_usage
//usage: "[-cefxX] FILE [argument"
//usage:#define dpkg_deb_full_usage "\n\n"
//usage: "Perform actions on Debian packages (.debs)\n"
//usage: "\n -c List contents of filesystem tree"
//usage: "\n -e Extract control files to [argument] directory"
//usage: "\n -f Display control field name starting with [argument]"
//usage: "\n -x Extract packages filesystem tree to directory"
//usage: "\n -X Verbose extract"
//usage:
//usage:#define dpkg_deb_example_usage
//usage: "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
#include "libbb.h"
#include "archive.h"
+2 -17
View File
@@ -39,21 +39,6 @@ gzip: bogus: No such file or directory
aa: 85.1% -- replaced with aa.gz
*/
//usage:#define gzip_trivial_usage
//usage: "[-cfd] [FILE]..."
//usage:#define gzip_full_usage "\n\n"
//usage: "Compress FILEs (or stdin)\n"
//usage: "\n -d Decompress"
//usage: "\n -c Write to stdout"
//usage: "\n -f Force"
//usage:
//usage:#define gzip_example_usage
//usage: "$ ls -la /tmp/busybox*\n"
//usage: "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n"
//usage: "$ gzip /tmp/busybox.tar\n"
//usage: "$ ls -la /tmp/busybox*\n"
//usage: "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
#include "libbb.h"
#include "archive.h"
@@ -1673,7 +1658,7 @@ static ulg flush_block(char *buf, ulg stored_len, int eof)
/* ===========================================================================
* Update a hash value with the given input byte
* IN assertion: all calls to UPDATE_HASH are made with consecutive
* IN assertion: all calls to to UPDATE_HASH are made with consecutive
* input characters, so that a running hash key can be computed from the
* previous key instead of complete recalculation each time.
*/
@@ -1704,7 +1689,7 @@ static ulg flush_block(char *buf, ulg stored_len, int eof)
/* Insert string s in the dictionary and set match_head to the previous head
* of the hash chain (the most recent string with same hash key). Return
* the previous length of the hash chain.
* IN assertion: all calls to INSERT_STRING are made with consecutive
* IN assertion: all calls to to INSERT_STRING are made with consecutive
* input characters and the first MIN_MATCH bytes of s are valid
* (except for the last MIN_MATCH-1 bytes of the input file). */
#define INSERT_STRING(s, match_head) \
+6 -1
View File
@@ -251,7 +251,7 @@ void sendMTFValues(EState* s)
{
int32_t v, t, i, j, gs, ge, totc, bt, bc, iter;
int32_t nSelectors, alphaSize, minLen, maxLen, selCtr;
int32_t nGroups;
int32_t nGroups, nBytes;
/*
* uint8_t len[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
@@ -512,6 +512,7 @@ void sendMTFValues(EState* s)
}
}
nBytes = s->numZ;
bsW(s, 16, inUse16);
inUse16 <<= (sizeof(int)*8 - 16); /* move 15th bit into sign bit */
@@ -527,6 +528,7 @@ void sendMTFValues(EState* s)
}
/*--- Now the selectors. ---*/
nBytes = s->numZ;
bsW(s, 3, nGroups);
bsW(s, 15, nSelectors);
for (i = 0; i < nSelectors; i++) {
@@ -536,6 +538,8 @@ void sendMTFValues(EState* s)
}
/*--- Now the coding tables. ---*/
nBytes = s->numZ;
for (t = 0; t < nGroups; t++) {
int32_t curr = s->len[t][0];
bsW(s, 5, curr);
@@ -547,6 +551,7 @@ void sendMTFValues(EState* s)
}
/*--- And finally, the block data proper ---*/
nBytes = s->numZ;
selCtr = 0;
gs = 0;
while (1) {
@@ -99,12 +99,8 @@ void FAST_FUNC data_extract_to_command(archive_handle_t *archive_handle)
close(p[1]);
xdup2(p[0], STDIN_FILENO);
signal(SIGPIPE, SIG_DFL);
execl(archive_handle->tar__to_command_shell,
archive_handle->tar__to_command_shell,
"-c",
archive_handle->tar__to_command,
NULL);
bb_perror_msg_and_die("can't execute '%s'", archive_handle->tar__to_command_shell);
execl(DEFAULT_SHELL, DEFAULT_SHELL_SHORT_NAME, "-c", archive_handle->tar__to_command, NULL);
bb_perror_msg_and_die("can't execute '%s'", DEFAULT_SHELL);
}
close(p[0]);
/* Our caller is expected to do signal(SIGPIPE, SIG_IGN)
+5 -8
View File
@@ -163,8 +163,7 @@ unpack_Z_stream(int fd_in, int fd_out)
if (insize < (int) (IBUFSIZ + 64) - IBUFSIZ) {
rsize = safe_read(fd_in, inbuf + insize, IBUFSIZ);
if (rsize < 0)
bb_error_msg_and_die(bb_msg_read_error);
//error check??
insize += rsize;
}
@@ -196,8 +195,6 @@ unpack_Z_stream(int fd_in, int fd_out)
if (oldcode == -1) {
if (code >= 256)
bb_error_msg_and_die("corrupted data"); /* %ld", code); */
oldcode = code;
finchar = (int) oldcode;
outbuf[outpos++] = (unsigned char) finchar;
@@ -242,8 +239,6 @@ unpack_Z_stream(int fd_in, int fd_out)
/* Generate output characters in reverse order */
while ((long) code >= (long) 256) {
if (stackp <= &htabof(0))
bb_error_msg_and_die("corrupted data");
*--stackp = tab_suffixof(code);
code = tab_prefixof(code);
}
@@ -268,7 +263,8 @@ unpack_Z_stream(int fd_in, int fd_out)
}
if (outpos >= OBUFSIZ) {
xwrite(fd_out, outbuf, outpos);
full_write(fd_out, outbuf, outpos);
//error check??
IF_DESKTOP(total_written += outpos;)
outpos = 0;
}
@@ -296,7 +292,8 @@ unpack_Z_stream(int fd_in, int fd_out)
} while (rsize > 0);
if (outpos > 0) {
xwrite(fd_out, outbuf, outpos);
full_write(fd_out, outbuf, outpos);
//error check??
IF_DESKTOP(total_written += outpos;)
}
+10 -46
View File
@@ -18,35 +18,6 @@ typedef uint32_t aliased_uint32_t FIX_ALIASING;
typedef off_t aliased_off_t FIX_ALIASING;
const char* FAST_FUNC strip_unsafe_prefix(const char *str)
{
const char *cp = str;
while (1) {
char *cp2;
if (*cp == '/') {
cp++;
continue;
}
if (strncmp(cp, "/../"+1, 3) == 0) {
cp += 3;
continue;
}
cp2 = strstr(cp, "/../");
if (!cp2)
break;
cp = cp2 + 4;
}
if (cp != str) {
static smallint warned = 0;
if (!warned) {
warned = 1;
bb_error_msg("removing leading '%.*s' from member names",
(int)(cp - str), str);
}
}
return cp;
}
/* NB: _DESTROYS_ str[len] character! */
static unsigned long long getOctal(char *str, int len)
{
@@ -228,7 +199,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
uint16_t magic2;
autodetect:
magic2 = *(bb__aliased_uint16_t*)tar.name;
magic2 = *(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().
@@ -348,20 +319,10 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
/* Set bits 12-15 of the files mode */
/* (typeflag was not trashed because chksum does not use getOctal) */
switch (tar.typeflag) {
case '1': /* hardlink */
/* we mark hardlinks as regular files with zero size and a link name */
/* busybox identifies hard links as being regular files with 0 size and a link name */
case '1':
file_header->mode |= S_IFREG;
/* on size of link fields from star(4)
* ... For tar archives written by pre POSIX.1-1988
* implementations, the size field usually contains the size of
* the file and needs to be ignored as no data may follow this
* header type. For POSIX.1- 1988 compliant archives, the size
* field needs to be 0. For POSIX.1-2001 compliant archives,
* the size field may be non zero, indicating that file data is
* included in the archive.
* i.e; always assume this is zero for safety.
*/
goto size0;
break;
case '7':
/* case 0: */
case '0':
@@ -461,9 +422,12 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
p_linkname = NULL;
}
#endif
/* Everything up to and including last ".." component is stripped */
overlapping_strcpy(file_header->name, strip_unsafe_prefix(file_header->name));
if (strncmp(file_header->name, "/../"+1, 3) == 0
|| strstr(file_header->name, "/../")
) {
bb_error_msg_and_die("name with '..' encountered: '%s'",
file_header->name);
}
/* Strip trailing '/' in directories */
/* Must be done after mode is set as '/' is used to check if it's a directory */
+2 -2
View File
@@ -9,7 +9,7 @@
char FAST_FUNC get_header_tar_gz(archive_handle_t *archive_handle)
{
#if BB_MMU
uint16_t magic;
unsigned char magic[2];
#endif
/* Can't lseek over pipes */
@@ -21,7 +21,7 @@ char FAST_FUNC get_header_tar_gz(archive_handle_t *archive_handle)
#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) {
if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) {
bb_error_msg_and_die("invalid gzip magic");
}
#endif
+1 -26
View File
@@ -25,31 +25,6 @@
"Minimalized" for busybox by Alain Knaff
*/
//usage:#define lzop_trivial_usage
//usage: "[-cfvd123456789CF] [FILE]..."
//usage:#define lzop_full_usage "\n\n"
//usage: " -1..9 Compression level"
//usage: "\n -d Decompress"
//usage: "\n -c Write to stdout"
//usage: "\n -f Force"
//usage: "\n -v Verbose"
//usage: "\n -F Don't store or verify checksum"
//usage: "\n -C Also write checksum of compressed block"
//usage:
//usage:#define lzopcat_trivial_usage
//usage: "[-vCF] [FILE]..."
//usage:#define lzopcat_full_usage "\n\n"
//usage: " -v Verbose"
//usage: "\n -F Don't store or verify checksum"
//usage:
//usage:#define unlzop_trivial_usage
//usage: "[-cfvCF] [FILE]..."
//usage:#define unlzop_full_usage "\n\n"
//usage: " -c Write to stdout"
//usage: "\n -f Force"
//usage: "\n -v Verbose"
//usage: "\n -F Don't store or verify checksum"
#include "libbb.h"
#include "archive.h"
#include "liblzo_interface.h"
@@ -426,7 +401,7 @@ struct globals {
#define INIT_G() do { } while (0)
//#define G (*ptr_to_globals)
//#define INIT_G() do {
// SET_PTR_TO_GLOBALS(xzalloc(sizeof(G)));
// SET_PTR_TO_GLOBALS(xzalloc(sizeof(G)));
//} while (0)
-12
View File
@@ -7,18 +7,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define rpm_trivial_usage
//usage: "-i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm"
//usage:#define rpm_full_usage "\n\n"
//usage: "Manipulate RPM packages\n"
//usage: "\nCommands:"
//usage: "\n -i Install package"
//usage: "\n -qp Query package"
//usage: "\n -i Show information"
//usage: "\n -l List contents"
//usage: "\n -d List documents"
//usage: "\n -c List config files"
#include "libbb.h"
#include "archive.h"
#include "rpm.h"
-6
View File
@@ -6,12 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define rpm2cpio_trivial_usage
//usage: "package.rpm"
//usage:#define rpm2cpio_full_usage "\n\n"
//usage: "Output a cpio archive of the rpm file"
#include "libbb.h"
#include "archive.h"
#include "rpm.h"
+29 -73
View File
@@ -23,25 +23,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
/* TODO: security with -C DESTDIR option can be enhanced.
* Consider tar file created via:
* $ tar cvf bug.tar anything.txt
* $ ln -s /tmp symlink
* $ tar --append -f bug.tar symlink
* $ rm symlink
* $ mkdir symlink
* $ tar --append -f bug.tar symlink/evil.py
*
* This will result in an archive which contains:
* $ tar --list -f bug.tar
* anything.txt
* symlink
* symlink/evil.py
*
* Untarring it puts evil.py in '/tmp' even if the -C DESTDIR is given.
* This doesn't feel right, and IIRC GNU tar doesn't do that.
*/
#include <fnmatch.h>
#include "libbb.h"
#include "archive.h"
@@ -264,8 +245,7 @@ static int writeTarHeader(struct TarBallInfo *tbInfo,
PUT_OCTAL(header.uid, statbuf->st_uid);
PUT_OCTAL(header.gid, statbuf->st_gid);
memset(header.size, '0', sizeof(header.size)-1); /* Regular file size is handled later */
/* users report that files with negative st_mtime cause trouble, so: */
PUT_OCTAL(header.mtime, statbuf->st_mtime >= 0 ? statbuf->st_mtime : 0);
PUT_OCTAL(header.mtime, statbuf->st_mtime);
/* Enter the user and group names */
safe_strncpy(header.uname, get_cached_username(statbuf->st_uid), sizeof(header.uname));
@@ -317,42 +297,15 @@ static int writeTarHeader(struct TarBallInfo *tbInfo,
} else if (S_ISFIFO(statbuf->st_mode)) {
header.typeflag = FIFOTYPE;
} else if (S_ISREG(statbuf->st_mode)) {
/* header.size field is 12 bytes long */
/* Does octal-encoded size fit? */
uoff_t filesize = statbuf->st_size;
if (sizeof(filesize) <= 4
|| filesize <= (uoff_t)0777777777777LL
if (sizeof(statbuf->st_size) > 4
&& statbuf->st_size > (off_t)0777777777777LL
) {
PUT_OCTAL(header.size, filesize);
}
/* Does base256-encoded size fit?
* It always does unless off_t is wider than 64 bits.
*/
else if (ENABLE_FEATURE_TAR_GNU_EXTENSIONS
#if ULLONG_MAX > 0xffffffffffffffffLL /* 2^64-1 */
&& (filesize <= 0x3fffffffffffffffffffffffLL)
#endif
) {
/* GNU tar uses "base-256 encoding" for very large numbers.
* Encoding is binary, with highest bit always set as a marker
* and sign in next-highest bit:
* 80 00 .. 00 - zero
* bf ff .. ff - largest positive number
* ff ff .. ff - minus 1
* c0 00 .. 00 - smallest negative number
*/
char *p8 = header.size + sizeof(header.size);
do {
*--p8 = (uint8_t)filesize;
filesize >>= 8;
} while (p8 != header.size);
*p8 |= 0x80;
} else {
bb_error_msg_and_die("can't store file '%s' "
"of size %"OFF_FMT"u, aborting",
fileName, statbuf->st_size);
}
header.typeflag = REGTYPE;
PUT_OCTAL(header.size, statbuf->st_size);
} else {
bb_error_msg("%s: unknown file type", fileName);
return FALSE;
@@ -425,8 +378,17 @@ static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statb
DBG("writeFileToTarball('%s')", fileName);
/* Strip leading '/' and such (must be before memorizing hardlink's name) */
header_name = strip_unsafe_prefix(fileName);
/* Strip leading '/' (must be before memorizing hardlink's name) */
header_name = fileName;
while (header_name[0] == '/') {
static smallint warned;
if (!warned) {
bb_error_msg("removing leading '/' from member names");
warned = 1;
}
header_name++;
}
if (header_name[0] == '\0')
return TRUE;
@@ -674,7 +636,7 @@ static llist_t *append_file_list_to_list(llist_t *list)
llist_t *newlist = NULL;
while (list) {
src_stream = xfopen_stdin(llist_pop(&list));
src_stream = xfopen_for_read(llist_pop(&list));
while ((line = xmalloc_fgetline(src_stream)) != NULL) {
/* kill trailing '/' unless the string is just "/" */
char *cp = last_char_is(line, '/');
@@ -739,16 +701,11 @@ static void handle_SIGCHLD(int status)
#endif
//usage:#define tar_trivial_usage
//usage: "-[" IF_FEATURE_TAR_CREATE("c") "xt"
//usage: IF_FEATURE_SEAMLESS_Z("Z")
//usage: IF_FEATURE_SEAMLESS_GZ("z")
//usage: IF_FEATURE_SEAMLESS_BZ2("j")
//usage: IF_FEATURE_SEAMLESS_LZMA("a")
//usage: IF_FEATURE_TAR_CREATE("h")
//usage: IF_FEATURE_TAR_NOPRESERVE_TIME("m")
//usage: "vO] "
//usage: IF_FEATURE_TAR_FROM("[-X FILE] [-T FILE] ")
//usage: "[-f TARFILE] [-C DIR] [FILE]..."
//usage: "-[" IF_FEATURE_TAR_CREATE("c") "xt" IF_FEATURE_SEAMLESS_GZ("z")
//usage: IF_FEATURE_SEAMLESS_BZ2("j") IF_FEATURE_SEAMLESS_LZMA("a")
//usage: IF_FEATURE_SEAMLESS_Z("Z") IF_FEATURE_TAR_NOPRESERVE_TIME("m") "vO] "
//usage: IF_FEATURE_TAR_FROM("[-X FILE] ")
//usage: "[-f TARFILE] [-C DIR] [FILE]..."
//usage:#define tar_full_usage "\n\n"
//usage: IF_FEATURE_TAR_CREATE("Create, extract, ")
//usage: IF_NOT_FEATURE_TAR_CREATE("Extract ")
@@ -759,12 +716,10 @@ static void handle_SIGCHLD(int status)
//usage: )
//usage: "\n x Extract"
//usage: "\n t List"
//usage: "\nOptions:"
//usage: "\n f Name of TARFILE ('-' for stdin/out)"
//usage: "\n C Change to DIR before operation"
//usage: "\n v Verbose"
//usage: IF_FEATURE_SEAMLESS_Z(
//usage: "\n Z (De)compress using compress"
//usage: )
//usage: IF_FEATURE_SEAMLESS_GZ(
//usage: "\n z (De)compress using gzip"
//usage: )
@@ -774,6 +729,9 @@ static void handle_SIGCHLD(int status)
//usage: IF_FEATURE_SEAMLESS_LZMA(
//usage: "\n a (De)compress using lzma"
//usage: )
//usage: IF_FEATURE_SEAMLESS_Z(
//usage: "\n Z (De)compress using compress"
//usage: )
//usage: "\n O Extract to stdout"
//usage: IF_FEATURE_TAR_CREATE(
//usage: "\n h Follow symlinks"
@@ -924,7 +882,8 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
/* Prepend '-' to the first argument if required */
opt_complementary = "--:" // first arg is options
"tt:vv:" // count -t,-v
IF_FEATURE_TAR_FROM("X::T::") // cumulative lists
"?:" // bail out with usage instead of error return
"X::T::" // cumulative lists
#if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM
"\xff::" // cumulative lists for --exclude
#endif
@@ -997,7 +956,6 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
putenv((char*)"TAR_FILETYPE=f");
signal(SIGPIPE, SIG_IGN);
tar_handle->action_data = data_extract_to_command;
IF_FEATURE_TAR_TO_COMMAND(tar_handle->tar__to_command_shell = xstrdup(get_shell_name());)
}
if (opt & OPT_KEEP_OLD)
@@ -1079,10 +1037,8 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
tar_handle->src_fd = tar_fd;
tar_handle->seek = seek_by_read;
} else {
if (ENABLE_FEATURE_TAR_AUTODETECT
&& flags == O_RDONLY
&& get_header_ptr == get_header_tar
) {
if (ENABLE_FEATURE_TAR_AUTODETECT && flags == O_RDONLY) {
get_header_ptr = get_header_tar;
tar_handle->src_fd = open_zipped(tar_filename);
if (tar_handle->src_fd < 0)
bb_perror_msg_and_die("can't open '%s'", tar_filename);
-12
View File
@@ -19,18 +19,6 @@
* Zip64 + other methods
*/
//usage:#define unzip_trivial_usage
//usage: "[-opts[modifiers]] FILE[.zip] [LIST] [-x XLIST] [-d DIR]"
//usage:#define unzip_full_usage "\n\n"
//usage: "Extract files from ZIP archives\n"
//usage: "\n -l List archive contents (with -q for short form)"
//usage: "\n -n Never overwrite files (default)"
//usage: "\n -o Overwrite"
//usage: "\n -p Send output to stdout"
//usage: "\n -q Quiet"
//usage: "\n -x XLST Exclude these files"
//usage: "\n -d DIR Extract files into DIR"
#include "libbb.h"
#include "archive.h"
File diff suppressed because it is too large. Load diff
-997
View File
@@ -1,997 +0,0 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.19.0.git
# Sun Jul 10 12:48:50 2011
#
CONFIG_HAVE_DOT_CONFIG=y
#
# Busybox Settings
#
#
# General Configuration
#
CONFIG_DESKTOP=y
# CONFIG_EXTRA_COMPAT is not set
CONFIG_INCLUDE_SUSv2=y
# 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=y
CONFIG_FEATURE_VERBOSE_USAGE=y
CONFIG_FEATURE_COMPRESS_USAGE=y
CONFIG_FEATURE_INSTALLER=y
# CONFIG_INSTALL_NO_USR is not set
# CONFIG_LOCALE_SUPPORT is not set
CONFIG_UNICODE_SUPPORT=y
# CONFIG_UNICODE_USING_LOCALE is not set
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
CONFIG_SUBST_WCHAR=65533
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=y
CONFIG_FEATURE_DEVPTS=y
# CONFIG_FEATURE_CLEAN_UP is not set
# CONFIG_FEATURE_UTMP is not set
# CONFIG_FEATURE_WTMP is not set
CONFIG_FEATURE_PIDFILE=y
CONFIG_FEATURE_SUID=y
# 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=y
CONFIG_CROSS_COMPILER_PREFIX=""
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=y
CONFIG_PASSWORD_MINLEN=6
CONFIG_MD5_SIZE_VS_SPEED=2
CONFIG_FEATURE_FAST_TOP=y
# CONFIG_FEATURE_ETC_NETWORKS is not set
CONFIG_FEATURE_USE_TERMIOS=y
CONFIG_FEATURE_EDITING=y
CONFIG_FEATURE_EDITING_MAX_LEN=1024
# CONFIG_FEATURE_EDITING_VI is not set
CONFIG_FEATURE_EDITING_HISTORY=255
CONFIG_FEATURE_EDITING_SAVEHISTORY=y
CONFIG_FEATURE_TAB_COMPLETION=y
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
CONFIG_FEATURE_NON_POSIX_CP=y
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
CONFIG_FEATURE_COPYBUF_KB=4
CONFIG_FEATURE_SKIP_ROOTFS=y
# CONFIG_MONOTONIC_SYSCALL is not set
CONFIG_IOCTL_HEX2STR_ERROR=y
CONFIG_FEATURE_HWIB=y
#
# 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 is not set
# CONFIG_AR is not set
# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
# CONFIG_FEATURE_AR_CREATE is not set
CONFIG_BUNZIP2=y
CONFIG_BZIP2=y
CONFIG_CPIO=y
CONFIG_FEATURE_CPIO_O=y
CONFIG_FEATURE_CPIO_P=y
# CONFIG_DPKG is not set
# CONFIG_DPKG_DEB is not set
# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
CONFIG_GUNZIP=y
CONFIG_GZIP=y
CONFIG_FEATURE_GZIP_LONG_OPTIONS=y
CONFIG_LZOP=y
# CONFIG_LZOP_COMPR_HIGH is not set
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=y
CONFIG_FEATURE_TAR_TO_COMMAND=y
CONFIG_FEATURE_TAR_UNAME_GNAME=y
CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
# CONFIG_FEATURE_TAR_SELINUX is not set
# CONFIG_UNCOMPRESS is not set
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=y
CONFIG_FEATURE_DATE_ISOFMT=y
# CONFIG_FEATURE_DATE_NANO is not set
CONFIG_FEATURE_DATE_COMPAT=y
CONFIG_ID=y
CONFIG_GROUPS=y
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=y
CONFIG_CHROOT=y
CONFIG_CKSUM=y
CONFIG_COMM=y
CONFIG_CP=y
CONFIG_FEATURE_CP_LONG_OPTIONS=y
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=y
CONFIG_FEATURE_DF_FANCY=y
CONFIG_DIRNAME=y
CONFIG_DOS2UNIX=y
CONFIG_UNIX2DOS=y
CONFIG_DU=y
# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set
CONFIG_ECHO=y
CONFIG_FEATURE_FANCY_ECHO=y
CONFIG_ENV=y
CONFIG_FEATURE_ENV_LONG_OPTIONS=y
CONFIG_EXPAND=y
CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y
CONFIG_EXPR=y
CONFIG_EXPR_MATH_SUPPORT_64=y
CONFIG_FALSE=y
CONFIG_FOLD=y
CONFIG_FSYNC=y
CONFIG_HEAD=y
CONFIG_FEATURE_FANCY_HEAD=y
CONFIG_HOSTID=y
CONFIG_INSTALL=y
CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
CONFIG_LN=y
CONFIG_LOGNAME=y
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=y
CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
CONFIG_MD5SUM=y
CONFIG_MKDIR=y
CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
CONFIG_MKFIFO=y
CONFIG_MKNOD=y
CONFIG_MV=y
CONFIG_FEATURE_MV_LONG_OPTIONS=y
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=y
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=y
CONFIG_UNAME=y
CONFIG_UNEXPAND=y
CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y
CONFIG_UNIQ=y
CONFIG_USLEEP=y
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 is not set
# CONFIG_FGCONSOLE is not set
CONFIG_CLEAR=y
# CONFIG_DEALLOCVT is not set
# CONFIG_DUMPKMAP is not set
# CONFIG_KBD_MODE is not set
# CONFIG_LOADFONT is not set
# CONFIG_LOADKMAP is not set
# CONFIG_OPENVT is not set
CONFIG_RESET=y
CONFIG_RESIZE=y
CONFIG_FEATURE_RESIZE_PRINT=y
# CONFIG_SETCONSOLE is not set
# 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 is not set
# CONFIG_SETLOGCONS is not set
# CONFIG_SHOWKEY is not set
# 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=y
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=y
CONFIG_WHICH=y
#
# Editors
#
CONFIG_PATCH=y
CONFIG_VI=y
CONFIG_FEATURE_VI_MAX_LEN=4096
# CONFIG_FEATURE_VI_8BIT is not set
CONFIG_FEATURE_VI_COLON=y
CONFIG_FEATURE_VI_YANKMARK=y
CONFIG_FEATURE_VI_SEARCH=y
# 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_CMP=y
CONFIG_DIFF=y
CONFIG_FEATURE_DIFF_LONG_OPTIONS=y
CONFIG_FEATURE_DIFF_DIR=y
CONFIG_ED=y
CONFIG_SED=y
CONFIG_FEATURE_ALLOW_EXEC=y
#
# 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_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_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 is not set
# CONFIG_FEATURE_CALL_TELINIT is not set
CONFIG_TELINIT_PATH=""
# CONFIG_INIT is not set
# CONFIG_FEATURE_USE_INITTAB is not set
# CONFIG_FEATURE_KILL_REMOVED is not set
CONFIG_FEATURE_KILL_DELAY=0
# CONFIG_FEATURE_INIT_SCTTY is not set
# CONFIG_FEATURE_INIT_SYSLOG is not set
# CONFIG_FEATURE_EXTRA_QUIET is not set
# CONFIG_FEATURE_INIT_COREDUMPS is not set
# CONFIG_FEATURE_INITRD is not set
CONFIG_INIT_TERMINAL_TYPE=""
CONFIG_MESG=y
CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y
#
# Login/Password Management Utilities
#
CONFIG_ADD_SHELL=y
CONFIG_REMOVE_SHELL=y
CONFIG_FEATURE_SHADOWPASSWDS=y
CONFIG_USE_BB_PWD_GRP=y
CONFIG_USE_BB_SHADOW=y
CONFIG_USE_BB_CRYPT=y
CONFIG_USE_BB_CRYPT_SHA=y
CONFIG_ADDUSER=y
CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
# CONFIG_FEATURE_CHECK_NAMES is not set
CONFIG_FIRST_SYSTEM_ID=100
CONFIG_LAST_SYSTEM_ID=999
CONFIG_ADDGROUP=y
CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y
CONFIG_FEATURE_ADDUSER_TO_GROUP=y
CONFIG_DELUSER=y
CONFIG_DELGROUP=y
CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
# CONFIG_GETTY is not set
CONFIG_LOGIN=y
# CONFIG_PAM is not set
CONFIG_LOGIN_SCRIPTS=y
CONFIG_FEATURE_NOLOGIN=y
CONFIG_FEATURE_SECURETTY=y
CONFIG_PASSWD=y
CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
CONFIG_CRYPTPW=y
CONFIG_CHPASSWD=y
CONFIG_SU=y
CONFIG_FEATURE_SU_SYSLOG=y
CONFIG_FEATURE_SU_CHECKS_SHELLS=y
CONFIG_SULOGIN=y
CONFIG_VLOCK=y
#
# Linux Ext2 FS Progs
#
CONFIG_CHATTR=y
# CONFIG_FSCK is not set
# CONFIG_LSATTR is not set
# CONFIG_TUNE2FS is not set
#
# Linux Module Utilities
#
# CONFIG_MODINFO is not set
# CONFIG_MODPROBE_SMALL is not set
# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
# 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=""
CONFIG_DEFAULT_DEPMOD_FILE=""
#
# Linux System Utilities
#
# CONFIG_BLOCKDEV is not set
CONFIG_REV=y
# CONFIG_ACPID is not set
# CONFIG_FEATURE_ACPID_COMPAT is not set
# CONFIG_BLKID is not set
# CONFIG_FEATURE_BLKID_TYPE is not set
# CONFIG_DMESG is not set
# CONFIG_FEATURE_DMESG_PRETTY is not set
# CONFIG_FBSET is not set
# CONFIG_FEATURE_FBSET_FANCY is not set
# CONFIG_FEATURE_FBSET_READMODE is not set
# CONFIG_FDFLUSH is not set
# CONFIG_FDFORMAT is not set
# CONFIG_FDISK is not set
# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
# CONFIG_FEATURE_FDISK_WRITABLE is not set
# 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 is not set
# CONFIG_FINDFS is not set
CONFIG_FLOCK=y
# CONFIG_FREERAMDISK is not set
CONFIG_FSCK_MINIX=y
# CONFIG_MKFS_EXT2 is not set
# CONFIG_MKFS_MINIX is not set
CONFIG_FEATURE_MINIX2=y
# 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=y
# CONFIG_IPCS is not set
# CONFIG_LOSETUP is not set
# CONFIG_LSPCI is not set
# CONFIG_LSUSB is not set
# 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 is not set
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 is not set
# CONFIG_FEATURE_VOLUMEID_EXT is not set
# CONFIG_FEATURE_VOLUMEID_BTRFS is not set
# CONFIG_FEATURE_VOLUMEID_REISERFS is not set
# CONFIG_FEATURE_VOLUMEID_FAT is not set
# CONFIG_FEATURE_VOLUMEID_HFS is not set
# CONFIG_FEATURE_VOLUMEID_JFS is not set
# CONFIG_FEATURE_VOLUMEID_XFS is not set
# CONFIG_FEATURE_VOLUMEID_NTFS is not set
# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set
# CONFIG_FEATURE_VOLUMEID_UDF is not set
# CONFIG_FEATURE_VOLUMEID_LUKS is not set
# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set
# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set
# CONFIG_FEATURE_VOLUMEID_ROMFS is not set
# CONFIG_FEATURE_VOLUMEID_SYSV is not set
# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set
# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set
#
# Miscellaneous Utilities
#
# CONFIG_CONSPY is not set
# CONFIG_NANDWRITE is not set
# CONFIG_NANDDUMP is not set
# CONFIG_SETSERIAL is not set
# 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 is not set
CONFIG_FEATURE_BEEP_FREQ=0
CONFIG_FEATURE_BEEP_LENGTH_MS=0
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=y
CONFIG_FEATURE_CROND_D=y
CONFIG_FEATURE_CROND_CALL_SENDMAIL=y
CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
CONFIG_CRONTAB=y
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 is not set
# CONFIG_FLASHCP is not set
# CONFIG_FLASH_LOCK is not set
# CONFIG_FLASH_UNLOCK is not set
# CONFIG_FLASH_ERASEALL is not set
# CONFIG_IONICE is not set
# CONFIG_INOTIFYD is not set
# CONFIG_LAST is not set
# CONFIG_FEATURE_LAST_SMALL is not set
# CONFIG_FEATURE_LAST_FANCY 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_DASHCMD=y
CONFIG_FEATURE_LESS_LINENUMS=y
# CONFIG_HDPARM is not set
# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
# CONFIG_MAKEDEVS is not set
# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
CONFIG_MAN=y
# CONFIG_MICROCOM is not set
# CONFIG_MOUNTPOINT is not set
CONFIG_MT=y
# CONFIG_RAIDAUTORUN is not set
# CONFIG_READAHEAD is not set
# CONFIG_RFKILL is not set
# CONFIG_RUNLEVEL is not set
# CONFIG_RX is not set
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 is not set
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=y
# CONFIG_FEATURE_UNIX_LOCAL is not set
CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
# CONFIG_ARP is not set
# 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=y
CONFIG_HOSTNAME=y
CONFIG_HTTPD=y
CONFIG_FEATURE_HTTPD_RANGES=y
# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
CONFIG_FEATURE_HTTPD_SETUID=y
CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
CONFIG_FEATURE_HTTPD_AUTH_MD5=y
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 is not set
# CONFIG_FEATURE_IFCONFIG_STATUS is not set
# CONFIG_FEATURE_IFCONFIG_SLIP is not set
# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
# CONFIG_FEATURE_IFCONFIG_HW is not set
# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
# CONFIG_IFENSLAVE is not set
# CONFIG_IFPLUGD is not set
# CONFIG_IFUPDOWN is not set
CONFIG_IFUPDOWN_IFSTATE_PATH=""
# CONFIG_FEATURE_IFUPDOWN_IP is not set
# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set
# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
CONFIG_INETD=y
CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
# CONFIG_FEATURE_INETD_RPC is not set
# CONFIG_IP is not set
# CONFIG_FEATURE_IP_ADDRESS is not set
# CONFIG_FEATURE_IP_LINK is not set
# CONFIG_FEATURE_IP_ROUTE is not set
# CONFIG_FEATURE_IP_TUNNEL is not set
# CONFIG_FEATURE_IP_RULE is not set
# CONFIG_FEATURE_IP_SHORT_FORMS is not set
# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
# CONFIG_IPADDR is not set
# CONFIG_IPLINK is not set
# CONFIG_IPROUTE is not set
# CONFIG_IPTUNNEL is not set
# CONFIG_IPRULE is not set
CONFIG_IPCALC=y
CONFIG_FEATURE_IPCALC_FANCY=y
CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y
# CONFIG_NETSTAT is not set
# CONFIG_FEATURE_NETSTAT_WIDE is not set
# CONFIG_FEATURE_NETSTAT_PRG is not set
# CONFIG_NSLOOKUP is not set
# CONFIG_NTPD is not set
# CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_PSCAN=y
# CONFIG_ROUTE is not set
# 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_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 is not set
# CONFIG_FEATURE_TUNCTL_UG is not set
# 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 is not set
# CONFIG_FEATURE_UDHCPC_ARPING is not set
# CONFIG_FEATURE_UDHCP_PORT is not set
CONFIG_UDHCP_DEBUG=0
# CONFIG_FEATURE_UDHCP_RFC3397 is not set
# CONFIG_FEATURE_UDHCP_8021Q is not set
CONFIG_UDHCPC_DEFAULT_SCRIPT=""
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=""
CONFIG_UDPSVD=y
# CONFIG_VCONFIG is not set
CONFIG_WGET=y
CONFIG_FEATURE_WGET_STATUSBAR=y
CONFIG_FEATURE_WGET_AUTHENTICATION=y
CONFIG_FEATURE_WGET_LONG_OPTIONS=y
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 is not set
# CONFIG_POWERTOP is not set
CONFIG_PSTREE=y
CONFIG_PWDX=y
CONFIG_SMEMCAP=y
# CONFIG_FREE is not set
CONFIG_FUSER=y
CONFIG_KILL=y
CONFIG_KILLALL=y
CONFIG_KILLALL5=y
CONFIG_PGREP=y
CONFIG_PIDOF=y
CONFIG_FEATURE_PIDOF_SINGLE=y
CONFIG_FEATURE_PIDOF_OMIT=y
CONFIG_PKILL=y
CONFIG_PS=y
CONFIG_FEATURE_PS_WIDE=y
# CONFIG_FEATURE_PS_TIME is not set
CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
# 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 is not set
# 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=y
CONFIG_ASH_BASH_COMPAT=y
# CONFIG_ASH_IDLE_TIMEOUT is not set
CONFIG_ASH_JOB_CONTROL=y
CONFIG_ASH_ALIAS=y
CONFIG_ASH_GETOPTS=y
CONFIG_ASH_BUILTIN_ECHO=y
CONFIG_ASH_BUILTIN_PRINTF=y
CONFIG_ASH_BUILTIN_TEST=y
CONFIG_ASH_CMDCMD=y
# CONFIG_ASH_MAIL is not set
CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
CONFIG_ASH_RANDOM_SUPPORT=y
CONFIG_ASH_EXPAND_PRMT=y
# CONFIG_CTTYHACK is not set
CONFIG_HUSH=y
CONFIG_HUSH_BASH_COMPAT=y
CONFIG_HUSH_BRACE_EXPANSION=y
CONFIG_HUSH_HELP=y
CONFIG_HUSH_INTERACTIVE=y
CONFIG_HUSH_SAVEHISTORY=y
CONFIG_HUSH_JOB=y
CONFIG_HUSH_TICK=y
CONFIG_HUSH_IF=y
CONFIG_HUSH_LOOPS=y
CONFIG_HUSH_CASE=y
CONFIG_HUSH_FUNCTIONS=y
CONFIG_HUSH_LOCAL=y
CONFIG_HUSH_RANDOM_SUPPORT=y
CONFIG_HUSH_EXPORT_N=y
CONFIG_HUSH_MODE_X=y
# CONFIG_MSH is not set
CONFIG_FEATURE_SH_IS_ASH=y
# CONFIG_FEATURE_SH_IS_HUSH is not set
# CONFIG_FEATURE_SH_IS_NONE is not set
# 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=y
CONFIG_SH_MATH_SUPPORT_64=y
CONFIG_FEATURE_SH_EXTRA_QUIET=y
# CONFIG_FEATURE_SH_STANDALONE is not set
# CONFIG_FEATURE_SH_NOFORK is not set
CONFIG_FEATURE_SH_HISTFILESIZE=y
#
# System Logging Utilities
#
CONFIG_SYSLOGD=y
CONFIG_FEATURE_ROTATE_LOGFILE=y
CONFIG_FEATURE_REMOTE_LOG=y
CONFIG_FEATURE_SYSLOGD_DUP=y
CONFIG_FEATURE_SYSLOGD_CFG=y
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
CONFIG_FEATURE_IPC_SYSLOG=y
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
CONFIG_LOGREAD=y
CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
# CONFIG_KLOGD is not set
# CONFIG_FEATURE_KLOGD_KLOGCTL is not set
CONFIG_LOGGER=y
-970
View File
@@ -1,970 +0,0 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.18.1
# Tue Dec 21 19:47:40 2010
#
CONFIG_HAVE_DOT_CONFIG=y
#
# Busybox Settings
#
#
# General Configuration
#
# CONFIG_DESKTOP is not set
# CONFIG_EXTRA_COMPAT is not set
CONFIG_INCLUDE_SUSv2=y
CONFIG_USE_PORTABLE_CODE=y
# CONFIG_PLATFORM_LINUX is not set
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=y
CONFIG_FEATURE_VERBOSE_USAGE=y
CONFIG_FEATURE_COMPRESS_USAGE=y
CONFIG_FEATURE_INSTALLER=y
# CONFIG_INSTALL_NO_USR is not set
CONFIG_LOCALE_SUPPORT=y
CONFIG_UNICODE_SUPPORT=y
# CONFIG_UNICODE_USING_LOCALE is not set
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
CONFIG_SUBST_WCHAR=63
CONFIG_LAST_SUPPORTED_WCHAR=767
# 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=y
CONFIG_FEATURE_DEVPTS=y
# CONFIG_FEATURE_CLEAN_UP is not set
# CONFIG_FEATURE_WTMP is not set
# CONFIG_FEATURE_UTMP is not set
CONFIG_FEATURE_PIDFILE=y
CONFIG_FEATURE_SUID=y
CONFIG_FEATURE_SUID_CONFIG=y
CONFIG_FEATURE_SUID_CONFIG_QUIET=y
# 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=y
CONFIG_CROSS_COMPILER_PREFIX=""
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_PASSWORD_MINLEN=6
CONFIG_MD5_SIZE_VS_SPEED=2
CONFIG_FEATURE_FAST_TOP=y
# CONFIG_FEATURE_ETC_NETWORKS is not set
CONFIG_FEATURE_USE_TERMIOS=y
CONFIG_FEATURE_EDITING=y
CONFIG_FEATURE_EDITING_MAX_LEN=1024
# CONFIG_FEATURE_EDITING_VI is not set
CONFIG_FEATURE_EDITING_HISTORY=30
# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
CONFIG_FEATURE_TAB_COMPLETION=y
# 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=y
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
CONFIG_FEATURE_COPYBUF_KB=4
# CONFIG_MONOTONIC_SYSCALL is not set
CONFIG_IOCTL_HEX2STR_ERROR=y
CONFIG_FEATURE_HWIB=y
#
# 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 is not set
# CONFIG_FEATURE_CPIO_P is not set
# CONFIG_DPKG is not set
# CONFIG_DPKG_DEB is not set
# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
CONFIG_GUNZIP=y
CONFIG_GZIP=y
CONFIG_FEATURE_GZIP_LONG_OPTIONS=y
CONFIG_LZOP=y
# CONFIG_LZOP_COMPR_HIGH is not set
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=y
CONFIG_FEATURE_TAR_TO_COMMAND=y
# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
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_TEST=y
CONFIG_FEATURE_TEST_64=y
CONFIG_TR=y
CONFIG_FEATURE_TR_CLASSES=y
CONFIG_FEATURE_TR_EQUIV=y
# CONFIG_BASE64 is not set
CONFIG_CAL=y
CONFIG_CATV=y
CONFIG_CHGRP=y
CONFIG_CHMOD=y
CONFIG_CHOWN=y
CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y
CONFIG_CHROOT=y
CONFIG_CKSUM=y
CONFIG_COMM=y
CONFIG_CP=y
CONFIG_FEATURE_CP_LONG_OPTIONS=y
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=y
CONFIG_FEATURE_ENV_LONG_OPTIONS=y
CONFIG_EXPAND=y
CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y
CONFIG_EXPR=y
CONFIG_EXPR_MATH_SUPPORT_64=y
CONFIG_FALSE=y
CONFIG_FOLD=y
CONFIG_FSYNC=y
CONFIG_HEAD=y
CONFIG_FEATURE_FANCY_HEAD=y
CONFIG_HOSTID=y
CONFIG_ID=y
CONFIG_INSTALL=y
CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
CONFIG_LENGTH=y
CONFIG_LN=y
CONFIG_LOGNAME=y
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=y
CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
CONFIG_MD5SUM=y
CONFIG_MKDIR=y
CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
CONFIG_MKFIFO=y
# CONFIG_MKNOD is not set
CONFIG_MV=y
CONFIG_FEATURE_MV_LONG_OPTIONS=y
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 is not set
CONFIG_SUM=y
CONFIG_SYNC=y
# CONFIG_TAC is not set
CONFIG_TAIL=y
CONFIG_FEATURE_FANCY_TAIL=y
CONFIG_TEE=y
CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
CONFIG_TOUCH=y
CONFIG_TRUE=y
CONFIG_TTY=y
CONFIG_UNAME=y
CONFIG_UNEXPAND=y
CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y
CONFIG_UNIQ=y
CONFIG_USLEEP=y
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 is not set
# CONFIG_FGCONSOLE is not set
CONFIG_CLEAR=y
# CONFIG_DEALLOCVT is not set
# CONFIG_DUMPKMAP is not set
# CONFIG_KBD_MODE is not set
# CONFIG_LOADFONT is not set
# CONFIG_LOADKMAP is not set
# CONFIG_OPENVT is not set
CONFIG_RESET=y
CONFIG_RESIZE=y
CONFIG_FEATURE_RESIZE_PRINT=y
# CONFIG_SETCONSOLE is not set
# 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 is not set
# CONFIG_SETLOGCONS is not set
# CONFIG_SHOWKEY is not set
# 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=y
CONFIG_FEATURE_RUN_PARTS_FANCY=y
# CONFIG_START_STOP_DAEMON is not set
# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
CONFIG_WHICH=y
#
# Editors
#
CONFIG_PATCH=y
CONFIG_AWK=y
CONFIG_FEATURE_AWK_LIBM=y
CONFIG_CMP=y
CONFIG_DIFF=y
CONFIG_FEATURE_DIFF_LONG_OPTIONS=y
CONFIG_FEATURE_DIFF_DIR=y
CONFIG_ED=y
CONFIG_SED=y
CONFIG_VI=y
CONFIG_FEATURE_VI_MAX_LEN=1024
CONFIG_FEATURE_VI_8BIT=y
CONFIG_FEATURE_VI_COLON=y
CONFIG_FEATURE_VI_YANKMARK=y
CONFIG_FEATURE_VI_SEARCH=y
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_FEATURE_ALLOW_EXEC=y
#
# 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_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_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 is not set
# CONFIG_FEATURE_CALL_TELINIT is not set
CONFIG_TELINIT_PATH=""
# CONFIG_INIT is not set
# CONFIG_FEATURE_USE_INITTAB is not set
# CONFIG_FEATURE_KILL_REMOVED is not set
CONFIG_FEATURE_KILL_DELAY=0
# CONFIG_FEATURE_INIT_SCTTY is not set
# CONFIG_FEATURE_INIT_SYSLOG is not set
# CONFIG_FEATURE_EXTRA_QUIET is not set
# CONFIG_FEATURE_INIT_COREDUMPS is not set
# CONFIG_FEATURE_INITRD is not set
CONFIG_INIT_TERMINAL_TYPE=""
# CONFIG_MESG is not set
#
# 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=y
# 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=100
CONFIG_LAST_SYSTEM_ID=999
CONFIG_ADDGROUP=y
CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y
CONFIG_FEATURE_ADDUSER_TO_GROUP=y
# CONFIG_DELUSER is not set
CONFIG_DELGROUP=y
CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
# 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 is not set
# CONFIG_TUNE2FS is not set
# CONFIG_MODINFO is not set
# CONFIG_MODPROBE_SMALL is not set
# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
# 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
# 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=""
CONFIG_DEFAULT_DEPMOD_FILE=""
#
# Linux System Utilities
#
# CONFIG_BLOCKDEV is not set
CONFIG_REV=y
# CONFIG_ACPID is not set
# CONFIG_FEATURE_ACPID_COMPAT is not set
# CONFIG_BLKID is not set
# CONFIG_DMESG is not set
# CONFIG_FEATURE_DMESG_PRETTY is not set
# CONFIG_FBSET is not set
# CONFIG_FEATURE_FBSET_FANCY is not set
# CONFIG_FEATURE_FBSET_READMODE is not set
# CONFIG_FDFLUSH is not set
# CONFIG_FDFORMAT is not set
# CONFIG_FDISK is not set
CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
# CONFIG_FEATURE_FDISK_WRITABLE is not set
# 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 is not set
# CONFIG_FINDFS is not set
CONFIG_FLOCK=y
# CONFIG_FREERAMDISK is not set
# 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 is not set
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 is not set
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 is not set
# CONFIG_FEATURE_MKSWAP_UUID is not set
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 is not set
CONFIG_READPROFILE=y
# CONFIG_RTCWAKE is not set
# CONFIG_SCRIPT is not set
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 is not set
# CONFIG_FEATURE_VOLUMEID_EXT is not set
# CONFIG_FEATURE_VOLUMEID_BTRFS is not set
# CONFIG_FEATURE_VOLUMEID_REISERFS is not set
# CONFIG_FEATURE_VOLUMEID_FAT is not set
# CONFIG_FEATURE_VOLUMEID_HFS is not set
# CONFIG_FEATURE_VOLUMEID_JFS is not set
# CONFIG_FEATURE_VOLUMEID_XFS is not set
# CONFIG_FEATURE_VOLUMEID_NTFS is not set
# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set
# CONFIG_FEATURE_VOLUMEID_UDF is not set
# CONFIG_FEATURE_VOLUMEID_LUKS is not set
# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set
# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set
# CONFIG_FEATURE_VOLUMEID_ROMFS is not set
# CONFIG_FEATURE_VOLUMEID_SYSV is not set
# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set
# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set
#
# Miscellaneous Utilities
#
# CONFIG_CONSPY is not set
# CONFIG_NANDWRITE is not set
# CONFIG_NANDDUMP is not set
# CONFIG_UBIATTACH is not set
# CONFIG_UBIDETACH is not set
# CONFIG_ADJTIMEX is not set
# CONFIG_BBCONFIG is not set
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
# CONFIG_BEEP is not set
CONFIG_FEATURE_BEEP_FREQ=0
CONFIG_FEATURE_BEEP_LENGTH_MS=0
# CONFIG_CHAT is not set
# CONFIG_FEATURE_CHAT_NOFAIL is not set
# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set
# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set
# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set
# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set
# CONFIG_FEATURE_CHAT_CLR_ABORT is not set
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="/var/spool/cron"
CONFIG_CRONTAB=y
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 is not set
# CONFIG_EJECT is not set
# CONFIG_FEATURE_EJECT_SCSI is not set
# CONFIG_FBSPLASH is not set
# CONFIG_FLASHCP is not set
# CONFIG_FLASH_LOCK is not set
# CONFIG_FLASH_UNLOCK is not set
# CONFIG_FLASH_ERASEALL is not set
# CONFIG_IONICE is not set
# CONFIG_INOTIFYD is not set
# CONFIG_LAST is not set
# CONFIG_FEATURE_LAST_SMALL is not set
# CONFIG_FEATURE_LAST_FANCY 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 is not set
# CONFIG_FEATURE_LESS_DASHCMD is not set
# CONFIG_FEATURE_LESS_LINENUMS is not set
# CONFIG_HDPARM is not set
# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
# CONFIG_MAKEDEVS is not set
# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
# CONFIG_MAN is not set
CONFIG_MICROCOM=y
# CONFIG_MOUNTPOINT is not set
# CONFIG_MT is not set
# CONFIG_RAIDAUTORUN is not set
# CONFIG_READAHEAD is not set
# CONFIG_RFKILL is not set
# CONFIG_RUNLEVEL is not set
# CONFIG_RX is not set
CONFIG_SETSID=y
CONFIG_STRINGS=y
# CONFIG_TASKSET is not set
# CONFIG_FEATURE_TASKSET_FANCY is not set
# CONFIG_TIME is not set
CONFIG_TIMEOUT=y
CONFIG_TTYSIZE=y
CONFIG_VOLNAME=y
# CONFIG_WALL is not set
# CONFIG_WATCHDOG is not set
#
# Networking Utilities
#
# CONFIG_NBDCLIENT is not set
CONFIG_NC=y
# CONFIG_NC_SERVER is not set
# CONFIG_NC_EXTRA is not set
# CONFIG_NC_110_COMPAT is not set
# 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 is not set
# 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=y
CONFIG_HOSTNAME=y
CONFIG_HTTPD=y
CONFIG_FEATURE_HTTPD_RANGES=y
# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
# CONFIG_FEATURE_HTTPD_SETUID is not set
CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
CONFIG_FEATURE_HTTPD_AUTH_MD5=y
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 is not set
# CONFIG_FEATURE_IFCONFIG_STATUS is not set
# CONFIG_FEATURE_IFCONFIG_SLIP is not set
# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
# CONFIG_FEATURE_IFCONFIG_HW is not set
# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
# CONFIG_IFENSLAVE is not set
# CONFIG_IFPLUGD is not set
# CONFIG_IFUPDOWN is not set
CONFIG_IFUPDOWN_IFSTATE_PATH=""
# CONFIG_FEATURE_IFUPDOWN_IP is not set
# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set
# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
# 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 is not set
# CONFIG_FEATURE_IP_ADDRESS is not set
# CONFIG_FEATURE_IP_LINK is not set
# CONFIG_FEATURE_IP_ROUTE is not set
# CONFIG_FEATURE_IP_TUNNEL is not set
# CONFIG_FEATURE_IP_RULE is not set
# CONFIG_FEATURE_IP_SHORT_FORMS is not set
# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
# CONFIG_IPADDR is not set
# CONFIG_IPLINK is not set
# CONFIG_IPROUTE is not set
# CONFIG_IPTUNNEL is not set
# CONFIG_IPRULE is not set
CONFIG_IPCALC=y
CONFIG_FEATURE_IPCALC_FANCY=y
CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y
# CONFIG_NAMEIF is not set
# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
# CONFIG_NETSTAT is not set
# CONFIG_FEATURE_NETSTAT_WIDE is not set
# CONFIG_FEATURE_NETSTAT_PRG is not set
# CONFIG_NSLOOKUP is not set
# CONFIG_NTPD is not set
# CONFIG_FEATURE_NTPD_SERVER is not set
# CONFIG_PING is not set
# CONFIG_PING6 is not set
# CONFIG_FEATURE_FANCY_PING is not set
CONFIG_PSCAN=y
# CONFIG_ROUTE is not set
# CONFIG_SLATTACH is not set
# CONFIG_TCPSVD is not set
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_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 is not set
# CONFIG_FEATURE_TUNCTL_UG is not set
# 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_DHCPD_LEASES_FILE=""
# CONFIG_UDHCPC is not set
# CONFIG_FEATURE_UDHCPC_ARPING is not set
# CONFIG_FEATURE_UDHCP_PORT is not set
CONFIG_UDHCP_DEBUG=0
# CONFIG_FEATURE_UDHCP_RFC3397 is not set
CONFIG_UDHCPC_DEFAULT_SCRIPT=""
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=""
# 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=y
CONFIG_FEATURE_WGET_TIMEOUT=y
# CONFIG_ZCIP is not set
#
# Print Utilities
#
# CONFIG_LPD is not set
CONFIG_LPR=y
CONFIG_LPQ=y
#
# Mail Utilities
#
# CONFIG_MAKEMIME is not set
CONFIG_FEATURE_MIME_CHARSET=""
# CONFIG_POPMAILDIR is not set
# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set
# CONFIG_REFORMIME is not set
# CONFIG_FEATURE_REFORMIME_COMPAT is not set
# CONFIG_SENDMAIL is not set
#
# Process Utilities
#
CONFIG_IOSTAT=y
CONFIG_MPSTAT=y
CONFIG_PMAP=y
CONFIG_POWERTOP=y
CONFIG_SMEMCAP=y
# CONFIG_FREE is not set
# CONFIG_FUSER is not set
CONFIG_KILL=y
CONFIG_KILLALL=y
CONFIG_KILLALL5=y
# CONFIG_NMETER is not set
CONFIG_PGREP=y
# CONFIG_PIDOF is not set
# CONFIG_FEATURE_PIDOF_SINGLE is not set
# CONFIG_FEATURE_PIDOF_OMIT is not set
CONFIG_PKILL=y
CONFIG_PS=y
CONFIG_FEATURE_PS_WIDE=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
# CONFIG_TOP is not set
# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set
# CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS is not set
# CONFIG_FEATURE_TOP_SMP_CPU is not set
# CONFIG_FEATURE_TOP_DECIMALS is not set
# CONFIG_FEATURE_TOP_SMP_PROCESS is not set
# CONFIG_FEATURE_TOPMEM is not set
CONFIG_FEATURE_SHOW_THREADS=y
# CONFIG_UPTIME is not set
CONFIG_WATCH=y
#
# Runit Utilities
#
# CONFIG_RUNSV is not set
# CONFIG_RUNSVDIR is not set
# CONFIG_FEATURE_RUNSVDIR_LOG is not set
# CONFIG_SV is not set
CONFIG_SV_DEFAULT_SERVICE_DIR=""
# CONFIG_SVLOGD is not set
# CONFIG_CHPST is not set
# CONFIG_SETUIDGID is not set
# CONFIG_ENVUIDGID is not set
# CONFIG_ENVDIR is not set
# CONFIG_SOFTLIMIT is not set
# 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=y
# CONFIG_ASH_BASH_COMPAT 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 is not set
# 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=y
# CONFIG_FEATURE_SH_IS_HUSH is not set
# CONFIG_FEATURE_SH_IS_NONE is not set
# 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=y
CONFIG_SH_MATH_SUPPORT_64=y
# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
# CONFIG_FEATURE_SH_STANDALONE is not set
# CONFIG_FEATURE_SH_NOFORK is not set
#
# System Logging Utilities
#
CONFIG_SYSLOGD=y
CONFIG_FEATURE_ROTATE_LOGFILE=y
CONFIG_FEATURE_REMOTE_LOG=y
# CONFIG_FEATURE_SYSLOGD_DUP is not set
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
CONFIG_FEATURE_IPC_SYSLOG=y
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
CONFIG_LOGREAD=y
CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
# CONFIG_KLOGD is not set
# CONFIG_FEATURE_KLOGD_KLOGCTL is not set
CONFIG_LOGGER=y
+13 -13
View File
@@ -10,7 +10,7 @@ INSERT
config CHVT
bool "chvt"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program is used to change to another terminal.
Example: chvt 4 (change to terminal /dev/tty4)
@@ -18,7 +18,7 @@ config CHVT
config FGCONSOLE
bool "fgconsole"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program prints active (foreground) console number.
@@ -31,14 +31,14 @@ config CLEAR
config DEALLOCVT
bool "deallocvt"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program deallocates unused virtual consoles.
config DUMPKMAP
bool "dumpkmap"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program dumps the kernel's keyboard translation table to
stdout, in binary format. You can then use loadkmap to load it.
@@ -46,21 +46,21 @@ config DUMPKMAP
config KBD_MODE
bool "kbd_mode"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program reports and sets keyboard mode.
config LOADFONT
bool "loadfont"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program loads a console font from standard input.
config LOADKMAP
bool "loadkmap"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program loads a keyboard translation table from
standard input.
@@ -68,7 +68,7 @@ config LOADKMAP
config OPENVT
bool "openvt"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program is used to start a command on an unused
virtual terminal.
@@ -100,7 +100,7 @@ config FEATURE_RESIZE_PRINT
config SETCONSOLE
bool "setconsole"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program redirects the system console to another device,
like the current tty while logged in via telnet.
@@ -115,7 +115,7 @@ config FEATURE_SETCONSOLE_LONG_OPTIONS
config SETFONT
bool "setfont"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
Allows to load console screen map. Useful for i18n.
@@ -137,7 +137,7 @@ config DEFAULT_SETFONT_DIR
config SETKEYCODES
bool "setkeycodes"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program loads entries into the kernel's scancode-to-keycode
map, allowing unusual keyboards to generate usable keycodes.
@@ -145,14 +145,14 @@ config SETKEYCODES
config SETLOGCONS
bool "setlogcons"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
This program redirects the output console of kernel messages.
config SHOWKEY
bool "showkey"
default y
select PLATFORM_LINUX
depends on PLATFORM_LINUX
help
Shows keys pressed.
-6
View File
@@ -6,12 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define chvt_trivial_usage
//usage: "N"
//usage:#define chvt_full_usage "\n\n"
//usage: "Change the foreground virtual terminal to /dev/ttyN"
#include "libbb.h"
int chvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-6
View File
@@ -6,12 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define clear_trivial_usage
//usage: ""
//usage:#define clear_full_usage "\n\n"
//usage: "Clear screen"
#include "libbb.h"
int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-5
View File
@@ -10,11 +10,6 @@
/* no options, no getopt */
//usage:#define deallocvt_trivial_usage
//usage: "[N]"
//usage:#define deallocvt_full_usage "\n\n"
//usage: "Deallocate unused virtual terminal /dev/ttyN"
#include "libbb.h"
/* From <linux/vt.h> */
-8
View File
@@ -9,14 +9,6 @@
*/
/* no options, no getopt */
//usage:#define dumpkmap_trivial_usage
//usage: "> keymap"
//usage:#define dumpkmap_full_usage "\n\n"
//usage: "Print a binary keyboard translation table to stdout"
//usage:
//usage:#define dumpkmap_example_usage
//usage: "$ dumpkmap > keymap\n"
#include "libbb.h"
/* From <linux/kd.h> */
-5
View File
@@ -7,11 +7,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define fgconsole_trivial_usage
//usage: ""
//usage:#define fgconsole_full_usage "\n\n"
//usage: "Get active console"
#include "libbb.h"
/* From <linux/vt.h> */
-11
View File
@@ -8,17 +8,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define kbd_mode_trivial_usage
//usage: "[-a|k|s|u] [-C TTY]"
//usage:#define kbd_mode_full_usage "\n\n"
//usage: "Report or set the keyboard mode\n"
//usage: "\n -a Default (ASCII)"
//usage: "\n -k Medium-raw (keyboard)"
//usage: "\n -s Raw (scancode)"
//usage: "\n -u Unicode (utf-8)"
//usage: "\n -C TTY Affect TTY instead of /dev/tty"
#include "libbb.h"
#include <linux/kd.h>
-20
View File
@@ -9,26 +9,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
//usage:#define loadfont_trivial_usage
//usage: "< font"
//usage:#define loadfont_full_usage "\n\n"
//usage: "Load a console font from stdin"
/* //usage: "\n -C TTY Affect TTY instead of /dev/tty" */
//usage:
//usage:#define loadfont_example_usage
//usage: "$ loadfont < /etc/i18n/fontname\n"
//usage:
//usage:#define setfont_trivial_usage
//usage: "FONT [-m MAPFILE] [-C TTY]"
//usage:#define setfont_full_usage "\n\n"
//usage: "Load a console font\n"
//usage: "\n -m MAPFILE Load console screen map"
//usage: "\n -C TTY Affect TTY instead of /dev/tty"
//usage:
//usage:#define setfont_example_usage
//usage: "$ setfont -m koi8-r /etc/i18n/fontname\n"
#include "libbb.h"
#include <sys/kd.h>
-10
View File
@@ -6,16 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define loadkmap_trivial_usage
//usage: "< keymap"
//usage:#define loadkmap_full_usage "\n\n"
//usage: "Load a binary keyboard translation table from stdin\n"
/* //usage: "\n -C TTY Affect TTY instead of /dev/tty" */
//usage:
//usage:#define loadkmap_example_usage
//usage: "$ loadkmap < /etc/i18n/lang-keymap\n"
#include "libbb.h"
#define BINARY_KEYMAP_MAGIC "bkeymap"
+3 -13
View File
@@ -8,18 +8,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define openvt_trivial_usage
//usage: "[-c N] [-sw] [PROG ARGS]"
//usage:#define openvt_full_usage "\n\n"
//usage: "Start PROG on a new virtual terminal\n"
//usage: "\n -c N Use specified VT"
//usage: "\n -s Switch to the VT"
/* //usage: "\n -l Run PROG as login shell (by prepending '-')" */
//usage: "\n -w Wait for PROG to exit"
//usage:
//usage:#define openvt_example_usage
//usage: "openvt 2 /bin/ash\n"
#include <linux/vt.h>
#include "libbb.h"
@@ -156,7 +144,9 @@ int openvt_main(int argc UNUSED_PARAM, char **argv)
if (!argv[0]) {
argv--;
argv[0] = (char *) get_shell_name();
argv[0] = getenv("SHELL");
if (!argv[0])
argv[0] = (char *) DEFAULT_SHELL;
/*argv[1] = NULL; - already is */
}
+2 -7
View File
@@ -11,11 +11,6 @@
/* BTW, which "standard" package has this utility? It doesn't seem
* to be ncurses, coreutils, console-tools... then what? */
//usage:#define reset_trivial_usage
//usage: ""
//usage:#define reset_full_usage "\n\n"
//usage: "Reset the screen"
#include "libbb.h"
#define ESC "\033"
@@ -36,12 +31,12 @@ int reset_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
if (/*isatty(STDIN_FILENO) &&*/ isatty(STDOUT_FILENO)) {
/* See 'man 4 console_codes' for details:
* "ESC c" -- Reset
* "ESC ( B" -- Select G0 Character Set (B = US)
* "ESC ( K" -- Select user mapping
* "ESC [ 0 m" -- Reset all display attributes
* "ESC [ J" -- Erase to the end of screen
* "ESC [ ? 25 h" -- Make cursor visible
*/
printf(ESC"c" ESC"(B" ESC"[0m" ESC"[J" ESC"[?25h");
printf(ESC"c" ESC"(K" ESC"[0m" ESC"[J" ESC"[?25h");
/* http://bugs.busybox.net/view.php?id=1414:
* people want it to reset echo etc: */
#if ENABLE_STTY
-7
View File
@@ -7,12 +7,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
/* no options, no getopt */
//usage:#define resize_trivial_usage
//usage: ""
//usage:#define resize_full_usage "\n\n"
//usage: "Resize the screen"
#include "libbb.h"
#define ESC "\033"
@@ -59,7 +53,6 @@ int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
*/
fprintf(stderr, ESC"7" ESC"[r" ESC"[999;999H" ESC"[6n");
alarm(3); /* Just in case terminal won't answer */
//BUG: death by signal won't restore termios
scanf(ESC"[%hu;%huR", &w.ws_row, &w.ws_col);
fprintf(stderr, ESC"8");
+1 -7
View File
@@ -8,12 +8,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define setconsole_trivial_usage
//usage: "[-r" IF_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]"
//usage:#define setconsole_full_usage "\n\n"
//usage: "Redirect system console output to DEVICE (default: /dev/tty)\n"
//usage: "\n -r Reset output to /dev/console"
#include "libbb.h"
int setconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -40,6 +34,6 @@ int setconsole_main(int argc UNUSED_PARAM, char **argv)
device = DEV_CONSOLE;
}
xioctl(xopen(device, O_WRONLY), TIOCCONS, NULL);
xioctl(xopen(device, O_RDONLY), TIOCCONS, NULL);
return EXIT_SUCCESS;
}
-12
View File
@@ -8,18 +8,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define setkeycodes_trivial_usage
//usage: "SCANCODE KEYCODE..."
//usage:#define setkeycodes_full_usage "\n\n"
//usage: "Set entries into the kernel's scancode-to-keycode map,\n"
//usage: "allowing unusual keyboards to generate usable keycodes.\n\n"
//usage: "SCANCODE may be either xx or e0xx (hexadecimal),\n"
//usage: "and KEYCODE is given in decimal."
//usage:
//usage:#define setkeycodes_example_usage
//usage: "$ setkeycodes e030 127\n"
#include "libbb.h"
/* From <linux/kd.h> */
-5
View File
@@ -9,11 +9,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define setlogcons_trivial_usage
//usage: "N"
//usage:#define setlogcons_full_usage "\n\n"
//usage: "Redirect the kernel output to console N (0 for current)"
#include "libbb.h"
int setlogcons_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+13 -32
View File
@@ -7,14 +7,6 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
//usage:#define showkey_trivial_usage
//usage: "[-a | -k | -s]"
//usage:#define showkey_full_usage "\n\n"
//usage: "Show keys pressed\n"
//usage: "\n -a Display decimal/octal/hex values of the keys"
//usage: "\n -k Display interpreted keycodes (default)"
//usage: "\n -s Display raw scan-codes"
#include "libbb.h"
#include <linux/kd.h>
@@ -64,45 +56,37 @@ int showkey_main(int argc UNUSED_PARAM, char **argv)
// FIXME: aks are all mutually exclusive
getopt32(argv, "aks");
// get keyboard settings
xioctl(STDIN_FILENO, KDGKBMODE, &kbmode);
printf("kb mode was %s\n\nPress any keys. Program terminates %s\n\n",
kbmode == K_RAW ? "RAW" :
(kbmode == K_XLATE ? "XLATE" :
(kbmode == K_MEDIUMRAW ? "MEDIUMRAW" :
(kbmode == K_UNICODE ? "UNICODE" : "UNKNOWN")))
, (option_mask32 & OPT_a) ? "on EOF (ctrl-D)" : "10s after last keypress"
);
// prepare for raw mode
xget1(&tio, &tio0);
// put stdin in raw mode
xset1(&tio);
#define press_keys "Press any keys, program terminates %s:\r\n\n"
if (option_mask32 & OPT_a) {
// just read stdin char by char
unsigned char c;
printf(press_keys, "on EOF (ctrl-D)");
// read and show byte values
// just read stdin char by char
while (1 == read(STDIN_FILENO, &c, 1)) {
printf("%3u 0%03o 0x%02x\r\n", c, c, c);
if (04 /*CTRL-D*/ == c)
break;
}
} else {
// we assume a PC keyboard
xioctl(STDIN_FILENO, KDGKBMODE, &kbmode);
printf("Keyboard mode was %s.\r\n\n",
kbmode == K_RAW ? "RAW" :
(kbmode == K_XLATE ? "XLATE" :
(kbmode == K_MEDIUMRAW ? "MEDIUMRAW" :
(kbmode == K_UNICODE ? "UNICODE" : "UNKNOWN")))
);
// set raw keyboard mode
xioctl(STDIN_FILENO, KDSKBMODE, (void *)(ptrdiff_t)((option_mask32 & OPT_k) ? K_MEDIUMRAW : K_RAW));
// we should exit on any signal; signals should interrupt read
bb_signals_recursive_norestart(BB_FATAL_SIGS, record_signo);
// inform user that program ends after time of inactivity
printf(press_keys, "10s after last keypress");
// read and show scancodes
while (!bb_got_signal) {
char buf[18];
@@ -110,7 +94,6 @@ int showkey_main(int argc UNUSED_PARAM, char **argv)
// setup 10s watchdog
alarm(10);
// read scancodes
n = read(STDIN_FILENO, buf, sizeof(buf));
i = 0;
@@ -138,13 +121,11 @@ int showkey_main(int argc UNUSED_PARAM, char **argv)
}
puts("\r");
}
// restore keyboard mode
xioctl(STDIN_FILENO, KDSKBMODE, (void *)(ptrdiff_t)kbmode);
}
// restore console settings
// restore keyboard and console settings
xset1(&tio0);
xioctl(STDIN_FILENO, KDSKBMODE, (void *)(ptrdiff_t)kbmode);
return EXIT_SUCCESS;
}
+26 -6
View File
@@ -276,6 +276,12 @@ config HOSTID
hostid prints the numeric identifier (in hexadecimal) for
the current host.
config ID
bool "id"
default y
help
id displays the current user and group ID names.
config INSTALL
bool "install"
default y
@@ -289,11 +295,11 @@ config FEATURE_INSTALL_LONG_OPTIONS
help
Support long options for the install applet.
####config LENGTH
#### bool "length"
#### default y
#### help
#### length is used to print out the length of a specified string.
config LENGTH
bool "length"
default y
help
length is used to print out the length of a specified string.
config LN
bool "ln"
@@ -585,7 +591,7 @@ config FEATURE_SPLIT_FANCY
config STAT
bool "stat"
default y
select PLATFORM_LINUX # statfs()
depends on PLATFORM_LINUX # statfs()
help
display file or filesystem status.
@@ -655,6 +661,13 @@ config FEATURE_TEE_USE_BLOCK_IO
help
Enable this option for a faster tee, at expense of size.
config TOUCH
bool "touch"
default y
help
touch is used to create or change the access and/or
modification timestamp of specified files.
config TRUE
bool "true"
default y
@@ -725,6 +738,13 @@ config FEATURE_WC_LARGE
help
Use "unsigned long long" in wc for counter variables.
config WHO
bool "who"
default y
depends on FEATURE_UTMP
help
who is used to show who is logged on.
config WHOAMI
bool "whoami"
default y
+4 -1
View File
@@ -37,8 +37,9 @@ lib-$(CONFIG_FOLD) += fold.o
lib-$(CONFIG_FSYNC) += fsync.o
lib-$(CONFIG_HEAD) += head.o
lib-$(CONFIG_HOSTID) += hostid.o
lib-$(CONFIG_ID) += id.o
lib-$(CONFIG_INSTALL) += install.o
#lib-$(CONFIG_LENGTH) += length.o
lib-$(CONFIG_LENGTH) += length.o
lib-$(CONFIG_LN) += ln.o
lib-$(CONFIG_LOGNAME) += logname.o
lib-$(CONFIG_LS) += ls.o
@@ -73,6 +74,7 @@ lib-$(CONFIG_SYNC) += sync.o
lib-$(CONFIG_TAC) += tac.o
lib-$(CONFIG_TAIL) += tail.o
lib-$(CONFIG_TEE) += tee.o
lib-$(CONFIG_TOUCH) += touch.o
lib-$(CONFIG_TRUE) += true.o
lib-$(CONFIG_TTY) += tty.o
lib-$(CONFIG_UNAME) += uname.o
@@ -82,5 +84,6 @@ lib-$(CONFIG_USLEEP) += usleep.o
lib-$(CONFIG_UUDECODE) += uudecode.o
lib-$(CONFIG_UUENCODE) += uuencode.o
lib-$(CONFIG_WC) += wc.o
lib-$(CONFIG_WHO) += who.o
lib-$(CONFIG_WHOAMI) += whoami.o
lib-$(CONFIG_YES) += yes.o
-18
View File
@@ -28,19 +28,6 @@
//config: leaving just the filename itself. Enable this option if you wish
//config: to enable the 'basename' utility.
//usage:#define basename_trivial_usage
//usage: "FILE [SUFFIX]"
//usage:#define basename_full_usage "\n\n"
//usage: "Strip directory path and .SUFFIX from FILE\n"
//usage:
//usage:#define basename_example_usage
//usage: "$ basename /usr/local/bin/foo\n"
//usage: "foo\n"
//usage: "$ basename /usr/local/bin/\n"
//usage: "bin\n"
//usage: "$ basename /foo/bar.txt .txt\n"
//usage: "bar"
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
@@ -51,11 +38,6 @@ int basename_main(int argc, char **argv)
size_t m, n;
char *s;
if (argv[1] && strcmp(argv[1], "--") == 0) {
argv++;
argc--;
}
if ((unsigned)(argc-2) >= 2) {
bb_show_usage();
}
+1 -9
View File
@@ -16,14 +16,6 @@
*
* Major size reduction... over 50% (>1.5k) on i386.
*/
//usage:#define cal_trivial_usage
//usage: "[-jy] [[MONTH] YEAR]"
//usage:#define cal_full_usage "\n\n"
//usage: "Display a calendar\n"
//usage: "\n -j Use julian dates"
//usage: "\n -y Display the entire year"
#include "libbb.h"
#include "unicode.h"
@@ -146,7 +138,7 @@ int cal_main(int argc UNUSED_PARAM, char **argv)
if (julian)
*hp++ = ' ';
{
char *two_wchars = unicode_conv_to_printable_fixedwidth(/*NULL,*/ buf, 2);
char *two_wchars = unicode_conv_to_printable_fixedwidth(NULL, buf, 2);
strcpy(hp, two_wchars);
free(two_wchars);
}
-9
View File
@@ -22,15 +22,6 @@
//config: cat is used to concatenate files and print them to the standard
//config: output. Enable this option if you wish to enable the 'cat' utility.
//usage:#define cat_trivial_usage
//usage: "[FILE]..."
//usage:#define cat_full_usage "\n\n"
//usage: "Concatenate FILEs and print them to stdout"
//usage:
//usage:#define cat_example_usage
//usage: "$ cat /proc/uptime\n"
//usage: "110716.72 17.67"
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
-8
View File
@@ -10,14 +10,6 @@
/* See "Cat -v considered harmful" at
* http://cm.bell-labs.com/cm/cs/doc/84/kp.ps.gz */
//usage:#define catv_trivial_usage
//usage: "[-etv] [FILE]..."
//usage:#define catv_full_usage "\n\n"
//usage: "Display nonprinting characters as ^x or M-x\n"
//usage: "\n -e End each line with $"
//usage: "\n -t Show tabs as ^I"
//usage: "\n -v Don't use ^x or M-x escapes"
#include "libbb.h"
int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-22
View File
@@ -11,28 +11,6 @@
/* BB_AUDIT GNU defects - unsupported long options. */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/chgrp.html */
//usage:#define chgrp_trivial_usage
//usage: "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..."
//usage:#define chgrp_full_usage "\n\n"
//usage: "Change the group membership of each FILE to GROUP\n"
//usage: "\n -R Recurse"
//usage: "\n -h Affect symlinks instead of symlink targets"
//usage: "\n -L Traverse all symlinks to directories"
//usage: "\n -H Traverse symlinks on command line only"
//usage: "\n -P Don't traverse symlinks (default)"
//usage: IF_DESKTOP(
//usage: "\n -c List changed files"
//usage: "\n -v Verbose"
//usage: "\n -f Hide errors"
//usage: )
//usage:
//usage:#define chgrp_example_usage
//usage: "$ ls -l /tmp/foo\n"
//usage: "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n"
//usage: "$ chgrp root /tmp/foo\n"
//usage: "$ ls -l /tmp/foo\n"
//usage: "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n"
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
-22
View File
@@ -14,28 +14,6 @@
/* BB_AUDIT GNU defects - unsupported long options. */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/chmod.html */
//usage:#define chmod_trivial_usage
//usage: "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
//usage:#define chmod_full_usage "\n\n"
//usage: "Each MODE is one or more of the letters ugoa, one of the\n"
//usage: "symbols +-= and one or more of the letters rwxst\n"
//usage: "\n -R Recurse"
//usage: IF_DESKTOP(
//usage: "\n -c List changed files"
//usage: "\n -v List all files"
//usage: "\n -f Hide errors"
//usage: )
//usage:
//usage:#define chmod_example_usage
//usage: "$ ls -l /tmp/foo\n"
//usage: "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
//usage: "$ chmod u+x /tmp/foo\n"
//usage: "$ ls -l /tmp/foo\n"
//usage: "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n"
//usage: "$ chmod 444 /tmp/foo\n"
//usage: "$ ls -l /tmp/foo\n"
//usage: "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
-25
View File
@@ -10,31 +10,6 @@
/* BB_AUDIT SUSv3 defects - none? */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/chown.html */
//usage:#define chown_trivial_usage
//usage: "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
//usage:#define chown_full_usage "\n\n"
//usage: "Change the owner and/or group of each FILE to OWNER and/or GROUP\n"
//usage: "\n -R Recurse"
//usage: "\n -h Affect symlinks instead of symlink targets"
//usage: "\n -L Traverse all symlinks to directories"
//usage: "\n -H Traverse symlinks on command line only"
//usage: "\n -P Don't traverse symlinks (default)"
//usage: IF_DESKTOP(
//usage: "\n -c List changed files"
//usage: "\n -v List all files"
//usage: "\n -f Hide errors"
//usage: )
//usage:
//usage:#define chown_example_usage
//usage: "$ ls -l /tmp/foo\n"
//usage: "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n"
//usage: "$ chown root /tmp/foo\n"
//usage: "$ ls -l /tmp/foo\n"
//usage: "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n"
//usage: "$ chown root.root /tmp/foo\n"
//usage: "ls -l /tmp/foo\n"
//usage: "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
+5 -16
View File
@@ -9,19 +9,6 @@
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
//usage:#define chroot_trivial_usage
//usage: "NEWROOT [PROG ARGS]"
//usage:#define chroot_full_usage "\n\n"
//usage: "Run PROG with root directory set to NEWROOT"
//usage:
//usage:#define chroot_example_usage
//usage: "$ ls -l /bin/ls\n"
//usage: "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n"
//usage: "# mount /dev/hdc1 /mnt -t minix\n"
//usage: "# chroot /mnt\n"
//usage: "# ls -l /bin/ls\n"
//usage: "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n"
#include "libbb.h"
int chroot_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -36,9 +23,11 @@ int chroot_main(int argc UNUSED_PARAM, char **argv)
++argv;
if (!*argv) { /* no 2nd param (PROG), use shell */
argv -= 2;
argv[0] = (char *) get_shell_name();
argv[1] = (char *) "-i"; /* GNU coreutils 8.4 compat */
/*argv[2] = NULL; - already is */
argv[0] = getenv("SHELL");
if (!argv[0]) {
argv[0] = (char *) DEFAULT_SHELL;
}
argv[1] = (char *) "-i";
}
BB_EXECVP_or_die(argv);
-7
View File
@@ -6,12 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define cksum_trivial_usage
//usage: "FILES..."
//usage:#define cksum_full_usage "\n\n"
//usage: "Calculate the CRC32 checksums of FILES"
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
@@ -44,7 +38,6 @@ int cksum_main(int argc UNUSED_PARAM, char **argv)
#define read_buf bb_common_bufsiz1
while ((bytes_read = safe_read(fd, read_buf, sizeof(read_buf))) > 0) {
length += bytes_read;
crc = crc32_block_endian1(crc, read_buf, bytes_read, crc32_table);
}
close(fd);
-8
View File
@@ -7,14 +7,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define comm_trivial_usage
//usage: "[-123] FILE1 FILE2"
//usage:#define comm_full_usage "\n\n"
//usage: "Compare FILE1 with FILE2\n"
//usage: "\n -1 Suppress lines unique to FILE1"
//usage: "\n -2 Suppress lines unique to FILE2"
//usage: "\n -3 Suppress lines common to both files"
#include "libbb.h"
#define COMM_OPT_1 (1 << 0)
-17
View File
@@ -15,23 +15,6 @@
* Size reduction.
*/
//usage:#define cp_trivial_usage
//usage: "[OPTIONS] SOURCE DEST"
//usage:#define cp_full_usage "\n\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"
//usage: )
//usage: "\n -R,-r Recurse"
//usage: "\n -d,-P Preserve symlinks (default if -R)"
//usage: "\n -L Follow all symlinks"
//usage: "\n -H Follow symlinks on command line"
//usage: "\n -p Preserve file attributes if possible"
//usage: "\n -f Overwrite"
//usage: "\n -i Prompt before overwrite"
//usage: "\n -l,-s Create (sym)links"
#include "libbb.h"
#include "libcoreutils/coreutils.h"
-17
View File
@@ -9,23 +9,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define cut_trivial_usage
//usage: "[OPTIONS] [FILE]..."
//usage:#define cut_full_usage "\n\n"
//usage: "Print selected fields from each input FILE to stdout\n"
//usage: "\n -b LIST Output only bytes from LIST"
//usage: "\n -c LIST Output only characters from LIST"
//usage: "\n -d CHAR Use CHAR instead of tab as the field delimiter"
//usage: "\n -s Output only the lines containing delimiter"
//usage: "\n -f N Print only these fields"
//usage: "\n -n Ignored"
//usage:
//usage:#define cut_example_usage
//usage: "$ echo \"Hello world\" | cut -f 1 -d ' '\n"
//usage: "Hello\n"
//usage: "$ echo \"Hello world\" | cut -f 2 -d ' '\n"
//usage: "world\n"
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
+5 -10
View File
@@ -19,7 +19,7 @@
/* Input parsing code is always bulky - used heavy duty libc stuff as
much as possible, missed out a lot of bounds checking */
//applet:IF_DATE(APPLET(date, BB_DIR_BIN, BB_SUID_DROP))
//applet:IF_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_DROP))
//kbuild:lib-$(CONFIG_DATE) += date.o
@@ -42,8 +42,7 @@
//config:config FEATURE_DATE_NANO
//config: bool "Support %[num]N nanosecond format specifier"
//config: default n
//config: depends on DATE # syscall(__NR_clock_gettime)
//config: select PLATFORM_LINUX
//config: depends on DATE && PLATFORM_LINUX # syscall(__NR_clock_gettime)
//config: help
//config: Support %[num]N format specifier. Adds ~250 bytes of code.
//config:
@@ -98,6 +97,7 @@
//usage: "[OPTIONS] [+FMT] [TIME]"
//usage:#define date_full_usage "\n\n"
//usage: "Display time (using +FMT), or set time\n"
//usage: "\nOptions:"
//usage: IF_NOT_LONG_OPTS(
//usage: "\n [-s] TIME Set time to TIME"
//usage: "\n -u Work in UTC (don't convert to local time)"
@@ -250,10 +250,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
ts.tv_sec = statbuf.st_mtime;
#if ENABLE_FEATURE_DATE_NANO
ts.tv_nsec = statbuf.st_mtim.tv_nsec;
/* Some toolchains use .st_mtimensec instead of st_mtim.tv_nsec.
* If you need #define _SVID_SOURCE 1 to enable st_mtim.tv_nsec,
* drop a mail to project mailing list please
*/
/* some toolchains use .st_mtimensec instead of st_mtim.tv_nsec */
#endif
} else {
#if ENABLE_FEATURE_DATE_NANO
@@ -282,9 +279,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
}
/* Correct any day of week and day of year etc. fields */
/* Be sure to recheck dst (but not if date is time_t format) */
if (date_str[0] != '@')
tm_time.tm_isdst = -1;
tm_time.tm_isdst = -1; /* Be sure to recheck dst */
ts.tv_sec = validate_tm_time(date_str, &tm_time);
maybe_set_utc(opt);
-38
View File
@@ -8,38 +8,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define dd_trivial_usage
//usage: "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n"
//usage: " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")
//usage:#define dd_full_usage "\n\n"
//usage: "Copy a file with converting and formatting\n"
//usage: "\n if=FILE Read from FILE instead of stdin"
//usage: "\n of=FILE Write to FILE instead of stdout"
//usage: "\n bs=N Read and write N bytes at a time"
//usage: IF_FEATURE_DD_IBS_OBS(
//usage: "\n ibs=N Read N bytes at a time"
//usage: )
//usage: IF_FEATURE_DD_IBS_OBS(
//usage: "\n obs=N Write N bytes at a time"
//usage: )
//usage: "\n count=N Copy only N input blocks"
//usage: "\n skip=N Skip N input blocks"
//usage: "\n seek=N Skip N output blocks"
//usage: IF_FEATURE_DD_IBS_OBS(
//usage: "\n conv=notrunc Don't truncate output file"
//usage: "\n conv=noerror Continue after read errors"
//usage: "\n conv=sync Pad blocks with zeros"
//usage: "\n conv=fsync Physically write data out before finishing"
//usage: )
//usage: "\n"
//usage: "\nNumbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),"
//usage: "\nMD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)"
//usage:
//usage:#define dd_example_usage
//usage: "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n"
//usage: "4+0 records in\n"
//usage: "4+0 records out\n"
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
@@ -429,11 +397,5 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
out_status:
dd_output_status(0);
if (ENABLE_FEATURE_CLEAN_UP) {
free(obuf);
if (flags & FLAG_TWOBUFS)
free(ibuf);
}
return exitcode;
}
+3 -37
View File
@@ -22,40 +22,6 @@
* Implement -P and -B; better coreutils compat; cleanup
*/
//usage:#define df_trivial_usage
//usage: "[-Pk"
//usage: IF_FEATURE_HUMAN_READABLE("mh")
//usage: IF_FEATURE_DF_FANCY("ai] [-B SIZE")
//usage: "] [FILESYSTEM]..."
//usage:#define df_full_usage "\n\n"
//usage: "Print filesystem usage statistics\n"
//usage: "\n -P POSIX output format"
//usage: "\n -k 1024-byte blocks (default)"
//usage: IF_FEATURE_HUMAN_READABLE(
//usage: "\n -m 1M-byte blocks"
//usage: "\n -h Human readable (e.g. 1K 243M 2G)"
//usage: )
//usage: IF_FEATURE_DF_FANCY(
//usage: "\n -a Show all filesystems"
//usage: "\n -i Inodes"
//usage: "\n -B SIZE Blocksize"
//usage: )
//usage:
//usage:#define df_example_usage
//usage: "$ df\n"
//usage: "Filesystem 1K-blocks Used Available Use% Mounted on\n"
//usage: "/dev/sda3 8690864 8553540 137324 98% /\n"
//usage: "/dev/sda1 64216 36364 27852 57% /boot\n"
//usage: "$ df /dev/sda3\n"
//usage: "Filesystem 1K-blocks Used Available Use% Mounted on\n"
//usage: "/dev/sda3 8690864 8553540 137324 98% /\n"
//usage: "$ POSIXLY_CORRECT=sure df /dev/sda3\n"
//usage: "Filesystem 512B-blocks Used Available Use% Mounted on\n"
//usage: "/dev/sda3 17381728 17107080 274648 98% /\n"
//usage: "$ POSIXLY_CORRECT=yep df -P /dev/sda3\n"
//usage: "Filesystem 512-blocks Used Available Capacity Mounted on\n"
//usage: "/dev/sda3 17381728 17107080 274648 98% /\n"
#include <mntent.h>
#include <sys/vfs.h>
#include "libbb.h"
@@ -194,7 +160,7 @@ int df_main(int argc UNUSED_PARAM, char **argv)
}
/* GNU coreutils 6.10 skips certain mounts, try to be compatible. */
if (ENABLE_FEATURE_SKIP_ROOTFS && strcmp(device, "rootfs") == 0)
if (strcmp(device, "rootfs") == 0)
continue;
#ifdef WHY_WE_DO_IT_FOR_DEV_ROOT_ONLY
@@ -212,7 +178,7 @@ int df_main(int argc UNUSED_PARAM, char **argv)
{
uni_stat_t uni_stat;
char *uni_dev = unicode_conv_to_printable(&uni_stat, device);
if (uni_stat.unicode_width > 20 && !(opt & OPT_POSIX)) {
if (uni_stat.unicode_width > 20) {
printf("%s\n%20s", uni_dev, "");
} else {
printf("%s%*s", uni_dev, 20 - (int)uni_stat.unicode_width, "");
@@ -220,7 +186,7 @@ int df_main(int argc UNUSED_PARAM, char **argv)
free(uni_dev);
}
#else
if (printf("\n%-20s" + 1, device) > 20 && !(opt & OPT_POSIX))
if (printf("\n%-20s" + 1, device) > 20)
printf("\n%-20s", "");
#endif
-11
View File
@@ -10,17 +10,6 @@
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/dirname.html */
//usage:#define dirname_trivial_usage
//usage: "FILENAME"
//usage:#define dirname_full_usage "\n\n"
//usage: "Strip non-directory suffix from FILENAME"
//usage:
//usage:#define dirname_example_usage
//usage: "$ dirname /tmp/foo\n"
//usage: "/tmp\n"
//usage: "$ dirname /tmp/foo/\n"
//usage: "/tmp\n"
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
-16
View File
@@ -12,22 +12,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define dos2unix_trivial_usage
//usage: "[-ud] [FILE]"
//usage:#define dos2unix_full_usage "\n\n"
//usage: "Convert FILE in-place from DOS to Unix format.\n"
//usage: "When no file is given, use stdin/stdout.\n"
//usage: "\n -u dos2unix"
//usage: "\n -d unix2dos"
//usage:
//usage:#define unix2dos_trivial_usage
//usage: "[-ud] [FILE]"
//usage:#define unix2dos_full_usage "\n\n"
//usage: "Convert FILE in-place from Unix to DOS format.\n"
//usage: "When no file is given, use stdin/stdout.\n"
//usage: "\n -u dos2unix"
//usage: "\n -d unix2dos"
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
-36
View File
@@ -23,42 +23,6 @@
* 4) Fixed busybox bug #1284 involving long overflow with human_readable.
*/
//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: "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"
//usage: "\n -d N Limit output to directories (and files with -a) of depth < N"
//usage: "\n -c Show grand total"
//usage: "\n -l Count sizes many times if hard linked"
//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 -m Sizes in megabytes"
//usage: )
//usage: "\n -k Sizes in kilobytes"
//usage: IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)")
//usage:
//usage:#define du_example_usage
//usage: "$ du\n"
//usage: "16 ./CVS\n"
//usage: "12 ./kernel-patches/CVS\n"
//usage: "80 ./kernel-patches\n"
//usage: "12 ./tests/CVS\n"
//usage: "36 ./tests\n"
//usage: "12 ./scripts/CVS\n"
//usage: "16 ./scripts\n"
//usage: "12 ./docs/CVS\n"
//usage: "104 ./docs\n"
//usage: "2417 .\n"
#include "libbb.h"
enum {
+88 -117
View File
@@ -23,161 +23,128 @@
* The previous version did not allow 4-digit octals.
*/
//usage:#define echo_trivial_usage
//usage: IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG]..."
//usage:#define echo_full_usage "\n\n"
//usage: "Print the specified ARGs to stdout"
//usage: IF_FEATURE_FANCY_ECHO( "\n"
//usage: "\n -n Suppress trailing newline"
//usage: "\n -e Interpret backslash escapes (i.e., \\t=tab)"
//usage: "\n -E Don't interpret backslash escapes (default)"
//usage: )
//usage:
//usage:#define echo_example_usage
//usage: "$ echo \"Erik is cool\"\n"
//usage: "Erik is cool\n"
//usage: IF_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n"
//usage: "Erik\n"
//usage: "is\n"
//usage: "cool\n"
//usage: "$ echo \"Erik\\nis\\ncool\"\n"
//usage: "Erik\\nis\\ncool\n")
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
/* NB: can be used by shell even if not enabled as applet */
/*
* NB2: we don't use stdio, we need better error handing.
* Examples include writing into non-opened stdout and error on write.
*
* With stdio, output gets shoveled into stdout buffer, and even
* fflush cannot clear it out. It seems that even if libc receives
* EBADF on write attempts, it feels determined to output data no matter what.
* If echo is called by shell, it will try writing again later, and possibly
* will clobber future output. Not good.
*
* Solaris has fpurge which discards buffered input. glibc has __fpurge.
* But this function is not standard.
*/
int echo_main(int argc UNUSED_PARAM, char **argv)
{
char **pp;
const char *arg;
char *out;
char *buffer;
unsigned buflen;
#if !ENABLE_FEATURE_FANCY_ECHO
enum {
eflag = '\\',
nflag = 1, /* 1 -- print '\n' */
};
argv++;
/* We must check that stdout is not closed.
* The reason for this is highly non-obvious.
* echo_main is used from shell. Shell must correctly handle "echo foo"
* if stdout is closed. With stdio, output gets shoveled into
* stdout buffer, and even fflush cannot clear it out. It seems that
* even if libc receives EBADF on write attempts, it feels determined
* to output data no matter what. So it will try later,
* and possibly will clobber future output. Not good. */
// TODO: check fcntl() & O_ACCMODE == O_WRONLY or O_RDWR?
if (fcntl(1, F_GETFL) == -1)
return 1; /* match coreutils 6.10 (sans error msg to stderr) */
//if (dup2(1, 1) != 1) - old way
// return 1;
arg = *++argv;
if (!arg)
goto newline_ret;
#else
const char *p;
char nflag = 1;
char eflag = 0;
while ((arg = *++argv) != NULL) {
char n, e;
/* We must check that stdout is not closed. */
if (fcntl(1, F_GETFL) == -1)
return 1;
if (arg[0] != '-')
break; /* not an option arg, echo it */
while (1) {
arg = *++argv;
if (!arg)
goto newline_ret;
if (*arg != '-')
break;
/* If it appears that we are handling options, then make sure
* that all of the options specified are actually valid.
* Otherwise, the string should just be echoed.
*/
arg++;
n = nflag;
e = eflag;
p = arg + 1;
if (!*p) /* A single '-', so echo it. */
goto just_echo;
do {
if (*arg == 'n')
n = 0;
else if (*arg == 'e')
e = '\\';
else if (*arg != 'E') {
/* "-ccc" arg with one of c's invalid, echo it */
/* arg consisting from just "-" also handled here */
if (!strrchr("neE", *p))
goto just_echo;
}
} while (*++arg);
nflag = n;
eflag = e;
} while (*++p);
/* All of the options in this arg are valid, so handle them. */
p = arg + 1;
do {
if (*p == 'n')
nflag = 0;
if (*p == 'e')
eflag = '\\';
} while (*++p);
}
just_echo:
#endif
buflen = 0;
pp = argv;
while ((arg = *pp) != NULL) {
buflen += strlen(arg) + 1;
pp++;
}
out = buffer = xmalloc(buflen + 1); /* +1 is needed for "no args" case */
while ((arg = *argv) != NULL) {
while (1) {
/* arg is already == *argv and isn't NULL */
int c;
if (!eflag) {
/* optimization for very common case */
out = stpcpy(out, arg);
} else
while ((c = *arg++) != '\0') {
if (c == eflag) {
/* This is an "\x" sequence */
fputs(arg, stdout);
} else while ((c = *arg++)) {
if (c == eflag) { /* Check for escape seq. */
if (*arg == 'c') {
/* "\c" means cancel newline and
/* '\c' means cancel newline and
* ignore all subsequent chars. */
goto do_write;
goto ret;
}
/* Since SUSv3 mandates a first digit of 0, 4-digit octals
* of the form \0### are accepted. */
if (*arg == '0') {
if ((unsigned char)(arg[1] - '0') < 8) {
/* 2nd char is 0..7: skip leading '0' */
arg++;
}
}
/* bb_process_escape_sequence handles NUL correctly
* ("...\" case). */
#if !ENABLE_FEATURE_FANCY_ECHO
/* SUSv3 specifies that octal escapes must begin with '0'. */
if ( ((int)(unsigned char)(*arg) - '0') >= 8) /* '8' or bigger */
#endif
{
/* optimization: don't force arg to be on-stack,
* use another variable for that. ~30 bytes win */
const char *z = arg;
c = bb_process_escape_sequence(&z);
arg = z;
/* Since SUSv3 mandates a first digit of 0, 4-digit octals
* of the form \0### are accepted. */
if (*arg == '0') {
/* NB: don't turn "...\0" into "...\" */
if (arg[1] && ((unsigned char)(arg[1]) - '0') < 8) {
arg++;
}
}
/* bb_process_escape_sequence handles NUL correctly
* ("...\" case). */
c = bb_process_escape_sequence(&arg);
}
}
*out++ = c;
bb_putchar(c);
}
if (!*++argv)
arg = *++argv;
if (!arg)
break;
*out++ = ' ';
bb_putchar(' ');
}
newline_ret:
if (nflag) {
*out++ = '\n';
bb_putchar('\n');
}
do_write:
/* Careful to error out on partial writes too (think ENOSPC!) */
errno = 0;
/*r =*/ full_write(STDOUT_FILENO, buffer, out - buffer);
free(buffer);
if (/*WRONG:r < 0*/ errno) {
bb_perror_msg(bb_msg_write_error);
return 1;
}
return 0;
ret:
return fflush_all();
}
/*
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -263,7 +230,7 @@ int echo_main(int argc, char **argv)
goto just_echo;
do {
if (!strchr("neE", *p))
if (!strrchr("neE", *p))
goto just_echo;
} while (*++p);
@@ -289,23 +256,27 @@ int echo_main(int argc, char **argv)
/* optimization for very common case */
p += strlen(arg);
} else while ((c = *arg++)) {
if (c == eflag) {
/* This is an "\x" sequence */
if (c == eflag) { /* Check for escape seq. */
if (*arg == 'c') {
/* "\c" means cancel newline and
/* '\c' means cancel newline and
* ignore all subsequent chars. */
cur_io->iov_len = p - (char*)cur_io->iov_base;
cur_io++;
goto ret;
}
/* Since SUSv3 mandates a first digit of 0, 4-digit octals
* of the form \0### are accepted. */
if (*arg == '0' && (unsigned char)(arg[1] - '0') < 8) {
arg++;
#if !ENABLE_FEATURE_FANCY_ECHO
/* SUSv3 specifies that octal escapes must begin with '0'. */
if ( (((unsigned char)*arg) - '1') >= 7)
#endif
{
/* Since SUSv3 mandates a first digit of 0, 4-digit octals
* of the form \0### are accepted. */
if (*arg == '0' && ((unsigned char)(arg[1]) - '0') < 8) {
arg++;
}
/* bb_process_escape_sequence can handle nul correctly */
c = bb_process_escape_sequence( (void*) &arg);
}
/* bb_process_escape_sequence can handle nul correctly */
c = bb_process_escape_sequence( (void*) &arg);
}
*p++ = c;
}
-8
View File
@@ -31,14 +31,6 @@
/* This is a NOEXEC applet. Be very careful! */
//usage:#define env_trivial_usage
//usage: "[-iu] [-] [name=value]... [PROG ARGS]"
//usage:#define env_full_usage "\n\n"
//usage: "Print the current environment or run PROG after setting up\n"
//usage: "the specified environment\n"
//usage: "\n -, -i Start with an empty environment"
//usage: "\n -u Remove variable from the environment"
#include "libbb.h"
#if ENABLE_FEATURE_ENV_LONG_OPTIONS
-29
View File
@@ -20,35 +20,6 @@
*
* Caveat: this versions of expand and unexpand don't accept tab lists.
*/
//usage:#define expand_trivial_usage
//usage: "[-i] [-t N] [FILE]..."
//usage:#define expand_full_usage "\n\n"
//usage: "Convert tabs to spaces, writing to stdout\n"
//usage: IF_FEATURE_EXPAND_LONG_OPTIONS(
//usage: "\n -i,--initial Don't convert tabs after non blanks"
//usage: "\n -t,--tabs=N Tabstops every N chars"
//usage: )
//usage: IF_NOT_FEATURE_EXPAND_LONG_OPTIONS(
//usage: "\n -i Don't convert tabs after non blanks"
//usage: "\n -t Tabstops every N chars"
//usage: )
//usage:#define unexpand_trivial_usage
//usage: "[-fa][-t N] [FILE]..."
//usage:#define unexpand_full_usage "\n\n"
//usage: "Convert spaces to tabs, writing to stdout\n"
//usage: IF_FEATURE_UNEXPAND_LONG_OPTIONS(
//usage: "\n -a,--all Convert all blanks"
//usage: "\n -f,--first-only Convert only leading blanks"
//usage: "\n -t,--tabs=N Tabstops every N chars"
//usage: )
//usage: IF_NOT_FEATURE_UNEXPAND_LONG_OPTIONS(
//usage: "\n -a Convert all blanks"
//usage: "\n -f Convert only leading blanks"
//usage: "\n -t N Tabstops every N chars"
//usage: )
#include "libbb.h"
#include "unicode.h"
-35
View File
@@ -25,41 +25,6 @@
/* no getopt needed */
//usage:#define expr_trivial_usage
//usage: "EXPRESSION"
//usage:#define expr_full_usage "\n\n"
//usage: "Print the value of EXPRESSION to stdout\n"
//usage: "\n"
//usage: "EXPRESSION may be:\n"
//usage: " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n"
//usage: " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n"
//usage: " ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n"
//usage: " ARG1 <= ARG2\n"
//usage: " ARG1 = ARG2\n"
//usage: " ARG1 != ARG2\n"
//usage: " ARG1 >= ARG2\n"
//usage: " ARG1 > ARG2\n"
//usage: " ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n"
//usage: " ARG1 - ARG2\n"
//usage: " ARG1 * ARG2\n"
//usage: " ARG1 / ARG2\n"
//usage: " ARG1 % ARG2\n"
//usage: " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n"
//usage: " match STRING REGEXP Same as STRING : REGEXP\n"
//usage: " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n"
//usage: " index STRING CHARS Index in STRING where any CHARS is found, or 0\n"
//usage: " length STRING Length of STRING\n"
//usage: " quote TOKEN Interpret TOKEN as a string, even if\n"
//usage: " it is a keyword like 'match' or an\n"
//usage: " operator like '/'\n"
//usage: " (EXPRESSION) Value of EXPRESSION\n"
//usage: "\n"
//usage: "Beware that many operators need to be escaped or quoted for shells.\n"
//usage: "Comparisons are arithmetic if both ARGs are numbers, else\n"
//usage: "lexicographical. Pattern matches return the string matched between\n"
//usage: "\\( and \\) or null; if \\( and \\) are not used, they return the number\n"
//usage: "of characters matched or 0."
#include "libbb.h"
#include "xregex.h"
-10
View File
@@ -10,16 +10,6 @@
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/000095399/utilities/false.html */
//usage:#define false_trivial_usage
//usage: ""
//usage:#define false_full_usage "\n\n"
//usage: "Return an exit code of FALSE (1)"
//usage:
//usage:#define false_example_usage
//usage: "$ false\n"
//usage: "$ echo $?\n"
//usage: "1\n"
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
-9
View File
@@ -9,15 +9,6 @@
Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define fold_trivial_usage
//usage: "[-bs] [-w WIDTH] [FILE]..."
//usage:#define fold_full_usage "\n\n"
//usage: "Wrap input lines in each FILE (or stdin), writing to stdout\n"
//usage: "\n -b Count bytes rather than columns"
//usage: "\n -s Break at spaces"
//usage: "\n -w Use WIDTH columns instead of 80"
#include "libbb.h"
#include "unicode.h"
-7
View File
@@ -6,13 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define fsync_trivial_usage
//usage: "[-d] FILE..."
//usage:#define fsync_full_usage "\n\n"
//usage: "Write files' buffered blocks to disk\n"
//usage: "\n -d Avoid syncing metadata"
#include "libbb.h"
#ifndef O_NOATIME
# define O_NOATIME 0
-19
View File
@@ -11,25 +11,6 @@
/* BB_AUDIT GNU compatible -c, -q, and -v options in 'fancy' configuration. */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/head.html */
//usage:#define head_trivial_usage
//usage: "[OPTIONS] [FILE]..."
//usage:#define head_full_usage "\n\n"
//usage: "Print first 10 lines of each FILE (or stdin) to stdout.\n"
//usage: "With more than one FILE, precede each with a filename header.\n"
//usage: "\n -n N[kbm] Print first N lines"
//usage: IF_FEATURE_FANCY_HEAD(
//usage: "\n -c N[kbm] Print first N bytes"
//usage: "\n -q Never print headers"
//usage: "\n -v Always print headers"
//usage: )
//usage: "\n"
//usage: "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)."
//usage:
//usage:#define head_example_usage
//usage: "$ head -n 2 /etc/passwd\n"
//usage: "root:x:0:0:root:/root:/bin/bash\n"
//usage: "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
-5
View File
@@ -9,11 +9,6 @@
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
//usage:#define hostid_trivial_usage
//usage: ""
//usage:#define hostid_full_usage "\n\n"
//usage: "Print out a unique 32-bit identifier for the machine"
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
+23 -76
View File
@@ -15,50 +15,6 @@
* Added -G option Tito Ragusa (C) 2008 for SUSv3.
*/
//config:config ID
//config: bool "id"
//config: default y
//config: help
//config: id displays the current user and group ID names.
//config:config GROUPS
//config: bool "groups"
//config: default y
//config: help
//config: Print the group names associated with current user id.
//kbuild:lib-$(CONFIG_GROUPS) += id.o
//kbuild:lib-$(CONFIG_ID) += id.o
//applet:IF_GROUPS(APPLET_NOEXEC(groups, id, BB_DIR_USR_BIN, BB_SUID_DROP, groups))
//applet:IF_ID( APPLET_NOEXEC(id, id, BB_DIR_USR_BIN, BB_SUID_DROP, id ))
//usage:#define id_trivial_usage
//usage: "[OPTIONS] [USER]"
//usage:#define id_full_usage "\n\n"
//usage: "Print information about USER or the current user\n"
//usage: IF_SELINUX(
//usage: "\n -Z Security context"
//usage: )
//usage: "\n -u User ID"
//usage: "\n -g Group ID"
//usage: "\n -G Supplementary group IDs"
//usage: "\n -n Print names instead of numbers"
//usage: "\n -r Print real ID instead of effective ID"
//usage:
//usage:#define id_example_usage
//usage: "$ id\n"
//usage: "uid=1000(andersen) gid=1000(andersen)\n"
//usage:#define groups_trivial_usage
//usage: "[USER]"
//usage:#define groups_full_usage "\n\n"
//usage: "Print the group memberships of USER or for the current process"
//usage:
//usage:#define groups_example_usage
//usage: "$ groups\n"
//usage: "andersen lp dialout cdrom floppy\n"
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
@@ -117,7 +73,7 @@ static int print_user(uid_t id, const char *prefix)
/* On error set *n < 0 and return >= 0
* If *n is too small, update it and return < 0
* (ok to trash groups[] in both cases)
* (ok to trash groups[] in both cases)
* Otherwise fill in groups[] and return >= 0
*/
static int get_groups(const char *username, gid_t rgid, gid_t *groups, int *n)
@@ -131,19 +87,20 @@ static int get_groups(const char *username, gid_t rgid, gid_t *groups, int *n)
m = getgrouplist(username, rgid, groups, n);
/* I guess *n < 0 might indicate error. Anyway,
* malloc'ing -1 bytes won't be good, so: */
if (*n < 0)
return 0;
return m;
//if (*n < 0)
// return 0;
//return m;
//commented out here, happens below anyway
} else {
/* On error -1 is returned, which ends up in *n */
int nn = getgroups(*n, groups);
/* 0: nn <= *n, groups[] was big enough; -1 otherwise */
m = - (nn > *n);
*n = nn;
}
*n = getgroups(*n, groups);
if (*n >= 0)
return *n;
/* Error */
if (errno == EINVAL) /* *n is too small? */
*n = getgroups(0, groups); /* get needed *n */
/* if *n >= 0, return -1 (got new *n), else return 0 (error): */
return -(*n >= 0);
if (*n < 0)
return 0; /* error, don't return < 0! */
return m;
}
int id_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -161,22 +118,11 @@ int id_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_SELINUX
security_context_t scontext = NULL;
#endif
if (ENABLE_GROUPS && (!ENABLE_ID || applet_name[0] == 'g')) {
/* TODO: coreutils groups prepend "USER : " prefix,
* and accept many usernames. Example:
* # groups root root
* root : root
* root : root
*/
opt = option_mask32 = getopt32(argv, "") | JUST_ALL_GROUPS | NAME_NOT_NUMBER;
} else {
/* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/
/* Don't allow more than one username */
opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG"
/* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/
/* Don't allow more than one username */
opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG"
IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G");
opt = getopt32(argv, "rnugG" IF_SELINUX("Z"));
}
opt = getopt32(argv, "rnugG" IF_SELINUX("Z"));
username = argv[optind];
if (username) {
@@ -213,11 +159,11 @@ int id_main(int argc UNUSED_PARAM, char **argv)
/* We are supplying largish buffer, trying
* to not run get_groups() twice. That might be slow
* ("user database in remote SQL server" case) */
groups = xmalloc(64 * sizeof(groups[0]));
groups = xmalloc(64 * sizeof(gid_t));
n = 64;
if (get_groups(username, rgid, groups, &n) < 0) {
/* Need bigger buffer after all */
groups = xrealloc(groups, n * sizeof(groups[0]));
groups = xrealloc(groups, n * sizeof(gid_t));
get_groups(username, rgid, groups, &n);
}
if (n > 0) {
@@ -230,9 +176,10 @@ int id_main(int argc UNUSED_PARAM, char **argv)
prefix = ",";
}
} else if (n < 0) { /* error in get_groups() */
if (ENABLE_DESKTOP)
if (!ENABLE_DESKTOP)
bb_error_msg_and_die("can't get groups");
return EXIT_FAILURE;
else
return EXIT_FAILURE;
}
if (ENABLE_FEATURE_CLEAN_UP)
free(groups);
-17
View File
@@ -6,23 +6,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
/* -v, -b, -c are ignored */
//usage:#define install_trivial_usage
//usage: "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [SOURCE]... DEST"
//usage:#define install_full_usage "\n\n"
//usage: "Copy files and set attributes\n"
//usage: "\n -c Just copy (default)"
//usage: "\n -d Create directories"
//usage: "\n -D Create leading target directories"
//usage: "\n -s Strip symbol table"
//usage: "\n -p Preserve date"
//usage: "\n -o USER Set ownership"
//usage: "\n -g GRP Set group ownership"
//usage: "\n -m MODE Set permissions"
//usage: IF_SELINUX(
//usage: "\n -Z Set security context"
//usage: )
#include "libbb.h"
#include "libcoreutils/coreutils.h"
@@ -5,15 +5,6 @@
/* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */
//usage:#define length_trivial_usage
//usage: "STRING"
//usage:#define length_full_usage "\n\n"
//usage: "Print STRING's length"
//usage:
//usage:#define length_example_usage
//usage: "$ length Hello\n"
//usage: "5\n"
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
+1 -20
View File
@@ -11,21 +11,6 @@
/* BB_AUDIT GNU options missing: -d, -F, -i, and -v. */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/ln.html */
//usage:#define ln_trivial_usage
//usage: "[OPTIONS] TARGET... LINK|DIR"
//usage:#define ln_full_usage "\n\n"
//usage: "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n"
//usage: "\n -s Make symlinks instead of hardlinks"
//usage: "\n -f Remove existing destinations"
//usage: "\n -n Don't dereference symlinks - treat like normal file"
//usage: "\n -b Make a backup of the target (if exists) before link operation"
//usage: "\n -S suf Use suffix instead of ~ when making backup files"
//usage:
//usage:#define ln_example_usage
//usage: "$ ln -s BusyBox /tmp/ls\n"
//usage: "$ ls -l /tmp/ls\n"
//usage: "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n"
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
@@ -55,12 +40,8 @@ int ln_main(int argc, char **argv)
last = argv[argc - 1];
argv += optind;
if (!argv[1]) {
/* "ln PATH/TO/FILE" -> "ln PATH/TO/FILE FILE" */
if (argc == optind + 1) {
*--argv = last;
/* xstrdup is needed: "ln -s PATH/TO/FILE/" is equivalent to
* "ln -s PATH/TO/FILE/ FILE", not "ln -s PATH/TO/FILE FILE"
*/
last = bb_get_last_path_component_strip(xstrdup(last));
}
-9
View File
@@ -20,15 +20,6 @@
* a diagnostic message and an error return.
*/
//usage:#define logname_trivial_usage
//usage: ""
//usage:#define logname_full_usage "\n\n"
//usage: "Print the name of the current user"
//usage:
//usage:#define logname_example_usage
//usage: "$ logname\n"
//usage: "root\n"
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
+615 -748
View File
File diff suppressed because it is too large. Load diff
+67 -111
View File
@@ -6,56 +6,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define md5sum_trivial_usage
//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..."
//usage:#define md5sum_full_usage "\n\n"
//usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums"
//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n"
//usage: "\n -c Check sums against list in FILEs"
//usage: "\n -s Don't output anything, status code shows success"
//usage: "\n -w Warn about improperly formatted checksum lines"
//usage: )
//usage:
//usage:#define md5sum_example_usage
//usage: "$ md5sum < busybox\n"
//usage: "6fd11e98b98a58f64ff3398d7b324003\n"
//usage: "$ md5sum busybox\n"
//usage: "6fd11e98b98a58f64ff3398d7b324003 busybox\n"
//usage: "$ md5sum -c -\n"
//usage: "6fd11e98b98a58f64ff3398d7b324003 busybox\n"
//usage: "busybox: OK\n"
//usage: "^D\n"
//usage:
//usage:#define sha1sum_trivial_usage
//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..."
//usage:#define sha1sum_full_usage "\n\n"
//usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums"
//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n"
//usage: "\n -c Check sums against list in FILEs"
//usage: "\n -s Don't output anything, status code shows success"
//usage: "\n -w Warn about improperly formatted checksum lines"
//usage: )
//usage:
//usage:#define sha256sum_trivial_usage
//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..."
//usage:#define sha256sum_full_usage "\n\n"
//usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums"
//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n"
//usage: "\n -c Check sums against list in FILEs"
//usage: "\n -s Don't output anything, status code shows success"
//usage: "\n -w Warn about improperly formatted checksum lines"
//usage: )
//usage:
//usage:#define sha512sum_trivial_usage
//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("[-c[sw]] ")"[FILE]..."
//usage:#define sha512sum_full_usage "\n\n"
//usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums"
//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n"
//usage: "\n -c Check sums against list in FILEs"
//usage: "\n -s Don't output anything, status code shows success"
//usage: "\n -w Warn about improperly formatted checksum lines"
//usage: )
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
@@ -91,7 +41,8 @@ static uint8_t *hash_file(const char *filename)
sha1_ctx_t sha1;
md5_ctx_t md5;
} context;
uint8_t *hash_value;
uint8_t *hash_value = NULL;
RESERVE_CONFIG_UBUFFER(in_buf, 4096);
void FAST_FUNC (*update)(void*, const void*, size_t);
void FAST_FUNC (*final)(void*, void*);
char hash_algo;
@@ -103,7 +54,7 @@ static uint8_t *hash_file(const char *filename)
hash_algo = applet_name[3];
/* figure specific hash algorithms */
/* figure specific hash algorithims */
if (ENABLE_MD5SUM && hash_algo == HASH_MD5) {
md5_begin(&context.md5);
update = (void*)md5_hash;
@@ -128,19 +79,17 @@ static uint8_t *hash_file(const char *filename)
xfunc_die(); /* can't reach this */
}
{
RESERVE_CONFIG_UBUFFER(in_buf, 4096);
while ((count = safe_read(src_fd, in_buf, 4096)) > 0) {
update(&context, in_buf, count);
}
hash_value = NULL;
if (count == 0) {
final(&context, in_buf);
hash_value = hash_bin_to_hex(in_buf, hash_len);
}
RELEASE_CONFIG_BUFFER(in_buf);
while ((count = safe_read(src_fd, in_buf, 4096)) > 0) {
update(&context, in_buf, count);
}
if (count == 0) {
final(&context, in_buf);
hash_value = hash_bin_to_hex(in_buf, hash_len);
}
RELEASE_CONFIG_BUFFER(in_buf);
if (src_fd != STDIN_FILENO) {
close(src_fd);
}
@@ -175,58 +124,66 @@ int md5_sha1_sum_main(int argc UNUSED_PARAM, char **argv)
}
}
do {
if (ENABLE_FEATURE_MD5_SHA1_SUM_CHECK && (flags & FLAG_CHECK)) {
FILE *pre_computed_stream;
char *line;
int count_total = 0;
int count_failed = 0;
if (ENABLE_FEATURE_MD5_SHA1_SUM_CHECK && (flags & FLAG_CHECK)) {
FILE *pre_computed_stream;
int count_total = 0;
int count_failed = 0;
char *line;
pre_computed_stream = xfopen_stdin(*argv);
if (argv[1]) {
bb_error_msg_and_die("only one argument may be specified with -c");
}
while ((line = xmalloc_fgetline(pre_computed_stream)) != NULL) {
uint8_t *hash_value;
char *filename_ptr;
pre_computed_stream = xfopen_stdin(argv[0]);
count_total++;
filename_ptr = strstr(line, " ");
/* handle format for binary checksums */
if (filename_ptr == NULL) {
filename_ptr = strstr(line, " *");
while ((line = xmalloc_fgetline(pre_computed_stream)) != NULL) {
uint8_t *hash_value;
char *filename_ptr;
count_total++;
filename_ptr = strstr(line, " ");
/* handle format for binary checksums */
if (filename_ptr == NULL) {
filename_ptr = strstr(line, " *");
}
if (filename_ptr == NULL) {
if (flags & FLAG_WARN) {
bb_error_msg("invalid format");
}
if (filename_ptr == NULL) {
if (flags & FLAG_WARN) {
bb_error_msg("invalid format");
}
count_failed++;
return_value = EXIT_FAILURE;
free(line);
continue;
}
*filename_ptr = '\0';
filename_ptr += 2;
hash_value = hash_file(filename_ptr);
if (hash_value && (strcmp((char*)hash_value, line) == 0)) {
if (!(flags & FLAG_SILENT))
printf("%s: OK\n", filename_ptr);
} else {
if (!(flags & FLAG_SILENT))
printf("%s: FAILED\n", filename_ptr);
count_failed++;
return_value = EXIT_FAILURE;
}
/* possible free(NULL) */
free(hash_value);
count_failed++;
return_value = EXIT_FAILURE;
free(line);
continue;
}
if (count_failed && !(flags & FLAG_SILENT)) {
bb_error_msg("WARNING: %d of %d computed checksums did NOT match",
count_failed, count_total);
*filename_ptr = '\0';
filename_ptr += 2;
hash_value = hash_file(filename_ptr);
if (hash_value && (strcmp((char*)hash_value, line) == 0)) {
if (!(flags & FLAG_SILENT))
printf("%s: OK\n", filename_ptr);
} else {
if (!(flags & FLAG_SILENT))
printf("%s: FAILED\n", filename_ptr);
count_failed++;
return_value = EXIT_FAILURE;
}
fclose_if_not_stdin(pre_computed_stream);
} else {
/* possible free(NULL) */
free(hash_value);
free(line);
}
if (count_failed && !(flags & FLAG_SILENT)) {
bb_error_msg("WARNING: %d of %d computed checksums did NOT match",
count_failed, count_total);
}
/*
if (fclose_if_not_stdin(pre_computed_stream) == EOF) {
bb_perror_msg_and_die("can't close file %s", file_ptr);
}
*/
} else {
do {
uint8_t *hash_value = hash_file(*argv);
if (hash_value == NULL) {
return_value = EXIT_FAILURE;
@@ -234,8 +191,7 @@ int md5_sha1_sum_main(int argc UNUSED_PARAM, char **argv)
printf("%s %s\n", hash_value, *argv);
free(hash_value);
}
}
} while (*++argv);
} while (*++argv);
}
return return_value;
}
-18
View File
@@ -19,24 +19,6 @@
/* Nov 28, 2006 Yoshinori Sato <ysato@users.sourceforge.jp>: Add SELinux Support.
*/
//usage:#define mkdir_trivial_usage
//usage: "[OPTIONS] DIRECTORY..."
//usage:#define mkdir_full_usage "\n\n"
//usage: "Create DIRECTORY\n"
//usage: "\n -m MODE Mode"
//usage: "\n -p No error if exists; make parent directories as needed"
//usage: IF_SELINUX(
//usage: "\n -Z Set security context"
//usage: )
//usage:
//usage:#define mkdir_example_usage
//usage: "$ mkdir /tmp/foo\n"
//usage: "$ mkdir /tmp/foo\n"
//usage: "/tmp/foo: File exists\n"
//usage: "$ mkdir /tmp/foo/bar/baz\n"
//usage: "/tmp/foo/bar/baz: No such file or directory\n"
//usage: "$ mkdir -p /tmp/foo/bar/baz\n"
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
-9
View File
@@ -10,15 +10,6 @@
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/mkfifo.html */
//usage:#define mkfifo_trivial_usage
//usage: "[-m MODE] " IF_SELINUX("[-Z] ") "NAME"
//usage:#define mkfifo_full_usage "\n\n"
//usage: "Create named pipe\n"
//usage: "\n -m MODE Mode (default a=rw)"
//usage: IF_SELINUX(
//usage: "\n -Z Set security context"
//usage: )
#include "libbb.h"
#include "libcoreutils/coreutils.h"
-17
View File
@@ -9,23 +9,6 @@
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
//usage:#define mknod_trivial_usage
//usage: "[-m MODE] " IF_SELINUX("[-Z] ") "NAME TYPE MAJOR MINOR"
//usage:#define mknod_full_usage "\n\n"
//usage: "Create a special file (block, character, or pipe)\n"
//usage: "\n -m MODE Creation mode (default a=rw)"
//usage: IF_SELINUX(
//usage: "\n -Z Set security context"
//usage: )
//usage: "\nTYPE:"
//usage: "\n b Block device"
//usage: "\n c or u Character device"
//usage: "\n p Named pipe (MAJOR and MINOR are ignored)"
//usage:
//usage:#define mknod_example_usage
//usage: "$ mknod /dev/fd0 b 2 0\n"
//usage: "$ mknod -m 644 /tmp/pipe p\n"
#include <sys/sysmacros.h> // For makedev
#include "libbb.h"
+1
View File
@@ -21,6 +21,7 @@
//usage: "or: mv [-fin] SOURCE... DIRECTORY"
//usage:#define mv_full_usage "\n\n"
//usage: "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n"
//usage: "\nOptions:"
//usage: "\n -f Don't prompt before overwriting"
//usage: "\n -i Interactive, prompt before overwrite"
//usage: "\n -n Don't overwrite an existing file"
-6
View File
@@ -7,12 +7,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define nice_trivial_usage
//usage: "[-n ADJUST] [PROG ARGS]"
//usage:#define nice_full_usage "\n\n"
//usage: "Change scheduling priority, run PROG\n"
//usage: "\n -n ADJUST Adjust priority by ADJUST"
#include <sys/resource.h>
#include "libbb.h"
-8
View File
@@ -10,14 +10,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define nohup_trivial_usage
//usage: "PROG ARGS"
//usage:#define nohup_full_usage "\n\n"
//usage: "Run PROG immune to hangups, with output to a non-tty"
//usage:
//usage:#define nohup_example_usage
//usage: "$ nohup make &"
#include "libbb.h"
/* Compat info: nohup (GNU coreutils 6.8) does this:
-6
View File
@@ -11,12 +11,6 @@
* Original copyright notice is retained at the end of this file.
*/
//usage:#if !ENABLE_DESKTOP
//usage:#define od_trivial_usage
//usage: "[-aBbcDdeFfHhIiLlOovXx] [FILE]"
//usage:#define od_full_usage "\n\n"
//usage: "Print FILE (or stdin) unambiguously, as octal bytes by default"
//usage:#endif
#include "libbb.h"
#if ENABLE_DESKTOP
+247 -202
View File
@@ -13,64 +13,48 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Jim Meyering. */
/* Busyboxed by Denys Vlasenko, based on od.c from coreutils-5.2.1 */
/* Busyboxed by Denys Vlasenko
Based on od.c from coreutils-5.2.1
Top bloat sources:
00000073 t parse_old_offset
0000007b t get_lcm
00000090 r long_options
00000092 t print_named_ascii
000000bf t print_ascii
00000168 t write_block
00000366 t decode_format_string
00000a71 T od_main
Tested for compat with coreutils 6.3
using this script. Minor differences fixed.
#!/bin/sh
echo STD
time /path/to/coreutils/od \
...params... \
>std
echo Exit code $?
echo BBOX
time ./busybox od \
...params... \
>bbox
echo Exit code $?
diff -u -a std bbox >bbox.diff || { echo Different!; sleep 1; }
*/
#include "libbb.h"
/* #include "libbb.h" - done in od.c */
#define assert(a) ((void)0)
//usage:#if ENABLE_DESKTOP
//usage:#define od_trivial_usage
//usage: "[-abcdfhilovxs] [-t TYPE] [-A RADIX] [-N SIZE] [-j SKIP] [-S MINSTR] [-w WIDTH] [FILE...]"
// We don't support:
// ... [FILE] [[+]OFFSET[.][b]]
// Support is buggy for:
// od --traditional [OPTION]... [FILE] [[+]OFFSET[.][b] [+][LABEL][.][b]]
//usage:#define od_full_usage "\n\n"
//usage: "Print FILEs (or stdin) unambiguously, as octal bytes by default"
//usage:#endif
enum {
OPT_A = 1 << 0,
OPT_N = 1 << 1,
OPT_a = 1 << 2,
OPT_b = 1 << 3,
OPT_c = 1 << 4,
OPT_d = 1 << 5,
OPT_f = 1 << 6,
OPT_h = 1 << 7,
OPT_i = 1 << 8,
OPT_j = 1 << 9,
OPT_l = 1 << 10,
OPT_o = 1 << 11,
OPT_t = 1 << 12,
/* When zero and two or more consecutive blocks are equal, format
only the first block and output an asterisk alone on the following
line to indicate that identical blocks have been elided: */
OPT_v = 1 << 13,
OPT_x = 1 << 14,
OPT_s = 1 << 15,
OPT_S = 1 << 16,
OPT_w = 1 << 17,
OPT_traditional = (1 << 18) * ENABLE_LONG_OPTS,
};
#define OD_GETOPT32() getopt32(argv, \
"A:N:abcdfhij:lot:vxsS:w::", \
/* -w with optional param */ \
/* -S was -s and also had optional parameter */ \
/* but in coreutils 6.3 it was renamed and now has */ \
/* _mandatory_ parameter */ \
&str_A, &str_N, &str_j, &lst_t, &str_S, &bytes_per_block)
/* Check for 0x7f is a coreutils 6.3 addition */
#define ISPRINT(c) (((c) >= ' ') && (c) < 0x7f)
#define ISPRINT(c) (((c)>=' ') && (c) != 0x7f)
typedef long double longdouble_t;
typedef unsigned long long ulonglong_t;
@@ -174,9 +158,17 @@ struct ERR_width_bytes_has_bad_size {
char ERR_width_bytes_has_bad_size[ARRAY_SIZE(width_bytes) == N_SIZE_SPECS ? 1 : -1];
};
static smallint exit_code;
static smallint flag_dump_strings;
/* Non-zero if an old-style 'pseudo-address' was specified. */
static smallint flag_pseudo_start;
static smallint limit_bytes_to_format;
/* When zero and two or more consecutive blocks are equal, format
only the first block and output an asterisk alone on the following
line to indicate that identical blocks have been elided. */
static smallint verbose;
static smallint ioerror;
static unsigned string_min;
static size_t string_min;
/* An array of specs describing how to format each input block. */
static size_t n_specs;
@@ -187,11 +179,7 @@ static struct tspec *spec;
static void (*format_address)(off_t, char);
/* The difference between the old-style pseudo starting address and
the number of bytes to skip. */
#if ENABLE_LONG_OPTS
static off_t pseudo_offset;
#else
enum { pseudo_offset = 0 };
#endif
/* When zero, MAX_BYTES_TO_FORMAT and END_OFFSET are ignored, and all
input is formatted. */
@@ -226,7 +214,7 @@ static const unsigned char integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1] ALIGN1
#define MAX_FP_TYPE_SIZE sizeof(longdouble_t)
static const unsigned char fp_type_size[MAX_FP_TYPE_SIZE + 1] ALIGN1 = {
/* gcc seems to allow repeated indexes. Last one wins */
/* gcc seems to allow repeated indexes. Last one stays */
[sizeof(longdouble_t)] = FLOAT_LONG_DOUBLE,
[sizeof(double)] = FLOAT_DOUBLE,
[sizeof(float)] = FLOAT_SINGLE
@@ -388,7 +376,7 @@ print_named_ascii(size_t n_bytes, const char *block,
};
// buf[N] pos: 01234 56789
char buf[12] = " x\0 0xx\0";
// actually " x\0 xxx\0", but want to share string with print_ascii.
// actually " x\0 xxx\0", but I want to share the string with below.
// [12] because we take three 32bit stack slots anyway, and
// gcc is too dumb to initialize with constant stores,
// it copies initializer from rodata. Oh well.
@@ -484,10 +472,10 @@ open_next_file(void)
if (in_stream) {
break;
}
exit_code = 1;
ioerror = 1;
}
if ((option_mask32 & (OPT_N|OPT_S)) == OPT_N)
if (limit_bytes_to_format && !flag_dump_strings)
setbuf(in_stream, NULL);
}
@@ -507,14 +495,15 @@ check_and_close(void)
? bb_msg_standard_input
: file_list[-1]
);
exit_code = 1;
ioerror = 1;
}
fclose_if_not_stdin(in_stream);
in_stream = NULL;
}
if (ferror(stdout)) {
bb_error_msg_and_die(bb_msg_write_error);
bb_error_msg(bb_msg_write_error);
ioerror = 1;
}
}
@@ -546,6 +535,7 @@ decode_one_format(const char *s_orig, const char *s, struct tspec *tspec)
unsigned field_width = 0;
int pos;
switch (*s) {
case 'd':
case 'o':
@@ -791,7 +781,7 @@ skip(off_t n_skip)
/* take "check & close / open_next" route */
} else {
if (fseeko(in_stream, n_skip, SEEK_CUR) != 0)
exit_code = 1;
ioerror = 1;
return;
}
} else {
@@ -892,8 +882,7 @@ write_block(off_t current_offset, size_t n_bytes,
static char prev_pair_equal = 0;
size_t i;
if (!(option_mask32 & OPT_v)
&& !first
if (!verbose && !first
&& n_bytes == bytes_per_block
&& memcmp(prev_block, curr_block, bytes_per_block) == 0
) {
@@ -915,9 +904,9 @@ write_block(off_t current_offset, size_t n_bytes,
(*spec[i].print_function) (n_bytes, curr_block, spec[i].fmt_string);
if (spec[i].hexl_mode_trailer) {
/* space-pad out to full line width, then dump the trailer */
unsigned datum_width = width_bytes[spec[i].size];
unsigned blank_fields = (bytes_per_block - n_bytes) / datum_width;
unsigned field_width = spec[i].field_width + 1;
int datum_width = width_bytes[spec[i].size];
int blank_fields = (bytes_per_block - n_bytes) / datum_width;
int field_width = spec[i].field_width + 1;
printf("%*s", blank_fields * field_width, "");
dump_hexl_mode_trailer(n_bytes, curr_block);
}
@@ -965,6 +954,42 @@ get_lcm(void)
return l_c_m;
}
#if ENABLE_LONG_OPTS
/* If S is a valid traditional offset specification with an optional
leading '+' return nonzero and set *OFFSET to the offset it denotes. */
static int
parse_old_offset(const char *s, off_t *offset)
{
static const struct suffix_mult Bb[] = {
{ "B", 1024 },
{ "b", 512 },
{ "", 0 }
};
char *p;
int radix;
/* Skip over any leading '+'. */
if (s[0] == '+') ++s;
/* Determine the radix we'll use to interpret S. If there is a '.',
* it's decimal, otherwise, if the string begins with '0X'or '0x',
* it's hexadecimal, else octal. */
p = strchr(s, '.');
radix = 8;
if (p) {
p[0] = '\0'; /* cheating */
radix = 10;
} else if (s[0] == '0' && (s[1] == 'x' || s[1] == 'X'))
radix = 16;
*offset = xstrtooff_sfx(s, radix, Bb);
if (p) p[0] = '.';
return (*offset >= 0);
}
#endif
/* Read a chunk of size BYTES_PER_BLOCK from the input files, write the
formatted block to standard output, and repeat until the specified
maximum number of bytes has been read or until all input has been
@@ -982,25 +1007,27 @@ dump(off_t current_offset, off_t end_offset)
int idx;
size_t n_bytes_read;
block[0] = xmalloc(2 * bytes_per_block);
block[0] = xmalloc(2*bytes_per_block);
block[1] = block[0] + bytes_per_block;
idx = 0;
if (option_mask32 & OPT_N) {
if (limit_bytes_to_format) {
while (1) {
size_t n_needed;
if (current_offset >= end_offset) {
n_bytes_read = 0;
break;
}
n_needed = MIN(end_offset - current_offset, (off_t) bytes_per_block);
n_needed = MIN(end_offset - current_offset,
(off_t) bytes_per_block);
read_block(n_needed, block[idx], &n_bytes_read);
if (n_bytes_read < bytes_per_block)
break;
assert(n_bytes_read == bytes_per_block);
write_block(current_offset, n_bytes_read, block[idx ^ 1], block[idx]);
write_block(current_offset, n_bytes_read,
block[!idx], block[idx]);
current_offset += n_bytes_read;
idx ^= 1;
idx = !idx;
}
} else {
while (1) {
@@ -1008,9 +1035,10 @@ dump(off_t current_offset, off_t end_offset)
if (n_bytes_read < bytes_per_block)
break;
assert(n_bytes_read == bytes_per_block);
write_block(current_offset, n_bytes_read, block[idx ^ 1], block[idx]);
write_block(current_offset, n_bytes_read,
block[!idx], block[idx]);
current_offset += n_bytes_read;
idx ^= 1;
idx = !idx;
}
}
@@ -1026,18 +1054,41 @@ dump(off_t current_offset, off_t end_offset)
memset(block[idx] + n_bytes_read, 0, bytes_to_write - n_bytes_read);
write_block(current_offset, bytes_to_write,
block[idx ^ 1], block[idx]);
block[!idx], block[idx]);
current_offset += n_bytes_read;
}
format_address(current_offset, '\n');
if ((option_mask32 & OPT_N) && current_offset >= end_offset)
if (limit_bytes_to_format && current_offset >= end_offset)
check_and_close();
free(block[0]);
}
/* Read a single byte into *C from the concatenation of the input files
named in the global array FILE_LIST. On the first call to this
function, the global variable IN_STREAM is expected to be an open
stream associated with the input file INPUT_FILENAME. If IN_STREAM
is at end-of-file, close it and update the global variables IN_STREAM
and INPUT_FILENAME so they correspond to the next file in the list.
Then try to read a byte from the newly opened file. Repeat if
necessary until EOF is reached for the last file in FILE_LIST, then
set *C to EOF and return. Subsequent calls do likewise. */
static void
read_char(int *c)
{
while (in_stream) { /* !EOF */
*c = fgetc(in_stream);
if (*c != EOF)
return;
check_and_close();
open_next_file();
}
*c = EOF;
}
/* Read N bytes into BLOCK from the concatenation of the input files
named in the global array FILE_LIST. On the first call to this
function, the global variable IN_STREAM is expected to be an open
@@ -1061,8 +1112,8 @@ dump(off_t current_offset, off_t end_offset)
static void
dump_strings(off_t address, off_t end_offset)
{
unsigned bufsize = MAX(100, string_min);
unsigned char *buf = xmalloc(bufsize);
size_t bufsize = MAX(100, string_min);
char *buf = xmalloc(bufsize);
while (1) {
size_t i;
@@ -1070,25 +1121,19 @@ dump_strings(off_t address, off_t end_offset)
/* See if the next 'string_min' chars are all printing chars. */
tryline:
if ((option_mask32 & OPT_N) && (end_offset - string_min <= address))
if (limit_bytes_to_format && (end_offset - string_min <= address))
break;
i = 0;
while (!(option_mask32 & OPT_N) || address < end_offset) {
while (!limit_bytes_to_format || address < end_offset) {
if (i == bufsize) {
bufsize += bufsize/8;
buf = xrealloc(buf, bufsize);
}
while (in_stream) { /* !EOF */
c = fgetc(in_stream);
if (c != EOF)
goto got_char;
check_and_close();
open_next_file();
read_char(&c);
if (c < 0) { /* EOF */
free(buf);
return;
}
/* EOF */
goto ret;
got_char:
address++;
if (!c)
break;
@@ -1100,7 +1145,8 @@ dump_strings(off_t address, off_t end_offset)
if (i < string_min) /* Too short! */
goto tryline;
/* If we get here, the string is all printable and NUL-terminated */
/* If we get here, the string is all printable and NUL-terminated,
* so print it. It is all in 'buf' and 'i' is its length. */
buf[i] = 0;
format_address(address - i - 1, ' ');
@@ -1121,50 +1167,13 @@ dump_strings(off_t address, off_t end_offset)
/* We reach this point only if we search through
(max_bytes_to_format - string_min) bytes before reaching EOF. */
check_and_close();
ret:
free(buf);
check_and_close();
}
#if ENABLE_LONG_OPTS
/* If S is a valid traditional offset specification with an optional
leading '+' return nonzero and set *OFFSET to the offset it denotes. */
static int
parse_old_offset(const char *s, off_t *offset)
{
static const struct suffix_mult Bb[] = {
{ "B", 1024 },
{ "b", 512 },
{ "", 0 }
};
char *p;
int radix;
/* Skip over any leading '+'. */
if (s[0] == '+') ++s;
if (!isdigit(s[0])) return 0; /* not a number */
/* Determine the radix we'll use to interpret S. If there is a '.',
* it's decimal, otherwise, if the string begins with '0X'or '0x',
* it's hexadecimal, else octal. */
p = strchr(s, '.');
radix = 8;
if (p) {
p[0] = '\0'; /* cheating */
radix = 10;
} else if (s[0] == '0' && (s[1] == 'x' || s[1] == 'X'))
radix = 16;
*offset = xstrtooff_sfx(s, radix, Bb);
if (p) p[0] = '.';
return (*offset >= 0);
}
#endif
int od_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int od_main(int argc UNUSED_PARAM, char **argv)
int od_main(int argc, char **argv)
{
static const struct suffix_mult bkm[] = {
{ "b", 512 },
@@ -1172,6 +1181,27 @@ int od_main(int argc UNUSED_PARAM, char **argv)
{ "m", 1024*1024 },
{ "", 0 }
};
enum {
OPT_A = 1 << 0,
OPT_N = 1 << 1,
OPT_a = 1 << 2,
OPT_b = 1 << 3,
OPT_c = 1 << 4,
OPT_d = 1 << 5,
OPT_f = 1 << 6,
OPT_h = 1 << 7,
OPT_i = 1 << 8,
OPT_j = 1 << 9,
OPT_l = 1 << 10,
OPT_o = 1 << 11,
OPT_t = 1 << 12,
OPT_v = 1 << 13,
OPT_x = 1 << 14,
OPT_s = 1 << 15,
OPT_S = 1 << 16,
OPT_w = 1 << 17,
OPT_traditional = (1 << 18) * ENABLE_LONG_OPTS,
};
#if ENABLE_LONG_OPTS
static const char od_longopts[] ALIGN1 =
"skip-bytes\0" Required_argument "j"
@@ -1179,18 +1209,18 @@ int od_main(int argc UNUSED_PARAM, char **argv)
"read-bytes\0" Required_argument "N"
"format\0" Required_argument "t"
"output-duplicates\0" No_argument "v"
/* Yes, it's true: -S NUM, but --strings[=NUM]!
* that is, NUM is mandatory for -S but optional for --strings!
*/
"strings\0" Optional_argument "S"
"width\0" Optional_argument "w"
"traditional\0" No_argument "\xff"
;
#endif
const char *str_A, *str_N, *str_j, *str_S = "3";
char *str_A, *str_N, *str_j, *str_S;
llist_t *lst_t = NULL;
unsigned opt;
int l_c_m;
/* The old-style 'pseudo starting address' to be printed in parentheses
after any true address. */
off_t pseudo_start = pseudo_start; // for gcc
/* The number of input bytes to skip before formatting and writing. */
off_t n_bytes_to_skip = 0;
/* The offset of the first byte after the last byte to be formatted. */
@@ -1202,13 +1232,20 @@ int od_main(int argc UNUSED_PARAM, char **argv)
format_address = format_address_std;
address_base_char = 'o';
address_pad_len_char = '7';
/* flag_dump_strings = 0; - already is */
/* Parse command line */
opt_complementary = "w+:t::"; /* -w N, -t is a list */
#if ENABLE_LONG_OPTS
applet_long_options = od_longopts;
#endif
opt = OD_GETOPT32();
opt = getopt32(argv, "A:N:abcdfhij:lot:vxsS:"
"w::", // -w with optional param
// -S was -s and also had optional parameter
// but in coreutils 6.3 it was renamed and now has
// _mandatory_ parameter
&str_A, &str_N, &str_j, &lst_t, &str_S, &bytes_per_block);
argc -= optind;
argv += optind;
if (opt & OPT_A) {
static const char doxn[] ALIGN1 = "doxn";
@@ -1230,6 +1267,7 @@ int od_main(int argc UNUSED_PARAM, char **argv)
address_pad_len_char = doxn_address_pad_len_char[pos];
}
if (opt & OPT_N) {
limit_bytes_to_format = 1;
max_bytes_to_format = xstrtooff_sfx(str_N, 0, bkm);
}
if (opt & OPT_a) decode_format_string("a");
@@ -1242,23 +1280,28 @@ int od_main(int argc UNUSED_PARAM, char **argv)
if (opt & OPT_j) n_bytes_to_skip = xstrtooff_sfx(str_j, 0, bkm);
if (opt & OPT_l) decode_format_string("d4");
if (opt & OPT_o) decode_format_string("o2");
//if (opt & OPT_t)...
while (lst_t) {
decode_format_string(llist_pop(&lst_t));
}
if (opt & OPT_v) verbose = 1;
if (opt & OPT_x) decode_format_string("x2");
if (opt & OPT_s) decode_format_string("d2");
if (opt & OPT_S) {
string_min = 3;
string_min = xstrtou_sfx(str_S, 0, bkm);
flag_dump_strings = 1;
}
//if (opt & OPT_w)...
//if (opt & OPT_traditional)...
// Bloat:
//if ((option_mask32 & OPT_S) && n_specs > 0)
// bb_error_msg_and_die("no type may be specified when dumping strings");
if (flag_dump_strings && n_specs > 0)
bb_error_msg_and_die("no type may be specified when dumping strings");
/* If the --traditional option is used, there may be from
* 0 to 3 remaining command line arguments; handle each case
* separately.
* od [FILE] [[+]OFFSET[.][b] [[+]LABEL[.][b]]]
* od [file] [[+]offset[.][b] [[+]label[.][b]]]
* The offset and pseudo_start have the same syntax.
*
* FIXME: POSIX 1003.1-2001 with XSI requires support for the
@@ -1266,91 +1309,93 @@ int od_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_LONG_OPTS
if (opt & OPT_traditional) {
if (argv[0]) {
off_t pseudo_start = -1;
off_t o1, o2;
off_t o1, o2;
if (!argv[1]) { /* one arg */
if (parse_old_offset(argv[0], &o1)) {
/* od --traditional OFFSET */
n_bytes_to_skip = o1;
argv++;
}
/* od --traditional FILE */
} else if (!argv[2]) { /* two args */
if (parse_old_offset(argv[0], &o1)
&& parse_old_offset(argv[1], &o2)
) {
/* od --traditional OFFSET LABEL */
n_bytes_to_skip = o1;
pseudo_start = o2;
argv += 2;
} else if (parse_old_offset(argv[1], &o2)) {
/* od --traditional FILE OFFSET */
n_bytes_to_skip = o2;
argv[1] = NULL;
} else {
bb_error_msg_and_die("invalid second argument '%s'", argv[1]);
}
} else if (!argv[3]) { /* three args */
if (parse_old_offset(argv[1], &o1)
&& parse_old_offset(argv[2], &o2)
) {
/* od --traditional FILE OFFSET LABEL */
n_bytes_to_skip = o1;
pseudo_start = o2;
argv[1] = NULL;
} else {
bb_error_msg_and_die("the last two arguments must be offsets");
}
} else { /* >3 args */
bb_error_msg_and_die("too many arguments");
if (argc == 1) {
if (parse_old_offset(argv[0], &o1)) {
n_bytes_to_skip = o1;
--argc;
++argv;
}
if (pseudo_start >= 0) {
if (format_address == format_address_none) {
address_base_char = 'o';
address_pad_len_char = '7';
format_address = format_address_paren;
} else {
format_address = format_address_label;
}
pseudo_offset = pseudo_start - n_bytes_to_skip;
} else if (argc == 2) {
if (parse_old_offset(argv[0], &o1)
&& parse_old_offset(argv[1], &o2)
) {
n_bytes_to_skip = o1;
flag_pseudo_start = 1;
pseudo_start = o2;
argv += 2;
argc -= 2;
} else if (parse_old_offset(argv[1], &o2)) {
n_bytes_to_skip = o2;
--argc;
argv[1] = argv[0];
++argv;
} else {
bb_error_msg_and_die("invalid second operand "
"in compatibility mode '%s'", argv[1]);
}
} else if (argc == 3) {
if (parse_old_offset(argv[1], &o1)
&& parse_old_offset(argv[2], &o2)
) {
n_bytes_to_skip = o1;
flag_pseudo_start = 1;
pseudo_start = o2;
argv[2] = argv[0];
argv += 2;
argc -= 2;
} else {
bb_error_msg_and_die("in compatibility mode "
"the last two arguments must be offsets");
}
} else if (argc > 3) {
bb_error_msg_and_die("compatibility mode supports "
"at most three arguments");
}
if (flag_pseudo_start) {
if (format_address == format_address_none) {
address_base_char = 'o';
address_pad_len_char = '7';
format_address = format_address_paren;
} else
format_address = format_address_label;
}
/* else: od --traditional (without args) */
}
#endif
if (option_mask32 & OPT_N) {
if (limit_bytes_to_format) {
end_offset = n_bytes_to_skip + max_bytes_to_format;
if (end_offset < n_bytes_to_skip)
bb_error_msg_and_die("SKIP + SIZE is too large");
bb_error_msg_and_die("skip-bytes + read-bytes is too large");
}
if (n_specs == 0) {
decode_format_string("o2");
/*n_specs = 1; - done by decode_format_string */
n_specs = 1;
}
/* If no files were listed on the command line,
set the global pointer FILE_LIST so that it
references the null-terminated list of one name: "-". */
file_list = bb_argv_dash;
if (argv[0]) {
if (argc > 0) {
/* Set the global pointer FILE_LIST so that it
references the first file-argument on the command-line. */
file_list = (char const *const *) argv;
}
/* Open the first input file */
/* open the first input file */
open_next_file();
/* Skip over any unwanted header bytes */
/* skip over any unwanted header bytes */
skip(n_bytes_to_skip);
if (!in_stream)
return EXIT_FAILURE;
/* Compute output block length */
pseudo_offset = (flag_pseudo_start ? pseudo_start - n_bytes_to_skip : 0);
/* Compute output block length. */
l_c_m = get_lcm();
if (opt & OPT_w) { /* -w: width */
@@ -1372,13 +1417,13 @@ int od_main(int argc UNUSED_PARAM, char **argv)
}
#endif
if (option_mask32 & OPT_S)
if (flag_dump_strings)
dump_strings(n_bytes_to_skip, end_offset);
else
dump(n_bytes_to_skip, end_offset);
if (fclose(stdin))
if (fclose(stdin) == EOF)
bb_perror_msg_and_die(bb_msg_standard_input);
return exit_code;
return ioerror;
}
+3 -14
View File
@@ -8,12 +8,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define printenv_trivial_usage
//usage: "[VARIABLE]..."
//usage:#define printenv_full_usage "\n\n"
//usage: "Print environment VARIABLEs.\n"
//usage: "If no VARIABLE specified, print all."
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
@@ -25,14 +19,9 @@ int printenv_main(int argc UNUSED_PARAM, char **argv)
/* no variables specified, show whole env */
if (!argv[1]) {
char **e = environ;
/* environ can be NULL! (for example, after clearenv())
* Check for that:
*/
if (e)
while (*e)
puts(*e++);
int e = 0;
while (environ[e])
puts(environ[e++]);
} else {
/* search for specified variables and print them out if found */
char *arg, *env;
-10
View File
@@ -38,16 +38,6 @@
// 19990508 Busy Boxed! Dave Cinege
//usage:#define printf_trivial_usage
//usage: "FORMAT [ARGUMENT]..."
//usage:#define printf_full_usage "\n\n"
//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"
//usage: "Val=5\n"
#include "libbb.h"
/* A note on bad input: neither bash 3.2 nor coreutils 6.10 stop on it.
-9
View File
@@ -7,15 +7,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define pwd_trivial_usage
//usage: ""
//usage:#define pwd_full_usage "\n\n"
//usage: "Print the full filename of the current working directory"
//usage:
//usage:#define pwd_example_usage
//usage: "$ pwd\n"
//usage: "/root\n"
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
-11
View File
@@ -6,17 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
//usage:#define readlink_trivial_usage
//usage: IF_FEATURE_READLINK_FOLLOW("[-fnv] ") "FILE"
//usage:#define readlink_full_usage "\n\n"
//usage: "Display the value of a symlink"
//usage: IF_FEATURE_READLINK_FOLLOW( "\n"
//usage: "\n -f Canonicalize by following all symlinks"
//usage: "\n -n Don't add newline"
//usage: "\n -v Verbose"
//usage: )
#include "libbb.h"
/*
Loaded 100 of 527 files, more files were not shown because too many files have changed in this diff. Show more