author | Tanguy Pruvot <tanguy.pruvot@gmail.com> | 2011-06-30 06:59:26 (GMT) |
---|---|---|
committer | Tanguy Pruvot <tanguy.pruvot@gmail.com> | 2011-06-30 06:59:26 (GMT) |
commit | 8aeb3719294721f744239ced474d159f073eef55 (patch) | |
tree | 5bfd7b8c140549a668ecbb2d2a0d415525ed92b5 | |
parent | 75214cfe00c72c51c67c9ac2541f06b0540136f1 (diff) | |
download | busybox-8aeb3719294721f744239ced474d159f073eef55.zip busybox-8aeb3719294721f744239ced474d159f073eef55.tar.gz busybox-8aeb3719294721f744239ced474d159f073eef55.tar.bz2 |
merged commit between gingerbread and busybox/master 20110630
104 files changed, 4069 insertions, 188 deletions
diff --git a/.config-full b/.config-full new file mode 100644 index 0000000..f83ed6b --- a/dev/null +++ b/.config-full @@ -0,0 +1,1004 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.19.0-cm71 +# Thu Jun 30 08:21:44 2011 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# CONFIG_DESKTOP is not set +# CONFIG_EXTRA_COMPAT is not set +# CONFIG_INCLUDE_SUSv2 is not set +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +CONFIG_FEATURE_COMPRESS_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +CONFIG_INSTALL_NO_USR=y +# 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=63 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +CONFIG_UNICODE_WIDE_WCHARS=y +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +CONFIG_UNICODE_PRESERVE_BROKEN=y +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 is not set +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 is not set +CONFIG_CROSS_COMPILER_PREFIX="arm-eabi-" +CONFIG_EXTRA_CFLAGS="-Os" + +# +# 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="/system/xbin/bb" + +# +# 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=y +CONFIG_FEATURE_EDITING_HISTORY=256 +# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +CONFIG_FEATURE_EDITING_ASK_TERMINAL=y +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=y +CONFIG_IOCTL_HEX2STR_ERROR=y +# CONFIG_FEATURE_HWIB is not set + +# +# Applets +# + +# +# Archival Utilities +# +CONFIG_FEATURE_SEAMLESS_XZ=y +CONFIG_FEATURE_SEAMLESS_LZMA=y +CONFIG_FEATURE_SEAMLESS_BZ2=y +CONFIG_FEATURE_SEAMLESS_GZ=y +# CONFIG_FEATURE_SEAMLESS_Z 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 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 is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_AUTODETECT=y +CONFIG_FEATURE_TAR_FROM=y +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +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=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=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 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +# CONFIG_FEATURE_TR_EQUIV is not set +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 is not set +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=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set +CONFIG_EXPAND=y +CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y +CONFIG_EXPR=y +# CONFIG_EXPR_MATH_SUPPORT_64 is not set +CONFIG_FALSE=y +CONFIG_FOLD=y +CONFIG_FSYNC=y +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_INSTALL=y +# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set +CONFIG_LN=y +# CONFIG_LOGNAME is not set +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +# CONFIG_FEATURE_MV_LONG_OPTIONS is not set +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_FEATURE_FLOAT_SLEEP=y +CONFIG_SORT=y +# CONFIG_FEATURE_SORT_BIG is not set +CONFIG_SPLIT=y +# CONFIG_FEATURE_SPLIT_FANCY is not set +CONFIG_STAT=y +# 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 is not set +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 is not set +# 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 is not set +CONFIG_SETCONSOLE=y +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" +# CONFIG_SETKEYCODES 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_VI=y +CONFIG_FEATURE_VI_MAX_LEN=256 +CONFIG_FEATURE_VI_8BIT=y +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 is not set +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 is not set +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 is not set +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +# CONFIG_INIT 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 +# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP 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 is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +# CONFIG_USE_BB_CRYPT_SHA is not set +# CONFIG_ADDUSER is not set +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=0 +CONFIG_LAST_SYSTEM_ID=0 +# CONFIG_ADDGROUP is not set +# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_DELUSER is not set +# CONFIG_DELGROUP is not set +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +# CONFIG_GETTY is not set +# CONFIG_LOGIN is not set +# CONFIG_PAM is not set +# CONFIG_LOGIN_SCRIPTS is not set +# CONFIG_FEATURE_NOLOGIN is not set +# CONFIG_FEATURE_SECURETTY is not set +# CONFIG_PASSWD is not set +# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set +# CONFIG_CRYPTPW is not set +# CONFIG_CHPASSWD is not set +# CONFIG_SU is not set +# CONFIG_FEATURE_SU_SYSLOG is not set +# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y +CONFIG_TUNE2FS=y + +# +# Linux Module Utilities +# +CONFIG_MODINFO=y +# 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=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y +CONFIG_MODPROBE=y +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +CONFIG_DEPMOD=y + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +CONFIG_FEATURE_INSMOD_TRY_MMAP=y +# 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=y +CONFIG_FEATURE_MODUTILS_ALIAS=y +CONFIG_FEATURE_MODUTILS_SYMBOLS=y +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +CONFIG_BLOCKDEV=y +CONFIG_REV=y +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +# CONFIG_BLKID is not set +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +# 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=y +CONFIG_FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FINDFS is not set +CONFIG_FLOCK=y +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +CONFIG_MKFS_EXT2=y +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +CONFIG_MKFS_VFAT=y +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +CONFIG_HEXDUMP=y +CONFIG_FEATURE_HEXDUMP_REVERSE=y +# CONFIG_HD is not set +# CONFIG_HWCLOCK is not set +# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set +# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set +# CONFIG_IPCRM is not set +# CONFIG_IPCS is not set +CONFIG_LOSETUP=y +# CONFIG_LSPCI is not set +CONFIG_LSUSB=y +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +# CONFIG_FEATURE_MDEV_RENAME is not set +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +# CONFIG_FEATURE_MDEV_EXEC is not set +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +CONFIG_MKSWAP=y +# CONFIG_FEATURE_MKSWAP_UUID is not set +CONFIG_MORE=y +CONFIG_MOUNT=y +CONFIG_FEATURE_MOUNT_FAKE=y +CONFIG_FEATURE_MOUNT_VERBOSE=y +# CONFIG_FEATURE_MOUNT_HELPERS is not set +CONFIG_FEATURE_MOUNT_LABEL=y +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +# CONFIG_PIVOT_ROOT is not set +# CONFIG_RDATE is not set +CONFIG_RDEV=y +# CONFIG_READPROFILE is not set +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +# CONFIG_SETARCH is not set +CONFIG_SWAPONOFF=y +# CONFIG_FEATURE_SWAPON_PRI is not set +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +CONFIG_FEATURE_VOLUMEID_EXT=y +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +CONFIG_FEATURE_VOLUMEID_FAT=y +# 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=y +CONFIG_FEATURE_VOLUMEID_ISO9660=y +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y +# 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=y +CONFIG_NANDDUMP=y +CONFIG_SETSERIAL=y +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_ADJTIMEX is not set +CONFIG_BBCONFIG=y +CONFIG_FEATURE_COMPRESS_BBCONFIG=y +# 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 is not set +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_FEATURE_CROND_DIR="/system/etc/cron.d" +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=65536 +# CONFIG_FEATURE_LESS_BRACKETS is not set +# CONFIG_FEATURE_LESS_FLAGS is not set +CONFIG_FEATURE_LESS_MARKS=y +CONFIG_FEATURE_LESS_REGEXP=y +CONFIG_FEATURE_LESS_WINCH=y +# 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 is not set +CONFIG_MOUNTPOINT=y +# 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=y +CONFIG_SETSID=y +CONFIG_STRINGS=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +CONFIG_TIME=y +CONFIG_TIMEOUT=y +# CONFIG_TTYSIZE is not set +# CONFIG_VOLNAME is not set +# CONFIG_WALL is not set +# CONFIG_WATCHDOG is not set + +# +# Networking Utilities +# +# CONFIG_NAMEIF is not set +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +CONFIG_NBDCLIENT=y +CONFIG_NC=y +CONFIG_NC_SERVER=y +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +CONFIG_PING=y +# CONFIG_PING6 is not set +CONFIG_FEATURE_FANCY_PING=y +# CONFIG_WHOIS is not set +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=y +# CONFIG_ARPING is not set +CONFIG_BRCTL=y +CONFIG_FEATURE_BRCTL_FANCY=y +CONFIG_FEATURE_BRCTL_SHOW=y +CONFIG_DNSD=y +# CONFIG_ETHER_WAKE is not set +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTP_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +CONFIG_FTPGET=y +CONFIG_FTPPUT=y +CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y +# CONFIG_HOSTNAME is not set +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# 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=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +# CONFIG_FEATURE_IP_TUNNEL is not set +CONFIG_FEATURE_IP_RULE=y +# 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 is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +CONFIG_NETSTAT=y +CONFIG_FEATURE_NETSTAT_WIDE=y +CONFIG_FEATURE_NETSTAT_PRG=y +CONFIG_NSLOOKUP=y +CONFIG_NTPD=y +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_PSCAN is not set +CONFIG_ROUTE=y +# CONFIG_SLATTACH is not set +# CONFIG_TCPSVD is not set +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set +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 is not set +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +# CONFIG_TRACEROUTE6 is not set +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +# 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 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 is not set +# CONFIG_LPQ is not set + +# +# 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_NMETER is not set +CONFIG_PMAP=y +# CONFIG_POWERTOP is not set +CONFIG_PSTREE=y +CONFIG_PWDX=y +# CONFIG_SMEMCAP is not set +CONFIG_FREE=y +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 is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +CONFIG_FEATURE_TOP_SMP_CPU=y +CONFIG_FEATURE_TOP_DECIMALS=y +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +CONFIG_FEATURE_TOPMEM=y +CONFIG_FEATURE_SHOW_THREADS=y +CONFIG_UPTIME=y +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=y +# CONFIG_ASH_IDLE_TIMEOUT is not set +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +# CONFIG_ASH_GETOPTS is not set +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 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 is not set +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set + +# +# System Logging Utilities +# +# CONFIG_SYSLOGD is not set +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_FEATURE_REMOTE_LOG is not set +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +# CONFIG_KLOGD is not set +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set +# CONFIG_LOGGER is not set diff --git a/.config-minimal b/.config-minimal new file mode 100644 index 0000000..230e954 --- a/dev/null +++ b/.config-minimal @@ -0,0 +1,1000 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.19.0-cm71 +# Thu Jun 30 08:21:55 2011 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# CONFIG_DESKTOP is not set +# CONFIG_EXTRA_COMPAT is not set +# CONFIG_INCLUDE_SUSv2 is not set +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +CONFIG_FEATURE_COMPRESS_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +CONFIG_INSTALL_NO_USR=y +# 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=63 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +CONFIG_UNICODE_WIDE_WCHARS=y +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +CONFIG_UNICODE_PRESERVE_BROKEN=y +CONFIG_LONG_OPTS=y +# CONFIG_FEATURE_DEVPTS is not set +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_UTMP is not set +# CONFIG_FEATURE_WTMP is not set +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_FEATURE_SUID=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 is not set +# CONFIG_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +# CONFIG_LFS is not set +CONFIG_CROSS_COMPILER_PREFIX="arm-eabi-" +CONFIG_EXTRA_CFLAGS="-Os" + +# +# 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="/system/xbin/bb" + +# +# Busybox Library Tuning +# +# CONFIG_FEATURE_SYSTEMD is not set +# CONFIG_FEATURE_RTMINMAX is not set +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=y +CONFIG_FEATURE_EDITING_HISTORY=256 +# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set +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=y +CONFIG_IOCTL_HEX2STR_ERROR=y +# CONFIG_FEATURE_HWIB is not set + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +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 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 is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +# CONFIG_FEATURE_TAR_AUTODETECT is not set +CONFIG_FEATURE_TAR_FROM=y +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +# CONFIG_FEATURE_TAR_TO_COMMAND is not set +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +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 is not set +# CONFIG_LZMA is not set +CONFIG_UNXZ=y +# CONFIG_XZ is not set +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 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +# CONFIG_FEATURE_TR_EQUIV is not set +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 is not set +# CONFIG_COMM is not set +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=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set +CONFIG_EXPAND=y +# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set +CONFIG_EXPR=y +# CONFIG_EXPR_MATH_SUPPORT_64 is not set +CONFIG_FALSE=y +CONFIG_FOLD=y +# CONFIG_FSYNC is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_INSTALL=y +# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set +CONFIG_LN=y +# CONFIG_LOGNAME is not set +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +# CONFIG_FEATURE_MV_LONG_OPTIONS is not set +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_FEATURE_RMDIR_LONG_OPTIONS=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 is not set +CONFIG_SPLIT=y +# CONFIG_FEATURE_SPLIT_FANCY is not set +CONFIG_STAT=y +# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +CONFIG_TAC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +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 is not set +# 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 is not set +# CONFIG_FEATURE_RESIZE_PRINT is not set +# 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 is not set +CONFIG_RUN_PARTS=y +# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set +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_VI is not set +CONFIG_FEATURE_VI_MAX_LEN=0 +# CONFIG_FEATURE_VI_8BIT is not set +# CONFIG_FEATURE_VI_COLON is not set +# CONFIG_FEATURE_VI_YANKMARK is not set +# CONFIG_FEATURE_VI_SEARCH is not set +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +# CONFIG_FEATURE_VI_USE_SIGNALS is not set +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +# CONFIG_FEATURE_VI_WIN_RESIZE is not set +# CONFIG_FEATURE_VI_ASK_TERMINAL is not set +# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set +CONFIG_AWK=y +# CONFIG_FEATURE_AWK_LIBM is not set +CONFIG_CMP=y +CONFIG_DIFF=y +CONFIG_FEATURE_DIFF_LONG_OPTIONS=y +CONFIG_FEATURE_DIFF_DIR=y +# CONFIG_ED is not set +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 is not set +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 is not set +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +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 is not set +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 +# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP 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 is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +# CONFIG_USE_BB_CRYPT_SHA is not set +# CONFIG_ADDUSER is not set +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=0 +CONFIG_LAST_SYSTEM_ID=0 +# CONFIG_ADDGROUP is not set +# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_DELUSER is not set +# CONFIG_DELGROUP is not set +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +# CONFIG_GETTY is not set +# CONFIG_LOGIN is not set +# CONFIG_PAM is not set +# CONFIG_LOGIN_SCRIPTS is not set +# CONFIG_FEATURE_NOLOGIN is not set +# CONFIG_FEATURE_SECURETTY is not set +# CONFIG_PASSWD is not set +# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set +# CONFIG_CRYPTPW is not set +# CONFIG_CHPASSWD is not set +# CONFIG_SU is not set +# CONFIG_FEATURE_SU_SYSLOG is not set +# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +# CONFIG_FSCK is not set +CONFIG_LSATTR=y +CONFIG_TUNE2FS=y + +# +# Linux Module Utilities +# +CONFIG_MODINFO=y +CONFIG_MODPROBE_SMALL=y +CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED 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=y +# 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_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +CONFIG_BLOCKDEV=y +CONFIG_REV=y +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +# CONFIG_BLKID is not set +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +# 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=y +CONFIG_FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FINDFS is not set +# CONFIG_FLOCK is not set +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +CONFIG_MKFS_EXT2=y +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +CONFIG_MKFS_VFAT=y +CONFIG_GETOPT=y +# CONFIG_FEATURE_GETOPT_LONG is not set +CONFIG_HEXDUMP=y +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +# CONFIG_HWCLOCK is not set +# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set +# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set +# CONFIG_IPCRM is not set +# CONFIG_IPCS is not set +CONFIG_LOSETUP=y +CONFIG_LSPCI=y +CONFIG_LSUSB=y +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +# CONFIG_FEATURE_MDEV_RENAME is not set +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +# CONFIG_FEATURE_MDEV_EXEC is not set +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +CONFIG_MKSWAP=y +# CONFIG_FEATURE_MKSWAP_UUID is not set +CONFIG_MORE=y +CONFIG_MOUNT=y +# 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=y +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +# CONFIG_PIVOT_ROOT is not set +# CONFIG_RDATE is not set +CONFIG_RDEV=y +# CONFIG_READPROFILE is not set +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +# CONFIG_SETARCH is not set +CONFIG_SWAPONOFF=y +# CONFIG_FEATURE_SWAPON_PRI is not set +# CONFIG_SWITCH_ROOT is not set +CONFIG_UMOUNT=y +# CONFIG_FEATURE_UMOUNT_ALL is not set + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set +# CONFIG_FEATURE_MTAB_SUPPORT is not set +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +CONFIG_FEATURE_VOLUMEID_EXT=y +# CONFIG_FEATURE_VOLUMEID_BTRFS 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=y +CONFIG_NANDDUMP=y +CONFIG_SETSERIAL=y +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_ADJTIMEX is not set +CONFIG_BBCONFIG=y +CONFIG_FEATURE_COMPRESS_BBCONFIG=y +# 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 is not set +# CONFIG_CROND is not set +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_FEATURE_CROND_DIR="" +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_FEATURE_DC_LIBM is not set +# 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=65536 +# CONFIG_FEATURE_LESS_BRACKETS is not set +# CONFIG_FEATURE_LESS_FLAGS is not set +CONFIG_FEATURE_LESS_MARKS=y +CONFIG_FEATURE_LESS_REGEXP=y +CONFIG_FEATURE_LESS_WINCH=y +# 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=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +# CONFIG_MAN is not set +# CONFIG_MICROCOM is not set +CONFIG_MOUNTPOINT=y +# 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=y +# CONFIG_TIMEOUT is not set +# CONFIG_TTYSIZE is not set +# CONFIG_VOLNAME is not set +# 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 is not set +# CONFIG_NC_SERVER is not set +# CONFIG_NC_EXTRA is not set +# 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 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 is not set +# CONFIG_ETHER_WAKE is not set +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTP_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +# CONFIG_HOSTNAME is not set +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +# 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 is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS 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_PSCAN is not set +# CONFIG_ROUTE is not set +# CONFIG_SLATTACH is not set +# CONFIG_TCPSVD is not set +# CONFIG_TELNET is not set +# CONFIG_FEATURE_TELNET_TTYPE is not set +# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +# CONFIG_TFTP is not set +# CONFIG_TFTPD is not set +# CONFIG_FEATURE_TFTP_GET is not set +# CONFIG_FEATURE_TFTP_PUT is not set +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_TFTP_DEBUG is not set +# CONFIG_TRACEROUTE is not set +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL 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 is not set +# CONFIG_VCONFIG is not set +# CONFIG_WGET is not set +# CONFIG_FEATURE_WGET_STATUSBAR is not set +# CONFIG_FEATURE_WGET_AUTHENTICATION is not set +# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_FEATURE_WGET_TIMEOUT is not set +# CONFIG_ZCIP is not set + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# 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 is not set +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +CONFIG_PSTREE=y +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +CONFIG_FREE=y +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 is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +# CONFIG_FEATURE_TOP_SMP_CPU is not set +CONFIG_FEATURE_TOP_DECIMALS=y +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +CONFIG_FEATURE_TOPMEM=y +CONFIG_FEATURE_SHOW_THREADS=y +CONFIG_UPTIME=y +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=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 is not set +CONFIG_ASH_EXPAND_PRMT=y +# 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 is not set +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set + +# +# System Logging Utilities +# +# CONFIG_SYSLOGD is not set +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_FEATURE_REMOTE_LOG is not set +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +# CONFIG_KLOGD is not set +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set +# CONFIG_LOGGER is not set @@ -13,6 +13,7 @@ Config.in # Never ignore these # !.gitignore +!.config* # # Normal output @@ -28,6 +29,7 @@ Config.in *.orig *.rej /*.patch +/.config.old # # debugging stuff diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..4c4486d --- a/dev/null +++ b/Android.mk @@ -0,0 +1,144 @@ +LOCAL_PATH := $(call my-dir) + +# Make a static library for clearsilver's regex. +# This prevents multiple symbol definition error.... +include $(CLEAR_VARS) +LOCAL_SRC_FILES := ../clearsilver/util/regex/regex.c +LOCAL_MODULE := libclearsilverregex +LOCAL_C_INCLUDES := \ + external/clearsilver \ + external/clearsilver/util/regex +include $(BUILD_STATIC_LIBRARY) + + +SUBMAKE := make -s -C $(LOCAL_PATH) CC=$(CC) + +KERNEL_MODULES_DIR?=/system/lib/modules + +BUSYBOX_SRC_FILES = $(shell cat $(LOCAL_PATH)/busybox-$(BUSYBOX_CONFIG).sources) \ + libbb/android.c + +ifeq ($(TARGET_ARCH),arm) + BUSYBOX_SRC_FILES += \ + android/libc/arch-arm/syscalls/adjtimex.S \ + android/libc/arch-arm/syscalls/getsid.S \ + android/libc/arch-arm/syscalls/stime.S \ + android/libc/arch-arm/syscalls/swapon.S \ + android/libc/arch-arm/syscalls/swapoff.S \ + android/libc/arch-arm/syscalls/sysinfo.S +endif + +BUSYBOX_C_INCLUDES = \ + $(LOCAL_PATH)/include-$(BUSYBOX_CONFIG) \ + $(LOCAL_PATH)/include $(LOCAL_PATH)/libbb \ + external/clearsilver \ + external/clearsilver/util/regex \ + bionic/libc/private \ + bionic/libm/include \ + bionic/libm \ + libc/kernel/common + +BUSYBOX_CFLAGS = \ + -std=gnu99 \ + -Werror=implicit \ + -DNDEBUG \ + -DANDROID_CHANGES \ + -include include-$(BUSYBOX_CONFIG)/autoconf.h \ + -D'CONFIG_DEFAULT_MODULES_DIR="$(KERNEL_MODULES_DIR)"' \ + -D'BB_VER="$(strip $(shell $(SUBMAKE) kernelversion)) $(BUSYBOX_SUFFIX)"' -DBB_BT=AUTOCONF_TIMESTAMP + +# execute make clean, make prepare and copy profiles required for normal & static busybox (recovery) +include $(CLEAR_VARS) +BUSYBOX_CONFIG := full minimal +$(BUSYBOX_CONFIG): + @echo GENERATE INCLUDES FOR BUSYBOX $@ + @cd $(LOCAL_PATH) && make clean + cp $(LOCAL_PATH)/.config-$@ $(LOCAL_PATH)/.config + cd $(LOCAL_PATH) && make prepare + cd $(LOCAL_PATH)/include-$@ && ./copy-current.sh + cd $(LOCAL_PATH)/include && rm usage_compressed.h + cd $(LOCAL_PATH) +busybox_prepare: $(BUSYBOX_CONFIG) +LOCAL_MODULE := busybox_prepare +LOCAL_MODULE_TAGS := eng +include $(BUILD_STATIC_LIBRARY) + +include $(CLEAR_VARS) +BUSYBOX_CONFIG:=full +BUSYBOX_SUFFIX:=bionic +LOCAL_SRC_FILES := $(BUSYBOX_SRC_FILES) +LOCAL_C_INCLUDES := $(BUSYBOX_C_INCLUDES) +LOCAL_CFLAGS := $(BUSYBOX_CFLAGS) +LOCAL_MODULE := busybox +LOCAL_MODULE_TAGS := eng +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) +LOCAL_STATIC_LIBRARIES += busybox_prepare libclearsilverregex +include $(BUILD_EXECUTABLE) + +BUSYBOX_LINKS := $(shell cat $(LOCAL_PATH)/busybox-$(BUSYBOX_CONFIG).links) +# nc is provided by external/netcat +exclude := nc +SYMLINKS := $(addprefix $(TARGET_OUT_OPTIONAL_EXECUTABLES)/,$(filter-out $(exclude),$(notdir $(BUSYBOX_LINKS)))) +$(SYMLINKS): BUSYBOX_BINARY := $(LOCAL_MODULE) +$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @echo "Symlink: $@ -> $(BUSYBOX_BINARY)" + @mkdir -p $(dir $@) + @rm -rf $@ + $(hide) ln -sf $(BUSYBOX_BINARY) $@ + +ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS) + +# We need this so that the installed files could be picked up based on the +# local module name +ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ + $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS) + +# Build a static busybox for the recovery image +include $(CLEAR_VARS) +BUSYBOX_CONFIG:=minimal +BUSYBOX_SUFFIX:=static +LOCAL_SRC_FILES := $(BUSYBOX_SRC_FILES) +LOCAL_C_INCLUDES := $(BUSYBOX_C_INCLUDES) +LOCAL_CFLAGS := -Dmain=busybox_driver $(BUSYBOX_CFLAGS) +LOCAL_CFLAGS += \ + -Dgetusershell=busybox_getusershell \ + -Dsetusershell=busybox_setusershell \ + -Dendusershell=busybox_endusershell \ + -Dttyname_r=busybox_ttyname_r \ + -Dgetmntent=busybox_getmntent \ + -Dgetmntent_r=busybox_getmntent_r \ + -Dgenerate_uuid=busybox_generate_uuid +LOCAL_MODULE := libbusybox +LOCAL_MODULE_TAGS := eng +LOCAL_STATIC_LIBRARIES += busybox_prepare libclearsilverregex libcutils libc libm +include $(BUILD_STATIC_LIBRARY) + + +# Build a static busybox (sample, no more used) +ifeq (1,0) + +include $(CLEAR_VARS) +BUSYBOX_CONFIG:=full +BUSYBOX_SUFFIX:=static +LOCAL_SRC_FILES := $(BUSYBOX_SRC_FILES) +LOCAL_C_INCLUDES := $(BUSYBOX_C_INCLUDES) +LOCAL_CFLAGS := $(BUSYBOX_CFLAGS) +LOCAL_CFLAGS += \ + -Dgetusershell=busybox_getusershell \ + -Dsetusershell=busybox_setusershell \ + -Dendusershell=busybox_endusershell \ + -Dttyname_r=busybox_ttyname_r \ + -Dgetmntent=busybox_getmntent \ + -Dgetmntent_r=busybox_getmntent_r \ + -Dgenerate_uuid=busybox_generate_uuid +LOCAL_FORCE_STATIC_EXECUTABLE := true +LOCAL_MODULE := bootmenu_busybox +LOCAL_MODULE_TAGS := optional +LOCAL_STATIC_LIBRARIES += libclearsilverregex libcutils libc libm +LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES +LOCAL_MODULE_PATH := $(PRODUCT_OUT)/system/bootmenu/binary +LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/utilities +LOCAL_MODULE_STEM := busybox +include $(BUILD_EXECUTABLE) + +endif diff --git a/CleanSpec.mk b/CleanSpec.mk new file mode 100644 index 0000000..07c84ef --- a/dev/null +++ b/CleanSpec.mk @@ -0,0 +1,53 @@ +# Copyright (C) 2007 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# If you don't need to do a full clean build but would like to touch +# a file or delete some intermediate files, add a clean step to the end +# of the list. These steps will only be run once, if they haven't been +# run before. +# +# E.g.: +# $(call add-clean-step, touch -c external/sqlite/sqlite3.h) +# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) +# +# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with +# files that are missing or have been moved. +# +# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. +# Use $(OUT_DIR) to refer to the "out" directory. +# +# If you need to re-do something that's already mentioned, just copy +# the command and add it to the bottom of the list. E.g., if a change +# that you made last week required touching a file and a change you +# made today requires touching the same file, just copy the old +# touch step and add it to the end of the list. +# +# ************************************************ +# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST +# ************************************************ + +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/busybox_prepare) + +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/busybox_intermediates) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libbusybox_intermediates) + +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/UTILITY_EXECUTABLES/bootmenu_busybox_intermediates) + +$(call add-clean-step, rm $(PRODUCT_OUT)/symbols/system/xbin/busybox) + +# ************************************************ +# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST +# ************************************************ + @@ -1,8 +1,8 @@ VERSION = 1 PATCHLEVEL = 19 SUBLEVEL = 0 -EXTRAVERSION = .git -NAME = Unnamed +EXTRAVERSION = -cm71 +NAME = bionic # *DOCUMENTATION* # To see a list of typical targets execute "make help" @@ -1343,6 +1343,11 @@ endif # skip-makefile PHONY += FORCE FORCE: +show-sources: + @for f in $(busybox-dirs) ; do \ + $(MAKE) $(build)=$$f show-src ; \ + done + -include $(srctree)/Makefile.custom # Declare the contents of the .PHONY variable as phony. We keep that @@ -1,6 +1,28 @@ Please see the LICENSE file for details on copying and usage. Please refer to the INSTALL file for instructions on how to build. +---------------- +Note about this Android Variant : + +WARNING : THIS IS A BIONIC VERSION OF BUSYBOX, DO NOT USE "make" IN THIS TREE + +This tree has multiple configurations, + +- select the wanted config profile (full or minimal) : + cp .config-full .config + +- type "make menuconfig" to update .config +- type "make prepare" to generate include/ files +- copy the generated files in include-full/ or include-minimal/ + + (there is a script to copy files inside these directories) + + finally copy .config to .config-full or .config-minimal + + please also check busybox-profile.links and busybox-profile.sources + +---------------- + What is busybox: BusyBox combines tiny versions of many common UNIX utilities into a single diff --git a/android/libc/arch-arm/syscalls/adjtimex.S b/android/libc/arch-arm/syscalls/adjtimex.S new file mode 100644 index 0000000..ad2d2e7 --- a/dev/null +++ b/android/libc/arch-arm/syscalls/adjtimex.S @@ -0,0 +1,19 @@ +/* autogenerated by gensyscalls.py */ +#include <asm/unistd.h> + + .text + .type adjtimex, #function + .globl adjtimex + .align 4 + .fnstart + +adjtimex: + .save {r4, r7} + stmfd sp!, {r4, r7} + ldr r7, =__NR_adjtimex + swi #0 + ldmfd sp!, {r4, r7} + movs r0, r0 + bxpl lr + b __set_syscall_errno + .fnend diff --git a/android/libc/arch-arm/syscalls/getsid.S b/android/libc/arch-arm/syscalls/getsid.S new file mode 100644 index 0000000..1ae88cc --- a/dev/null +++ b/android/libc/arch-arm/syscalls/getsid.S @@ -0,0 +1,19 @@ +/* autogenerated by gensyscalls.py */ +#include <asm/unistd.h> + + .text + .type getsid, #function + .globl getsid + .align 4 + .fnstart + +getsid: + .save {r4, r7} + stmfd sp!, {r4, r7} + ldr r7, =__NR_getsid + swi #0 + ldmfd sp!, {r4, r7} + movs r0, r0 + bxpl lr + b __set_syscall_errno + .fnend diff --git a/android/libc/arch-arm/syscalls/stime.S b/android/libc/arch-arm/syscalls/stime.S new file mode 100644 index 0000000..7c7dc2c --- a/dev/null +++ b/android/libc/arch-arm/syscalls/stime.S @@ -0,0 +1,20 @@ +/* autogenerated by gensyscalls.py */ +#define __KERNEL__ +#include <asm/unistd.h> + + .text + .type stime, #function + .globl stime + .align 4 + .fnstart + +stime: + .save {r4, r7} + stmfd sp!, {r4, r7} + ldr r7, =__NR_stime + swi #0 + ldmfd sp!, {r4, r7} + movs r0, r0 + bxpl lr + b __set_syscall_errno + .fnend diff --git a/android/libc/arch-arm/syscalls/swapoff.S b/android/libc/arch-arm/syscalls/swapoff.S new file mode 100644 index 0000000..5c1a5b9 --- a/dev/null +++ b/android/libc/arch-arm/syscalls/swapoff.S @@ -0,0 +1,19 @@ +/* autogenerated by gensyscalls.py */ +#include <asm/unistd.h> + + .text + .type swapoff, #function + .globl swapoff + .align 4 + .fnstart + +swapoff: + .save {r4, r7} + stmfd sp!, {r4, r7} + ldr r7, =__NR_swapoff + swi #0 + ldmfd sp!, {r4, r7} + movs r0, r0 + bxpl lr + b __set_syscall_errno + .fnend diff --git a/android/libc/arch-arm/syscalls/swapon.S b/android/libc/arch-arm/syscalls/swapon.S new file mode 100644 index 0000000..eb54576 --- a/dev/null +++ b/android/libc/arch-arm/syscalls/swapon.S @@ -0,0 +1,19 @@ +/* autogenerated by gensyscalls.py */ +#include <asm/unistd.h> + + .text + .type swapon, #function + .globl swapon + .align 4 + .fnstart + +swapon: + .save {r4, r7} + stmfd sp!, {r4, r7} + ldr r7, =__NR_swapon + swi #0 + ldmfd sp!, {r4, r7} + movs r0, r0 + bxpl lr + b __set_syscall_errno + .fnend diff --git a/android/libc/arch-arm/syscalls/sysinfo.S b/android/libc/arch-arm/syscalls/sysinfo.S new file mode 100644 index 0000000..ffc1bea --- a/dev/null +++ b/android/libc/arch-arm/syscalls/sysinfo.S @@ -0,0 +1,19 @@ +/* autogenerated by gensyscalls.py */ +#include <asm/unistd.h> + + .text + .type sysinfo, #function + .globl sysinfo + .align 4 + .fnstart + +sysinfo: + .save {r4, r7} + stmfd sp!, {r4, r7} + ldr r7, =__NR_sysinfo + swi #0 + ldmfd sp!, {r4, r7} + movs r0, r0 + bxpl lr + b __set_syscall_errno + .fnend diff --git a/android/reboot.c b/android/reboot.c new file mode 100644 index 0000000..2d07728 --- a/dev/null +++ b/android/reboot.c @@ -0,0 +1,60 @@ +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#include <sys/reboot.h> +#include <unistd.h> + +int reboot_main(int argc, char *argv[]) +{ + int ret; + int nosync = 0; + int poweroff = 0; + + opterr = 0; + do { + int c; + + c = getopt(argc, argv, "np"); + + if (c == EOF) { + break; + } + + switch (c) { + case 'n': + nosync = 1; + break; + case 'p': + poweroff = 1; + break; + case '?': + fprintf(stderr, "usage: %s [-n] [-p] [rebootcommand]\n", argv[0]); + exit(EXIT_FAILURE); + } + } while (1); + + if(argc > optind + 1) { + fprintf(stderr, "%s: too many arguments\n", argv[0]); + exit(EXIT_FAILURE); + } + + if(!nosync) + sync(); + + if(poweroff) + ret = __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_POWER_OFF, NULL); + else if(argc > optind) { +#ifdef RECOVERY_PRE_COMMAND + if (!strncmp(argv[optind],"recovery",8)) + system( RECOVERY_PRE_COMMAND ); +#endif + ret = __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, argv[optind]); + } else + ret = reboot(RB_AUTOBOOT); + if(ret < 0) { + perror("reboot"); + exit(EXIT_FAILURE); + } + fprintf(stderr, "reboot returned\n"); + return 0; +} diff --git a/applets/applets.c b/applets/applets.c index 98c2b44..c458a71 100644 --- a/applets/applets.c +++ b/applets/applets.c @@ -6,9 +6,8 @@ * * Licensed under GPLv2, see file LICENSE in this source tree. */ -#include "busybox.h" - #if ENABLE_BUILD_LIBBUSYBOX +#include "busybox.h" int main(int argc UNUSED_PARAM, char **argv) { return lbb_main(argv); diff --git a/archival/libarchive/data_extract_to_command.c b/archival/libarchive/data_extract_to_command.c index 0e97704..31a13a2 100644 --- a/archival/libarchive/data_extract_to_command.c +++ b/archival/libarchive/data_extract_to_command.c @@ -38,7 +38,7 @@ static const char *const tar_var[] = { static void xputenv(char *str) { if (putenv(str)) - bb_error_msg_and_die(bb_msg_memory_exhausted); + bb_error_msg_and_die("%s", bb_msg_memory_exhausted); } static void str2env(char *env[], int idx, const char *str) diff --git a/archival/tar.c b/archival/tar.c index 3e90d46..b0716b1 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -349,7 +349,7 @@ static int writeTarHeader(struct TarBallInfo *tbInfo, *p8 |= 0x80; } else { bb_error_msg_and_die("can't store file '%s' " - "of size %"OFF_FMT"u, aborting", + "of size %"FILESIZE_FMT"u, aborting", fileName, statbuf->st_size); } header.typeflag = REGTYPE; diff --git a/busybox-full.links b/busybox-full.links new file mode 100644 index 0000000..2061dd9 --- a/dev/null +++ b/busybox-full.links @@ -0,0 +1,202 @@ +/bin/[ +/bin/[[ +/sbin/arp +/bin/ash +/bin/awk +/bin/base64 +/bin/basename +/bin/bbconfig +/sbin/blockdev +/sbin/brctl +/bin/bunzip2 +/bin/bzcat +/bin/bzip2 +/bin/cal +/bin/cat +/bin/catv +/bin/chattr +/bin/chgrp +/bin/chmod +/bin/chown +/sbin/chroot +/bin/clear +/bin/cmp +/bin/comm +/bin/cp +/bin/cpio +/sbin/crond +/bin/crontab +/bin/cut +/bin/date +/bin/dc +/bin/dd +/sbin/depmod +/sbin/devmem +/bin/df +/bin/diff +/bin/dirname +/bin/dmesg +/sbin/dnsd +/bin/dos2unix +/bin/du +/bin/echo +/bin/ed +/bin/egrep +/bin/env +/bin/expand +/bin/expr +/bin/false +/sbin/fdisk +/bin/fgrep +/bin/find +/bin/flock +/bin/fold +/bin/free +/sbin/freeramdisk +/bin/fsync +/bin/ftpget +/bin/ftpput +/bin/fuser +/bin/getopt +/bin/grep +/bin/groups +/bin/gunzip +/bin/gzip +/sbin/halt +/bin/head +/bin/hexdump +/bin/id +/sbin/ifconfig +/sbin/insmod +/bin/iostat +/bin/install +/bin/ip +/bin/kill +/bin/killall +/bin/killall5 +/bin/length +/bin/less +/bin/ln +/sbin/losetup +/bin/ls +/bin/lsattr +/sbin/lsmod +/bin/lsusb +/bin/lzcat +/bin/lzma +/bin/lzop +/bin/lzopcat +/bin/md5sum +/bin/mkdir +/sbin/mke2fs +/bin/mkfifo +/sbin/mkfs.ext2 +/sbin/mkfs.vfat +/bin/mknod +/sbin/mkswap +/bin/mktemp +/sbin/modinfo +/sbin/modprobe +/bin/more +/bin/mount +/bin/mountpoint +/bin/mpstat +/bin/mv +/sbin/nanddump +/sbin/nandwrite +/bin/nc +/bin/netstat +/bin/nice +/bin/nohup +/bin/nslookup +/sbin/ntpd +/bin/od +/bin/patch +/bin/pgrep +/bin/pidof +/bin/ping +/bin/pkill +/bin/printenv +/bin/printf +/bin/ps +/bin/pstree +/bin/pmap +/sbin/poweroff +/bin/pwd +/bin/pwdx +/sbin/rdev +/bin/readlink +/bin/realpath +/bin/renice +/bin/reset +/bin/resize +/bin/rev +/bin/rm +/bin/rmdir +/sbin/rmmod +/sbin/route +/bin/run-parts +/bin/rx +/bin/sed +/bin/seq +/sbin/setconsole +/bin/setserial +/bin/setsid +/bin/sh +/bin/sha1sum +/bin/sha256sum +/bin/sha512sum +/bin/sleep +/bin/sort +/bin/split +/bin/stat +/bin/strings +/bin/stty +/bin/sum +/sbin/swapoff +/sbin/swapon +/bin/sync +/sbin/sysctl +/bin/tac +/bin/tail +/bin/tar +/bin/tee +/bin/telnet +/sbin/telnetd +/bin/test +/bin/tftp +/bin/tftpd +/bin/time +/bin/timeout +/bin/top +/bin/touch +/bin/tr +/bin/traceroute +/bin/true +/bin/tty +/sbin/tune2fs +/bin/umount +/bin/uname +/bin/uncompress +/bin/unexpand +/bin/uniq +/bin/unix2dos +/bin/unxz +/bin/unlzma +/bin/unlzop +/bin/unzip +/bin/uptime +/bin/usleep +/bin/uudecode +/bin/uuencode +/bin/vi +/bin/watch +/bin/wc +/bin/wget +/bin/which +/bin/whoami +/bin/xargs +/bin/xzcat +/bin/xz +/bin/yes +/bin/zcat diff --git a/busybox-full.sources b/busybox-full.sources new file mode 100644 index 0000000..e5c7df5 --- a/dev/null +++ b/busybox-full.sources @@ -0,0 +1,46 @@ + +archival/bbunzip.c archival/bzip2.c archival/cpio.c archival/gzip.c archival/libarchive/lzo1x_1.c archival/libarchive/lzo1x_1o.c archival/libarchive/lzo1x_d.c archival/lzop.c archival/tar.c archival/unzip.c +archival/libarchive/data_align.c archival/libarchive/data_extract_all.c archival/libarchive/data_extract_to_command.c archival/libarchive/data_extract_to_stdout.c archival/libarchive/data_skip.c archival/libarchive/decompress_bunzip2.c archival/libarchive/decompress_unlzma.c archival/libarchive/decompress_unxz.c archival/libarchive/decompress_unzip.c archival/libarchive/decompress_uncompress.c archival/libarchive/filter_accept_all.c archival/libarchive/filter_accept_list.c archival/libarchive/filter_accept_reject_list.c archival/libarchive/find_list_entry.c archival/libarchive/get_header_cpio.c archival/libarchive/get_header_tar.c archival/libarchive/get_header_tar_bz2.c archival/libarchive/get_header_tar_gz.c archival/libarchive/get_header_tar_lzma.c archival/libarchive/header_list.c archival/libarchive/header_skip.c archival/libarchive/header_verbose_list.c archival/libarchive/init_handle.c archival/libarchive/open_transformer.c archival/libarchive/seek_by_jump.c archival/libarchive/seek_by_read.c + +console-tools/clear.c console-tools/reset.c console-tools/resize.c console-tools/setconsole.c + +coreutils/basename.c coreutils/cal.c coreutils/cat.c coreutils/catv.c coreutils/chgrp.c coreutils/chmod.c coreutils/chown.c coreutils/chroot.c coreutils/cp.c coreutils/cut.c coreutils/date.c coreutils/dd.c coreutils/df.c coreutils/dirname.c coreutils/dos2unix.c coreutils/du.c coreutils/echo.c coreutils/env.c coreutils/expr.c coreutils/false.c coreutils/fold.c coreutils/head.c coreutils/id.c coreutils/install.c coreutils/ln.c coreutils/ls.c coreutils/md5_sha1_sum.c coreutils/mkdir.c coreutils/mkfifo.c coreutils/mknod.c coreutils/mv.c coreutils/nice.c coreutils/nohup.c coreutils/od.c coreutils/printenv.c coreutils/printf.c coreutils/pwd.c coreutils/readlink.c coreutils/realpath.c coreutils/rm.c coreutils/rmdir.c coreutils/seq.c coreutils/sleep.c coreutils/sort.c coreutils/split.c coreutils/stat.c coreutils/stty.c coreutils/sync.c coreutils/tac.c coreutils/tail.c coreutils/tee.c coreutils/test.c coreutils/test_ptr_hack.c coreutils/touch.c coreutils/tr.c coreutils/true.c coreutils/tty.c coreutils/uname.c coreutils/uniq.c coreutils/usleep.c coreutils/uudecode.c coreutils/uuencode.c coreutils/wc.c coreutils/whoami.c coreutils/yes.c +coreutils/libcoreutils/cp_mv_stat.c coreutils/libcoreutils/getopt_mk_fifo_nod.c +coreutils/comm.c coreutils/expand.c coreutils/sum.c coreutils/fsync.c + +debianutils/mktemp.c debianutils/run_parts.c debianutils/which.c debianutils/pipe_progress.c + +editors/awk.c editors/cmp.c editors/diff.c editors/ed.c editors/patch.c editors/sed.c editors/vi.c +e2fsprogs/e2fs_lib.c e2fsprogs/chattr.c e2fsprogs/lsattr.c e2fsprogs/tune2fs.c e2fsprogs/fsck.c + +findutils/find.c findutils/grep.c findutils/xargs.c + +init/halt.c + +libbb/appletlib.c libbb/ask_confirmation.c libbb/bb_askpass.c libbb/bb_do_delay.c libbb/bb_pwd.c libbb/bb_qsort.c libbb/bb_strtonum.c libbb/change_identity.c libbb/chomp.c libbb/compare_string_array.c libbb/concat_path_file.c libbb/concat_subpath_file.c libbb/copy_file.c libbb/copyfd.c libbb/crc32.c libbb/create_icmp6_socket.c libbb/create_icmp_socket.c libbb/default_error_retval.c libbb/device_open.c libbb/dump.c libbb/execable.c libbb/fclose_nonstdin.c libbb/fflush_stdout_and_exit.c libbb/fgets_str.c libbb/find_mount_point.c libbb/find_pid_by_name.c libbb/find_root_device.c libbb/full_write.c libbb/get_console.c libbb/get_last_path_component.c libbb/get_line_from_file.c libbb/get_volsize.c libbb/getopt32.c libbb/getpty.c libbb/herror_msg.c libbb/human_readable.c libbb/inet_common.c libbb/info_msg.c libbb/inode_hash.c libbb/isdirectory.c libbb/kernel_version.c libbb/last_char_is.c libbb/lineedit.c libbb/lineedit_ptr_hack.c libbb/llist.c libbb/login.c libbb/loop.c libbb/make_directory.c libbb/makedev.c libbb/match_fstype.c libbb/hash_md5_sha.c libbb/bb_bswap_64.c libbb/messages.c libbb/mode_string.c libbb/mtab.c libbb/parse_config.c libbb/parse_mode.c libbb/perror_msg.c libbb/perror_nomsg.c libbb/perror_nomsg_and_die.c libbb/pidfile.c libbb/platform.c libbb/print_flags.c libbb/printable.c libbb/printable_string.c libbb/process_escape_sequence.c libbb/procps.c libbb/progress.c libbb/ptr_to_globals.c libbb/read.c libbb/read_key.c libbb/read_printf.c libbb/recursive_action.c libbb/remove_file.c libbb/run_shell.c libbb/safe_gethostname.c libbb/safe_poll.c libbb/safe_strncpy.c libbb/safe_write.c libbb/setup_environment.c libbb/signals.c libbb/simplify_path.c libbb/single_argv.c libbb/skip_whitespace.c libbb/speed_table.c libbb/str_tolower.c libbb/strrstr.c libbb/time.c libbb/trim.c libbb/u_signal_names.c libbb/udp_io.c libbb/unicode.c libbb/uuencode.c libbb/vdprintf.c libbb/verror_msg.c libbb/vfork_daemon_rexec.c libbb/warn_ignoring_args.c libbb/wfopen.c libbb/wfopen_input.c libbb/write.c libbb/xatonum.c libbb/xconnect.c libbb/xfunc_die.c libbb/xfuncs.c libbb/xfuncs_printf.c libbb/xgetcwd.c libbb/xgethostbyname.c libbb/xreadlink.c libbb/xrealloc_vector.c libbb/xregcomp.c +libpwdgrp/uidgid_get.c +libbb/get_cpu_count.c +libbb/get_shell_name.c + +miscutils/bbconfig.c ./miscutils/crond.c ./miscutils/crontab.c miscutils/dc.c miscutils/devmem.c miscutils/less.c miscutils/mountpoint.c miscutils/nandwrite.c +miscutils/rx.c miscutils/setserial.c miscutils/setsid.c miscutils/strings.c miscutils/time.c miscutils/timeout.c + +modutils/modinfo.c modutils/modprobe-small.c modutils/modutils.c +modutils/lsmod.c modutils/depmod.c modutils/rmmod.c modutils/insmod.c + +networking/arp.c networking/brctl.c networking/dnsd.c networking/ifconfig.c networking/interface.c networking/ip.c networking/nc.c networking/netstat.c networking/nslookup.c networking/ntpd.c networking/ping.c networking/route.c networking/telnet.c networking/telnetd.c networking/tftp.c networking/traceroute.c networking/wget.c +networking/libiproute/ip_parse_common_args.c networking/libiproute/ipaddress.c networking/libiproute/iplink.c networking/libiproute/iproute.c networking/libiproute/iprule.c networking/libiproute/libnetlink.c networking/libiproute/ll_addr.c networking/libiproute/ll_map.c networking/libiproute/ll_proto.c networking/libiproute/ll_types.c networking/libiproute/rt_names.c networking/libiproute/rtm_map.c networking/libiproute/utils.c +networking/nbd-client.c +networking/ifupdown.c networking/ftpgetput.c + +procps/free.c procps/fuser.c procps/kill.c procps/pgrep.c procps/pidof.c procps/ps.c procps/renice.c procps/sysctl.c procps/top.c procps/uptime.c procps/watch.c +procps/pmap.c procps/iostat.c procps/mpstat.c +procps/pstree.c procps/pwdx.c + +shell/ash.c shell/ash_ptr_hack.c shell/math.c shell/random.c shell/shell_common.c + +util-linux/dmesg.c util-linux/fdisk.c util-linux/flock.c util-linux/freeramdisk.c util-linux/getopt.c util-linux/hexdump.c util-linux/losetup.c util-linux/lspci.c util-linux/lsusb.c util-linux/mkfs_ext2.c util-linux/mkswap.c util-linux/more.c util-linux/mount.c util-linux/rdev.c util-linux/rev.c util-linux/swaponoff.c util-linux/umount.c +util-linux/switch_root.c util-linux/blockdev.c + +util-linux/volume_id/get_devname.c util-linux/volume_id/volume_id.c util-linux/volume_id/util.c util-linux/volume_id/ext.c +util-linux/volume_id/fat.c util-linux/volume_id/iso9660.c util-linux/mkfs_vfat.c util-linux/volume_id/ntfs.c util-linux/volume_id/linux_swap.c diff --git a/busybox-minimal.links b/busybox-minimal.links new file mode 100644 index 0000000..3e35bff --- a/dev/null +++ b/busybox-minimal.links @@ -0,0 +1,161 @@ +/bin/[ +/bin/[[ +/bin/ash +/bin/awk +/bin/basename +/bin/bbconfig +/bin/bzcat +/bin/bzip2 +/bin/bunzip2 +/bin/cal +/bin/cat +/bin/catv +/bin/chattr +/bin/chgrp +/bin/chmod +/bin/chown +/sbin/chroot +/bin/cksum +/bin/clear +/bin/cmp +/bin/cp +/bin/cpio +/sbin/nanddump +/sbin/nandwrite +/bin/cut +/bin/date +/bin/dc +/bin/dd +/sbin/depmod +/sbin/devmem +/bin/df +/bin/diff +/bin/dirname +/bin/dmesg +/bin/dos2unix +/bin/du +/bin/echo +/bin/egrep +/bin/env +/bin/expand +/bin/expr +/bin/false +/sbin/fdisk +/bin/fgrep +/bin/find +/bin/fold +/bin/free +/sbin/freeramdisk +/bin/fuser +/bin/getopt +/bin/grep +/bin/groups +/bin/gunzip +/bin/gzip +/bin/head +/bin/hexdump +/bin/id +/sbin/insmod +/bin/install +/bin/kill +/bin/killall +/bin/killall5 +/bin/length +/bin/less +/bin/ln +/sbin/losetup +/bin/ls +/bin/lsattr +/sbin/lsmod +/bin/lspci +/bin/lsusb +/bin/lzcat +/bin/lzop +/bin/lzopcat +/sbin/makedevs +/bin/md5sum +/bin/mkdir +/sbin/mke2fs +/bin/mkfifo +/sbin/mkfs.ext2 +/bin/mknod +/sbin/mkswap +/bin/mktemp +/sbin/modinfo +/sbin/modprobe +/bin/more +/bin/mount +/bin/mountpoint +/bin/mv +/bin/nice +/bin/nohup +/bin/od +/bin/patch +/bin/pgrep +/bin/pidof +/bin/pkill +/bin/printenv +/bin/printf +/bin/ps +/bin/pstree +/bin/pwd +/sbin/rdev +/bin/readlink +/bin/realpath +/bin/renice +/bin/reset +/bin/rev +/bin/rm +/bin/rmdir +/sbin/rmmod +/bin/run-parts +/bin/sed +/bin/seq +/bin/setserial +/bin/setsid +/bin/sh +/bin/sha1sum +/bin/sha256sum +/bin/sha512sum +/bin/sleep +/bin/sort +/bin/split +/bin/stat +/bin/strings +/bin/stty +/sbin/swapoff +/sbin/swapon +/bin/sync +/sbin/sysctl +/bin/tac +/bin/tail +/bin/tar +/bin/tee +/bin/test +/bin/time +/bin/top +/bin/touch +/bin/tr +/bin/true +/bin/tty +/bin/umount +/bin/uname +/bin/unexpand +/bin/uniq +/bin/unix2dos +/bin/unlzma +/bin/unlzop +/bin/unxz +/bin/unzip +/bin/uptime +/bin/usleep +/bin/uudecode +/bin/uuencode +/bin/watch +/bin/wc +/bin/which +/bin/whoami +/bin/xargs +/bin/xzcat +/bin/yes +/bin/zcat diff --git a/busybox-minimal.sources b/busybox-minimal.sources new file mode 100644 index 0000000..c24e4d7 --- a/dev/null +++ b/busybox-minimal.sources @@ -0,0 +1,33 @@ + +archival/bbunzip.c archival/bzip2.c archival/cpio.c archival/gzip.c archival/libarchive/lzo1x_1.c archival/libarchive/lzo1x_1o.c archival/libarchive/lzo1x_d.c archival/lzop.c archival/tar.c archival/unzip.c +archival/libarchive/data_align.c archival/libarchive/data_extract_all.c archival/libarchive/data_extract_to_stdout.c archival/libarchive/data_skip.c archival/libarchive/decompress_bunzip2.c archival/libarchive/decompress_unzip.c archival/libarchive/filter_accept_all.c archival/libarchive/filter_accept_list.c archival/libarchive/filter_accept_reject_list.c archival/libarchive/find_list_entry.c archival/libarchive/get_header_cpio.c archival/libarchive/get_header_tar.c archival/libarchive/get_header_tar_bz2.c archival/libarchive/get_header_tar_gz.c archival/libarchive/header_list.c archival/libarchive/header_skip.c archival/libarchive/header_verbose_list.c archival/libarchive/init_handle.c archival/libarchive/open_transformer.c archival/libarchive/seek_by_jump.c archival/libarchive/seek_by_read.c archival/libarchive/decompress_unlzma.c archival/libarchive/decompress_unxz.c +console-tools/clear.c console-tools/reset.c +coreutils/basename.c coreutils/cal.c coreutils/cat.c coreutils/catv.c coreutils/chgrp.c coreutils/chmod.c coreutils/chown.c coreutils/chroot.c coreutils/cp.c coreutils/cut.c coreutils/date.c coreutils/dd.c coreutils/df.c coreutils/dirname.c coreutils/dos2unix.c coreutils/du.c coreutils/echo.c coreutils/expand.c coreutils/env.c coreutils/expr.c coreutils/false.c coreutils/fold.c coreutils/head.c coreutils/id.c coreutils/install.c coreutils/ln.c coreutils/ls.c coreutils/md5_sha1_sum.c coreutils/mkdir.c coreutils/mkfifo.c coreutils/mknod.c coreutils/mv.c coreutils/nice.c coreutils/nohup.c coreutils/od.c coreutils/printenv.c coreutils/printf.c coreutils/pwd.c coreutils/readlink.c coreutils/realpath.c coreutils/rm.c coreutils/rmdir.c coreutils/seq.c coreutils/sleep.c coreutils/sort.c coreutils/split.c coreutils/stat.c coreutils/stty.c coreutils/sync.c coreutils/tac.c coreutils/tail.c coreutils/tee.c coreutils/test.c coreutils/test_ptr_hack.c coreutils/touch.c coreutils/tr.c coreutils/true.c coreutils/tty.c coreutils/uname.c coreutils/uniq.c coreutils/usleep.c coreutils/uudecode.c coreutils/uuencode.c coreutils/wc.c coreutils/whoami.c coreutils/yes.c +coreutils/libcoreutils/cp_mv_stat.c coreutils/libcoreutils/getopt_mk_fifo_nod.c +debianutils/mktemp.c debianutils/run_parts.c debianutils/which.c + +e2fsprogs/e2fs_lib.c e2fsprogs/chattr.c e2fsprogs/lsattr.c e2fsprogs/tune2fs.c + +editors/awk.c editors/cmp.c editors/diff.c editors/patch.c editors/sed.c +findutils/find.c findutils/grep.c findutils/xargs.c + +libbb/appletlib.c libbb/ask_confirmation.c libbb/bb_askpass.c libbb/bb_do_delay.c libbb/bb_pwd.c libbb/bb_qsort.c libbb/bb_strtonum.c libbb/change_identity.c libbb/chomp.c libbb/compare_string_array.c libbb/concat_path_file.c libbb/concat_subpath_file.c libbb/copy_file.c libbb/copyfd.c libbb/crc32.c libbb/create_icmp6_socket.c libbb/create_icmp_socket.c libbb/default_error_retval.c libbb/device_open.c libbb/dump.c libbb/execable.c libbb/fclose_nonstdin.c libbb/fflush_stdout_and_exit.c libbb/fgets_str.c libbb/find_mount_point.c libbb/find_pid_by_name.c libbb/find_root_device.c libbb/full_write.c libbb/get_console.c libbb/get_last_path_component.c libbb/get_line_from_file.c libbb/get_shell_name.c libbb/get_volsize.c libbb/getopt32.c libbb/getpty.c libbb/herror_msg.c libbb/human_readable.c libbb/inet_common.c libbb/info_msg.c libbb/inode_hash.c libbb/isdirectory.c libbb/kernel_version.c libbb/last_char_is.c libbb/lineedit.c libbb/lineedit_ptr_hack.c libbb/llist.c libbb/login.c libbb/loop.c libbb/make_directory.c libbb/makedev.c libbb/match_fstype.c libbb/hash_md5_sha.c libbb/bb_bswap_64.c libbb/messages.c libbb/mode_string.c libbb/mtab.c libbb/parse_config.c libbb/parse_mode.c libbb/perror_msg.c libbb/perror_nomsg.c libbb/perror_nomsg_and_die.c libbb/pidfile.c libbb/platform.c libbb/print_flags.c libbb/printable.c libbb/printable_string.c libbb/process_escape_sequence.c libbb/procps.c libbb/progress.c libbb/ptr_to_globals.c libbb/read.c libbb/read_key.c libbb/read_printf.c libbb/recursive_action.c libbb/remove_file.c libbb/run_shell.c libbb/safe_gethostname.c libbb/safe_poll.c libbb/safe_strncpy.c libbb/safe_write.c libbb/setup_environment.c libbb/signals.c libbb/simplify_path.c libbb/single_argv.c libbb/skip_whitespace.c libbb/speed_table.c libbb/str_tolower.c libbb/strrstr.c libbb/time.c libbb/trim.c libbb/u_signal_names.c libbb/udp_io.c libbb/uuencode.c libbb/vdprintf.c libbb/verror_msg.c libbb/vfork_daemon_rexec.c libbb/warn_ignoring_args.c libbb/wfopen.c libbb/wfopen_input.c libbb/write.c libbb/xatonum.c libbb/xconnect.c libbb/xfunc_die.c libbb/xfuncs.c libbb/xfuncs_printf.c libbb/xgetcwd.c libbb/xgethostbyname.c libbb/xreadlink.c libbb/xrealloc_vector.c libbb/xregcomp.c libbb/unicode.c +libpwdgrp/uidgid_get.c + + +miscutils/bbconfig.c miscutils/dc.c miscutils/devmem.c miscutils/less.c miscutils/makedevs.c miscutils/mountpoint.c miscutils/nandwrite.c +miscutils/setserial.c miscutils/setsid.c miscutils/strings.c miscutils/time.c +modutils/modinfo.c modutils/modprobe-small.c modutils/modutils.c + + + + +procps/free.c procps/fuser.c procps/kill.c procps/pgrep.c procps/pidof.c procps/ps.c procps/pstree.c procps/renice.c procps/sysctl.c procps/top.c procps/uptime.c procps/watch.c + + +shell/ash.c shell/ash_ptr_hack.c shell/math.c shell/random.c shell/shell_common.c + +util-linux/blockdev.c util-linux/dmesg.c util-linux/fdisk.c util-linux/freeramdisk.c util-linux/getopt.c util-linux/hexdump.c util-linux/losetup.c util-linux/lspci.c util-linux/lsusb.c util-linux/mkfs_ext2.c util-linux/mkswap.c util-linux/more.c util-linux/mount.c util-linux/rdev.c util-linux/rev.c util-linux/swaponoff.c util-linux/umount.c + +util-linux/volume_id/get_devname.c util-linux/volume_id/volume_id.c util-linux/volume_id/util.c util-linux/volume_id/ext.c +util-linux/volume_id/fat.c util-linux/mkfs_vfat.c diff --git a/coreutils/Kbuild.src b/coreutils/Kbuild.src index 0681e44..c7f0ec7 100644 --- a/coreutils/Kbuild.src +++ b/coreutils/Kbuild.src @@ -37,12 +37,14 @@ 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_LN) += ln.o lib-$(CONFIG_LOGNAME) += logname.o lib-$(CONFIG_LS) += ls.o lib-$(CONFIG_FTPD) += ls.o +lib-$(CONFIG_GROUPS) += id.o lib-$(CONFIG_MD5SUM) += md5_sha1_sum.o lib-$(CONFIG_MKDIR) += mkdir.o lib-$(CONFIG_MKFIFO) += mkfifo.o diff --git a/coreutils/df.c b/coreutils/df.c index 846cb38..df7f56f 100644 --- a/coreutils/df.c +++ b/coreutils/df.c @@ -142,7 +142,7 @@ int df_main(int argc UNUSED_PARAM, char **argv) if (!argv[0]) { mount_table = setmntent(bb_path_mtab_file, "r"); if (!mount_table) - bb_perror_msg_and_die(bb_path_mtab_file); + bb_perror_msg_and_die("%s", bb_path_mtab_file); } while (1) { diff --git a/coreutils/expand.c b/coreutils/expand.c index 25bbffc..ac5ad5b 100644 --- a/coreutils/expand.c +++ b/coreutils/expand.c @@ -227,7 +227,7 @@ int expand_main(int argc UNUSED_PARAM, char **argv) /* Now close stdin also */ /* (if we didn't read from it, it's a no-op) */ if (fclose(stdin)) - bb_perror_msg_and_die(bb_msg_standard_input); + bb_perror_msg_and_die("%s", bb_msg_standard_input); fflush_stdout_and_exit(exit_status); } diff --git a/coreutils/ls.c b/coreutils/ls.c index f11eb43..7cb65ae 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -537,13 +537,28 @@ static NOINLINE unsigned display_single(const struct dnode *dn) } #if ENABLE_FEATURE_LS_USERNAME else if (G.all_fmt & LIST_ID_NAME) { - if (option_mask32 & OPT_g) { - column += printf("%-8.8s ", - get_cached_groupname(dn->dn_gid)); + //extend user/group names to 12 char. + //if terminal has more than 88 cols (or -w 88 is set) + if (G_terminal_width >= 88) { + #define UGLONG_FMT "%-12.12s " + if (option_mask32 & OPT_g) { + column += printf(UGLONG_FMT, + get_cached_groupname(dn->dn_gid)); + } else { + column += printf(UGLONG_FMT UGLONG_FMT, + get_cached_username(dn->dn_uid), + get_cached_groupname(dn->dn_gid)); + } } else { - column += printf("%-8.8s %-8.8s ", - get_cached_username(dn->dn_uid), - get_cached_groupname(dn->dn_gid)); + #define UGDEF_FMT "%-8.8s " + if (option_mask32 & OPT_g) { + column += printf(UGDEF_FMT, + get_cached_groupname(dn->dn_gid)); + } else { + column += printf(UGDEF_FMT UGDEF_FMT, + get_cached_username(dn->dn_uid), + get_cached_groupname(dn->dn_gid)); + } } } #endif diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index 347f879..4c58848 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c @@ -1378,7 +1378,7 @@ int od_main(int argc UNUSED_PARAM, char **argv) dump(n_bytes_to_skip, end_offset); if (fclose(stdin)) - bb_perror_msg_and_die(bb_msg_standard_input); + bb_perror_msg_and_die("%s", bb_msg_standard_input); return exit_code; } diff --git a/coreutils/sort.c b/coreutils/sort.c index 1df0728..a895939 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -459,7 +459,7 @@ int sort_main(int argc UNUSED_PARAM, char **argv) #if ENABLE_FEATURE_SORT_BIG /* Open output file _after_ we read all input ones */ if (option_mask32 & FLAG_o) - xmove_fd(xopen(str_o, O_WRONLY|O_CREAT|O_TRUNC), STDOUT_FILENO); + xmove_fd(xopen3(str_o, O_WRONLY|O_CREAT|O_TRUNC, 0666), STDOUT_FILENO); #endif flag = (option_mask32 & FLAG_z) ? '\0' : '\n'; for (i = 0; i < linecount; i++) diff --git a/coreutils/stat.c b/coreutils/stat.c index 2797719..3fb212f 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c @@ -99,9 +99,15 @@ static const char *file_type(const struct stat *st) if (S_ISFIFO(st->st_mode)) return "fifo"; if (S_ISLNK(st->st_mode)) return "symbolic link"; if (S_ISSOCK(st->st_mode)) return "socket"; +#ifdef S_TYPEISMQ if (S_TYPEISMQ(st)) return "message queue"; +#endif +#ifdef S_TYPEISSEM if (S_TYPEISSEM(st)) return "semaphore"; +#endif +#ifdef S_TYPEISSHM if (S_TYPEISSHM(st)) return "shared memory object"; +#endif #ifdef S_TYPEISTMO if (S_TYPEISTMO(st)) return "typed memory object"; #endif diff --git a/coreutils/tail.c b/coreutils/tail.c index 454c259..954d3f4 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c @@ -84,7 +84,7 @@ static ssize_t tail_read(int fd, char *buf, size_t count) r = full_read(fd, buf, count); if (r < 0) { - bb_perror_msg(bb_msg_read_error); + bb_perror_msg("%s", bb_msg_read_error); G.exitcode = EXIT_FAILURE; } @@ -258,8 +258,16 @@ int tail_main(int argc, char **argv) if (seen < count) { /* We need to skip a few more bytes/lines */ if (COUNT_BYTES) { - nwrite -= (count - seen); - seen = count; + if (nwrite > count - seen) + { + nwrite -= (count - seen); + seen = count; + } + else + { + seen += nwrite; + nwrite = 0; + } } else { char *s = buf; do { diff --git a/coreutils/test.c b/coreutils/test.c index 1f5398a..b3dba16 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -630,7 +630,7 @@ static int test_eaccess(char *path, int mode) static int filstat(char *nm, enum token mode) { struct stat s; - unsigned i = i; /* gcc 3.x thinks it can be used uninitialized */ + unsigned i = 0; if (mode == FILSYM) { #ifdef S_IFLNK diff --git a/coreutils/tr.c b/coreutils/tr.c index e67948a..a87e908 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c @@ -319,7 +319,7 @@ int tr_main(int argc UNUSED_PARAM, char **argv) read_chars = safe_read(STDIN_FILENO, str1, TR_BUFSIZ); if (read_chars <= 0) { if (read_chars < 0) - bb_perror_msg_and_die(bb_msg_read_error); + bb_perror_msg_and_die("%s", bb_msg_read_error); break; } in_index = 0; diff --git a/coreutils/usleep.c b/coreutils/usleep.c index 67f94f7..d5b8873 100644 --- a/coreutils/usleep.c +++ b/coreutils/usleep.c @@ -29,9 +29,13 @@ int usleep_main(int argc UNUSED_PARAM, char **argv) bb_show_usage(); } +#ifdef __BIONIC__ + usleep(xatou(argv[1])); +#else if (usleep(xatou(argv[1]))) { bb_perror_nomsg_and_die(); } +#endif return EXIT_SUCCESS; } diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 6ecfe6c..70d59ec 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c @@ -191,7 +191,7 @@ int base64_main(int argc UNUSED_PARAM, char **argv) if (!size) break; if ((ssize_t)size < 0) - bb_perror_msg_and_die(bb_msg_read_error); + bb_perror_msg_and_die("%s", bb_msg_read_error); /* Encode the buffer we just read in */ bb_uuencode(dst_buf, src_buf, size, bb_uuenc_tbl_base64); xwrite(STDOUT_FILENO, dst_buf, 4 * ((size + 2) / 3)); diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c index 84a489a..64e2414 100644 --- a/coreutils/uuencode.c +++ b/coreutils/uuencode.c @@ -58,7 +58,7 @@ int uuencode_main(int argc UNUSED_PARAM, char **argv) if (!size) break; if ((ssize_t)size < 0) - bb_perror_msg_and_die(bb_msg_read_error); + bb_perror_msg_and_die("%s", bb_msg_read_error); /* Encode the buffer we just read in */ bb_uuencode(dst_buf, src_buf, size, tbl); bb_putchar('\n'); diff --git a/e2fsprogs/tune2fs.c b/e2fsprogs/tune2fs.c index 9daec54..7e33116 100644 --- a/e2fsprogs/tune2fs.c +++ b/e2fsprogs/tune2fs.c @@ -28,12 +28,13 @@ do { \ (sizeof(field) == 4 ? SWAP_LE32(field) : BUG_wrong_field_size()) //usage:#define tune2fs_trivial_usage -//usage: "[-c MOUNT_CNT] " +//usage: "[-c MAX_MOUNT_COUNT] " ////usage: "[-e errors-behavior] [-g group] " //usage: "[-i DAYS] " ////usage: "[-j] [-J journal-options] [-l] [-s sparse-flag] " ////usage: "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " -////usage: "[-r reserved-blocks-count] [-u user] [-C mount-count] " +////usage: "[-r reserved-blocks-count] [-u user] " +//usage: "[-C MOUNT_COUNT] " //usage: "[-L LABEL] " ////usage: "[-M last-mounted-dir] [-O [^]feature[,...]] " ////usage: "[-T last-check-time] [-U UUID] " @@ -43,9 +44,10 @@ do { \ //usage: "Adjust filesystem options on ext[23] filesystems" enum { - OPT_L = 1 << 0, // label - OPT_c = 1 << 1, // max mount count - OPT_i = 1 << 2, // check interval + OPT_C = 1 << 0, // current mount count + OPT_L = 1 << 1, // label + OPT_c = 1 << 2, // max mount count + OPT_i = 1 << 3, // check interval }; int tune2fs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; @@ -54,10 +56,10 @@ int tune2fs_main(int argc UNUSED_PARAM, char **argv) unsigned opts; const char *label, *str_c, *str_i; struct ext2_super_block *sb; - int fd; + int fd, n; opt_complementary = "=1"; - opts = getopt32(argv, "L:c:i:", &label, &str_c, &str_i); + opts = getopt32(argv, "C:L:c:i:", &label, &str_c, &str_i); if (!opts) bb_show_usage(); argv += optind; // argv[0] -- device @@ -71,20 +73,27 @@ int tune2fs_main(int argc UNUSED_PARAM, char **argv) // mangle superblock //STORE_LE(sb->s_wtime, time(NULL)); - why bother? + if (opts & OPT_C) { + n = xatoi_range(str_c, 1, 0xfffe); + if (n == 0) + n = 1; + STORE_LE(sb->s_mnt_count, (unsigned)n); + } + // set the label if (opts & OPT_L) safe_strncpy((char *)sb->s_volume_name, label, sizeof(sb->s_volume_name)); if (opts & OPT_c) { - int n = xatoi_range(str_c, -1, 0xfffe); + n = xatoi_range(str_c, -1, 0xfffe); if (n == 0) n = -1; STORE_LE(sb->s_max_mnt_count, (unsigned)n); } if (opts & OPT_i) { - unsigned n = xatou_range(str_i, 0, (unsigned)0xffffffff / (24*60*60)) * 24*60*60; - STORE_LE(sb->s_checkinterval, n); + unsigned u = xatou_range(str_i, 0, (unsigned)0xffffffff / (24*60*60)) * 24*60*60; + STORE_LE(sb->s_checkinterval, u); } // write superblock diff --git a/editors/diff.c b/editors/diff.c index 8c0a31f..222f354 100644 --- a/editors/diff.c +++ b/editors/diff.c @@ -693,9 +693,11 @@ static bool diff(FILE* fp[2], char *file[2]) static int diffreg(char *file[2]) { - FILE *fp[2] = { stdin, stdin }; + FILE *fp[2]; bool binary = false, differ = false; int status = STATUS_SAME, i; + fp[0] = stdin; + fp[1] = stdin; for (i = 0; i < 2; i++) { int fd = open_or_warn_stdin(file[i]); @@ -705,9 +707,13 @@ static int diffreg(char *file[2]) * When we meet non-seekable file, we must make a temp copy. */ if (lseek(fd, 0, SEEK_SET) == -1 && errno == ESPIPE) { - char name[] = "/tmp/difXXXXXX"; + /* really should use $TMPDIR, but not usually set on android anyway */ + char name[] = +#ifdef __BIONIC__ + "/data/local" +#endif + "/tmp/difXXXXXX"; int fd_tmp = xmkstemp(name); - unlink(name); if (bb_copyfd_eof(fd, fd_tmp) < 0) xfunc_die(); diff --git a/editors/sed.c b/editors/sed.c index 5c4e9cc..c9bc2ad 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -907,7 +907,7 @@ static void puts_maybe_newline(char *s, FILE *file, char *last_puts_char, char l if (ferror(file)) { xfunc_error_retval = 4; /* It's what gnu sed exits with... */ - bb_error_msg_and_die(bb_msg_write_error); + bb_error_msg_and_die("%s", bb_msg_write_error); } *last_puts_char = lpc; } diff --git a/editors/vi.c b/editors/vi.c index 3f4ccdc..fe416c3 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -161,7 +161,13 @@ //usage: ) //usage: "\n -H Short help regarding available features" -#include <regex.h> +#if ENABLE_FEATURE_VI_REGEX_SEARCH +# if defined(ANDROID) +# include <sys/types.h> /* size_t */ +# endif +# include <regex.h> +#endif + #include "libbb.h" /* the CRASHME code is unmaintained, and doesn't currently build */ diff --git a/findutils/find.c b/findutils/find.c index babcda0..40a3230 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -366,7 +366,7 @@ IF_FEATURE_FIND_MMIN( ACTS(mmin, char mmin_char; unsigned mmin_mins;)) IF_FEATURE_FIND_NEWER( ACTS(newer, time_t newer_mtime;)) IF_FEATURE_FIND_INUM( ACTS(inum, ino_t inode_num;)) IF_FEATURE_FIND_USER( ACTS(user, uid_t uid;)) -IF_FEATURE_FIND_SIZE( ACTS(size, char size_char; off_t size;)) +IF_FEATURE_FIND_SIZE( ACTS(size, char size_char; filesize_t size;)) IF_FEATURE_FIND_CONTEXT(ACTS(context, security_context_t context;)) IF_FEATURE_FIND_PAREN( ACTS(paren, action ***subexpr;)) IF_FEATURE_FIND_PRUNE( ACTS(prune)) diff --git a/include-full/copy-current.sh b/include-full/copy-current.sh new file mode 100644 index 0000000..7f6b957 --- a/dev/null +++ b/include-full/copy-current.sh @@ -0,0 +1,11 @@ +# after .config setup, type "make prepare" to generate /include files + +cp ../.config ../.config-full + +cp ../include/applets.h ./ +cp ../include/applet_tables.h ./ +cp ../include/autoconf.h ./ +cp ../include/bbconfigopts_bz2.h ./ +cp ../include/bbconfigopts.h ./ +cp ../include/NUM_APPLETS.h ./ +cp ../include/usage_compressed.h ./ diff --git a/include-minimal/copy-current.sh b/include-minimal/copy-current.sh new file mode 100644 index 0000000..320083a --- a/dev/null +++ b/include-minimal/copy-current.sh @@ -0,0 +1,11 @@ +# after .config setup, type "make prepare" to generate /include files + +cp ../.config ../.config-minimal + +cp ../include/applets.h ./ +cp ../include/applet_tables.h ./ +cp ../include/autoconf.h ./ +cp ../include/bbconfigopts_bz2.h ./ +cp ../include/bbconfigopts.h ./ +cp ../include/NUM_APPLETS.h ./ +cp ../include/usage_compressed.h ./ diff --git a/include/.gitignore b/include/.gitignore index 9d9b6c4..91659d8 100644 --- a/include/.gitignore +++ b/include/.gitignore @@ -1,5 +1,4 @@ /config - /applets.h /applet_tables.h /autoconf.h diff --git a/include/android.h b/include/android.h new file mode 100644 index 0000000..d065422 --- a/dev/null +++ b/include/android.h @@ -0,0 +1,62 @@ +/* vi: set sw=4 ts=4: */ +/* + Copyright 2010, Dylan Simon + + Licensed under the GPL v2 or later, see the file LICENSE in this tarball. +*/ + +#ifndef BB_ANDROID_H +#define BB_ANDROID_H 1 + +/* for dirname, basename */ +#include <libgen.h> + +#if ENABLE_FEATURE_DC_LIBM +# include <math.h> +#endif + +#define killpg_busybox(P, S) kill(-(P), S) + +#define setmntent fopen +#define endmntent fclose + +/* defined in bionic/utmp.c */ +void endutent(void); + +/* defined in bionic/mktemp.c */ +char *mkdtemp(char *); + +/* defined in bionic/stubs.c */ +char *ttyname(int); + +/* added to SYSCALLS.TXT: +int stime(time_t *) 25 +int swapon(const char *, int) 87 +int swapoff(const char *) 115 +*/ +int stime (time_t *); +int swapon (const char *, int); +int swapoff (const char *); + +/* local definition in libbb/xfuncs_printf.c */ +int fdprintf(int fd, const char *format, ...); + +/* local definitions in libbb/android.c */ +int ttyname_r(int, char *, size_t); + +char *getusershell(void); +void setusershell(void); +void endusershell(void); + +struct mntent; +struct __sFILE; +int addmntent(struct __sFILE *, const struct mntent *); +struct mntent *getmntent_r(struct __sFILE *fp, struct mntent *mnt, char *buf, int buflen); +const char *hasmntopt(const struct mntent *, const char *); + +#define MNTOPT_NOAUTO "noauto" + +/* bionic's vfork is rather broken; for now a terrible bandaid: */ +#define vfork fork + +#endif diff --git a/include/libbb.h b/include/libbb.h index 1502272..4ebe011 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -12,7 +12,20 @@ #include "platform.h" +#ifdef __BIONIC__ +/* work around "extern inline" (under std=gnu99) ctype definitions we don't use anyway */ +# ifdef NDEBUG +# define NDEBUG_TMP NDEBUG +# endif +# undef NDEBUG +# include <ctype.h> +# ifdef NDEBUG_TMP +# define NDEBUG NDEBUG_TMP +# undef NDEBUG_TMP +# endif +#else #include <ctype.h> +#endif #include <dirent.h> #include <errno.h> #include <fcntl.h> @@ -130,7 +143,7 @@ int klogctl(int type, char *b, int len); /* This is declared here rather than #including <libgen.h> in order to avoid * confusing the two versions of basename. See the dirname/basename man page * for details. */ -#if !defined __FreeBSD__ +#if !defined __FreeBSD__ && !defined __BIONIC__ char *dirname(char *path); #endif /* Include our own copy of struct sysinfo to avoid binary compatibility @@ -175,6 +188,7 @@ int sysinfo(struct sysinfo* info); # undef fputc # define fputc(c, stream) putc_unlocked(c, stream) #endif + /* Above functions are required by POSIX.1-2008, below ones are extensions */ #ifdef HAVE_UNLOCKED_LINE_OPS # undef fgets @@ -183,7 +197,6 @@ int sysinfo(struct sysinfo* info); # define fputs(s, stream) fputs_unlocked(s, stream) #endif - /* Make all declarations hidden (-fvisibility flag only affects definitions) */ /* (don't include system headers after this until corresponding pop!) */ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN @@ -260,6 +273,15 @@ typedef unsigned long uoff_t; /* scary. better ideas? (but do *test* them first!) */ #define OFF_T_MAX ((off_t)~((off_t)1 << (sizeof(off_t)*8-1))) +#ifdef __BIONIC__ +/* bionic uses stat64 which has long long file sizes, whereas off_t is only long bits */ +typedef long long filesize_t; +#define FILESIZE_FMT "ll" +#else +typedef off_t filesize_t; +#define FILESIZE_FMT OFF_FMT +#endif + /* Some useful definitions */ #undef FALSE #define FALSE ((int) 0) @@ -1727,18 +1749,43 @@ extern struct globals *const ptr_to_globals; * use bb_default_login_shell and following defines. * If you change LIBBB_DEFAULT_LOGIN_SHELL, * don't forget to change increment constant. */ -#define LIBBB_DEFAULT_LOGIN_SHELL "-/bin/sh" extern const char bb_default_login_shell[]; + +#ifdef __BIONIC__ +/* Since android does not have the /bin path, unlike most unix systems, + * it needs an exception in the default shell path. */ +# define LIBBB_DEFAULT_LOGIN_SHELL "-/system/bin/sh" +/* "/system/xbin/sh" */ +# define DEFAULT_SHELL (bb_default_login_shell+1) +/* "sh" */ +# define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+13) + +#else +# define LIBBB_DEFAULT_LOGIN_SHELL "-/bin/sh" /* "/bin/sh" */ -#define DEFAULT_SHELL (bb_default_login_shell+1) +# define DEFAULT_SHELL (bb_default_login_shell+1) /* "sh" */ -#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6) +# define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6) +#endif /* The following devices are the same on all systems. */ #define CURRENT_TTY "/dev/tty" #define DEV_CONSOLE "/dev/console" -#if defined(__FreeBSD_kernel__) +#ifdef __BIONIC__ +# define CURRENT_VC CURRENT_TTY +# define VC_1 "/dev/tty1" +# define VC_2 "/dev/tty2" +# define VC_3 "/dev/tty3" +# define VC_4 "/dev/tty4" +# define VC_5 "/dev/tty5" +# define VC_FORMAT "/dev/tty%d" +# define LOOP_FORMAT "/dev/block/loop%d" +# define LOOP_NAMESIZE (sizeof("/dev/block/loop") + sizeof(int)*3 + 1) +# define LOOP_NAME "/dev/block/loop" +# define FB_0 "/dev/graphics/fb0" + +#elif defined(__FreeBSD_kernel__) # define CURRENT_VC CURRENT_TTY # define VC_1 "/dev/ttyv0" # define VC_2 "/dev/ttyv1" @@ -1746,41 +1793,26 @@ extern const char bb_default_login_shell[]; # define VC_4 "/dev/ttyv3" # define VC_5 "/dev/ttyv4" # define VC_FORMAT "/dev/ttyv%d" -#elif defined(__GNU__) +# define LOOP_FORMAT "/dev/loop%d" +# define LOOP_NAMESIZE (sizeof("/dev/loop") + sizeof(int)*3 + 1) +# define LOOP_NAME "/dev/loop" +# define FB_0 "/dev/fb0" + +#else //__GNU__ +/*Linux 2.6, normal names */ # define CURRENT_VC CURRENT_TTY -# define VC_1 "/dev/tty1" -# define VC_2 "/dev/tty2" -# define VC_3 "/dev/tty3" -# define VC_4 "/dev/tty4" -# define VC_5 "/dev/tty5" -# define VC_FORMAT "/dev/tty%d" -#elif ENABLE_FEATURE_DEVFS -/*Linux, obsolete devfs names */ -# define CURRENT_VC "/dev/vc/0" -# define VC_1 "/dev/vc/1" -# define VC_2 "/dev/vc/2" -# define VC_3 "/dev/vc/3" -# define VC_4 "/dev/vc/4" -# define VC_5 "/dev/vc/5" -# define VC_FORMAT "/dev/vc/%d" -# define LOOP_FORMAT "/dev/loop/%d" -# define LOOP_NAMESIZE (sizeof("/dev/loop/") + sizeof(int)*3 + 1) -# define LOOP_NAME "/dev/loop/" -# define FB_0 "/dev/fb/0" -#else -/*Linux, normal names */ -# define CURRENT_VC "/dev/tty0" -# define VC_1 "/dev/tty1" -# define VC_2 "/dev/tty2" -# define VC_3 "/dev/tty3" -# define VC_4 "/dev/tty4" -# define VC_5 "/dev/tty5" +# define VC_1 "/dev/tty0" +# define VC_2 "/dev/tty1" +# define VC_3 "/dev/tty2" +# define VC_4 "/dev/tty3" +# define VC_5 "/dev/tty4" # define VC_FORMAT "/dev/tty%d" # define LOOP_FORMAT "/dev/loop%d" # define LOOP_NAMESIZE (sizeof("/dev/loop") + sizeof(int)*3 + 1) # define LOOP_NAME "/dev/loop" # define FB_0 "/dev/fb0" -#endif + +#endif //Platform #define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0]))) diff --git a/include/platform.h b/include/platform.h index 60864c9..78e4f78 100644 --- a/include/platform.h +++ b/include/platform.h @@ -172,7 +172,13 @@ # define BB_BIG_ENDIAN 0 # define BB_LITTLE_ENDIAN 1 #else -# error "Can't determine endianness" +# error +# error +# error "Can't determine endianness !" +# error "DO NOT USE 'MAKE' TO BUILD BIONIC BUSYBOX" +# error +# error + exit 1 #endif #if ULONG_MAX > 0xffffffff @@ -266,6 +272,7 @@ typedef unsigned smalluint; #if defined __GLIBC__ \ || defined __UCLIBC__ \ || defined __dietlibc__ \ + || defined __BIONIC__ \ || defined _NEWLIB_VERSION # include <features.h> #endif @@ -419,6 +426,7 @@ typedef unsigned smalluint; #if defined(ANDROID) # undef HAVE_DPRINTF +# undef HAVE_FDPRINTF # undef HAVE_GETLINE # undef HAVE_STPCPY # undef HAVE_STRCHRNUL @@ -479,8 +487,14 @@ extern int vasprintf(char **string_ptr, const char *format, va_list p) FAST_FUNC #endif #ifndef HAVE_GETLINE -#include <stdio.h> /* for FILE */ +# include <stdio.h> /* for FILE */ +# include <sys/types.h> /* size_t */ extern ssize_t getline(char **lineptr, size_t *n, FILE *stream) FAST_FUNC; #endif +#if defined(__BIONIC__) +#include "android.h" #endif + + +#endif /* BB_PLATFORM_H */ diff --git a/init/halt.c b/init/halt.c index 433326d..8269648 100644 --- a/init/halt.c +++ b/init/halt.c @@ -69,6 +69,10 @@ #include "libbb.h" #include "reboot.h" +#ifdef __BIONIC__ +# include "android/reboot.c" +#endif + #if ENABLE_FEATURE_WTMP #include <sys/utsname.h> @@ -130,6 +134,18 @@ int halt_main(int argc UNUSED_PARAM, char **argv) if (!(flags & 2)) /* no -n */ sync(); +#ifdef __BIONIC__ + char *mode[3]; + mode[0] = argv[0]; + mode[1] = mode[2] = NULL; + if (which == 0) { + //-p for halt + mode[1] = "-p"; + argc=2; + } + return reboot_main(argc, mode); +#endif + /* Perform action. */ rc = 1; if (!(flags & 4)) { /* no -f */ diff --git a/libbb/android.c b/libbb/android.c new file mode 100644 index 0000000..7738f3f --- a/dev/null +++ b/libbb/android.c @@ -0,0 +1,93 @@ +/* vi: set sw=4 ts=4: */ +/* + * Android/bionic glue. + * + * Copyright (C) 2010 by Dylan Simon <dylan@dylex.net> + * + * Licensed under GPLv2, see file LICENSE in this tarball for details. + */ + +#include <stdlib.h> +#include "libbb.h" + +/* declared in stdlib.h */ +int clearenv() +{ + environ = NULL; + return 0; +} + +/* bionic/stubs.c:ttyname not implemented anyway */ +int ttyname_r(int fd, char *name, size_t namesize) +{ + char *t = ttyname(fd); + if (!t) + return -1; + strncpy(name, ttyname(fd), namesize); + return 0; +} + +/* no /etc/shells anyway */ +char *getusershell() { return NULL; } +void setusershell() {} +void endusershell() {} + +struct mntent *getmntent_r(FILE *fp, struct mntent *mnt, char *buf, int buflen) +{ + char *tokp = NULL, *s; + + do { + if (!fgets(buf, buflen, fp)) + return NULL; + tokp = 0; + s = strtok_r(buf, " \t\n", &tokp); + } while (!s || *s == '#'); + + mnt->mnt_fsname = s; + mnt->mnt_freq = mnt->mnt_passno = 0; + if (!(mnt->mnt_dir = strtok_r(NULL, " \t\n", &tokp))) + return NULL; + if (!(mnt->mnt_type = strtok_r(NULL, " \t\n", &tokp))) + return NULL; + if (!(mnt->mnt_opts = strtok_r(NULL, " \t\n", &tokp))) + mnt->mnt_opts = ""; + else if ((s = strtok_r(NULL, " \t\n", &tokp))) + { + mnt->mnt_freq = atoi(s); + if ((s = strtok_r(NULL, " \t\n", &tokp))) + mnt->mnt_passno = atoi(s); + } + + return mnt; +} + +/* override definition in bionic/stubs.c */ +struct mntent *getmntent(FILE *fp) +{ + static struct mntent mnt; + static char buf[256]; + return getmntent_r(fp, &mnt, buf, 256); +} + +/* not used anyway */ +int addmntent(FILE *fp, const struct mntent *mnt) +{ + errno = ENOENT; + return 1; +} + +const char *hasmntopt(const struct mntent *mnt, const char *opt) +{ + const char *o = mnt->mnt_opts; + size_t l = strlen(opt); + + while ((o = strstr(o, opt)) && + ((o > mnt->mnt_opts && o[-1] != ',') || + (o[l] != 0 && o[l] != ',' && o[l] != '='))); + return o; +} + +/* declared in grp.h, but not necessary */ +int setpwent() { return 0; } +void setgrent() {} +void endgrent() {} diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 1bc45c4..8ac87df 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -34,7 +34,6 @@ # include <malloc.h> /* for mallopt */ #endif - /* Declare <applet>_main() */ #define PROTOTYPES #include "applets.h" @@ -627,8 +626,8 @@ static int busybox_main(char **argv) full_write2_str(bb_banner); /* reuse const string */ full_write2_str(" multi-call binary.\n"); /* reuse */ full_write2_str( - "Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko\n" - "and others. Licensed under GPLv2.\n" + "Copyright (C) 1998-2011 Erik Andersen, Rob Landley, Denys Vlasenko\n" + "and others. Licensed under GPLv2. Merged for bionic by tpruvot@github\n" "See source distribution for full notice.\n" "\n" "Usage: busybox [function] [arguments]...\n" diff --git a/libbb/copyfd.c b/libbb/copyfd.c index eda2747..8559d0a 100644 --- a/libbb/copyfd.c +++ b/libbb/copyfd.c @@ -66,7 +66,7 @@ static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size) break; } if (rd < 0) { - bb_perror_msg(bb_msg_read_error); + bb_perror_msg("%s", bb_msg_read_error); break; } /* dst_fd == -1 is a fake, else... */ @@ -74,7 +74,7 @@ static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size) ssize_t wr = full_write(dst_fd, buffer, rd); if (wr < rd) { if (!continue_on_write_error) { - bb_perror_msg(bb_msg_write_error); + bb_perror_msg("%s", bb_msg_write_error); break; } dst_fd = -1; diff --git a/libbb/create_icmp6_socket.c b/libbb/create_icmp6_socket.c index 368c690..bdee7a0 100644 --- a/libbb/create_icmp6_socket.c +++ b/libbb/create_icmp6_socket.c @@ -26,8 +26,8 @@ int FAST_FUNC create_icmp6_socket(void) #endif if (sock < 0) { if (errno == EPERM) - bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); - bb_perror_msg_and_die(bb_msg_can_not_create_raw_socket); + bb_error_msg_and_die("%s", bb_msg_perm_denied_are_you_root); + bb_perror_msg_and_die("%s", bb_msg_can_not_create_raw_socket); } /* drop root privs if running setuid */ diff --git a/libbb/create_icmp_socket.c b/libbb/create_icmp_socket.c index 5856269..65eea3b 100644 --- a/libbb/create_icmp_socket.c +++ b/libbb/create_icmp_socket.c @@ -25,8 +25,8 @@ int FAST_FUNC create_icmp_socket(void) #endif if (sock < 0) { if (errno == EPERM) - bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); - bb_perror_msg_and_die(bb_msg_can_not_create_raw_socket); + bb_error_msg_and_die("%s", bb_msg_perm_denied_are_you_root); + bb_perror_msg_and_die("%s", bb_msg_can_not_create_raw_socket); } /* drop root privs if running setuid */ diff --git a/libbb/dump.c b/libbb/dump.c index 919fe13..ba4af99 100644 --- a/libbb/dump.c +++ b/libbb/dump.c @@ -610,7 +610,7 @@ static void display(priv_dumper_t* dumper) printf(pr->fmt, (char *) bp); break; case F_TEXT: - printf(pr->fmt); + printf("%s", pr->fmt); break; case F_U: conv_u(pr, bp); @@ -660,7 +660,7 @@ static void display(priv_dumper_t* dumper) printf(pr->fmt, (unsigned) dumper->eaddress); break; case F_TEXT: - printf(pr->fmt); + printf("%s", pr->fmt); break; } } diff --git a/libbb/fflush_stdout_and_exit.c b/libbb/fflush_stdout_and_exit.c index 9ad5dbf..41a14d3 100644 --- a/libbb/fflush_stdout_and_exit.c +++ b/libbb/fflush_stdout_and_exit.c @@ -16,7 +16,7 @@ void FAST_FUNC fflush_stdout_and_exit(int retval) { if (fflush(stdout)) - bb_perror_msg_and_die(bb_msg_standard_output); + bb_perror_msg_and_die("%s", bb_msg_standard_output); if (ENABLE_FEATURE_PREFER_APPLETS && die_sleep < 0) { /* We are in NOFORK applet. Do not exit() directly, diff --git a/libbb/inet_common.c b/libbb/inet_common.c index 207720e..6aa68c8 100644 --- a/libbb/inet_common.c +++ b/libbb/inet_common.c @@ -174,8 +174,8 @@ int FAST_FUNC INET6_resolve(const char *name, struct sockaddr_in6 *sin6) bb_error_msg("getaddrinfo: %s: %d", name, s); return -1; } - memcpy(sin6, ai->ai_addr, sizeof(*sin6)); - freeaddrinfo(ai); + memcpy(sin6, ai->ai_addr, sizeof(struct sockaddr_in6)); + if (ai) freeaddrinfo(ai); return 0; } diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 4e3bc0e..8ddaae5 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -156,6 +156,13 @@ struct lineedit_statics { #if ENABLE_FEATURE_EDITING_ASK_TERMINAL smallint sent_ESC_br6n; #endif + + /* Formerly these were big buffers on stack: */ +#if ENABLE_FEATURE_TAB_COMPLETION + char input_tab__matchBuf[MAX_LINELEN]; + int16_t find_match__int_buf[MAX_LINELEN + 1]; /* need to have 9 bits at least */ + int16_t find_match__pos_buf[MAX_LINELEN + 1]; +#endif }; /* See lineedit_ptr_hack.c */ diff --git a/libbb/mtab.c b/libbb/mtab.c index 22bff64..c111203 100644 --- a/libbb/mtab.c +++ b/libbb/mtab.c @@ -22,7 +22,7 @@ void FAST_FUNC erase_mtab(const char *name) /* Bummer. Fall back on trying the /proc filesystem */ if (!mountTable) mountTable = setmntent("/proc/mounts", "r"); if (!mountTable) { - bb_perror_msg(bb_path_mtab_file); + bb_perror_msg("%s", bb_path_mtab_file); return; } @@ -50,6 +50,6 @@ void FAST_FUNC erase_mtab(const char *name) } endmntent(mountTable); } else if (errno != EROFS) - bb_perror_msg(bb_path_mtab_file); + bb_perror_msg("%s", bb_path_mtab_file); } #endif diff --git a/libbb/obscure.c b/libbb/obscure.c index dd8cd31..9ecc1f6 100644 --- a/libbb/obscure.c +++ b/libbb/obscure.c @@ -109,10 +109,12 @@ static const char *obscure_msg(const char *old_p, const char *new_p, const struc if (string_checker(new_p, pw->pw_name)) { return "similar to username"; } +#ifndef __BIONIC__ /* no gecos as-is, as sub-string, reversed, capitalized, doubled */ if (pw->pw_gecos[0] && string_checker(new_p, pw->pw_gecos)) { return "similar to gecos"; } +#endif /* hostname as-is, as sub-string, reversed, capitalized, doubled */ hostname = safe_gethostname(); i = string_checker(new_p, hostname); diff --git a/libbb/udp_io.c b/libbb/udp_io.c index b8fb675..b6c09aa 100644 --- a/libbb/udp_io.c +++ b/libbb/udp_io.c @@ -8,6 +8,13 @@ */ #include "libbb.h" +#if defined(__BIONIC__) && defined(IPV6_PKTINFO) +struct in6_pktinfo { + struct in6_addr ipi6_addr; /* src/dst IPv6 address */ + unsigned int ipi6_ifindex; /* send/recv if index */ +}; +#endif + /* * This asks kernel to let us know dst addr/port of incoming packets * We don't check for errors here. Not supported == won't be used diff --git a/libbb/unicode.c b/libbb/unicode.c index 99dc1df..96eb646 100644 --- a/libbb/unicode.c +++ b/libbb/unicode.c @@ -14,6 +14,12 @@ uint8_t unicode_status; #endif +#ifdef __BIONIC__ +# define VOID +#else +# define VOID void +#endif + /* This file is compiled only if UNICODE_SUPPORT is on. * We check other options and decide whether to use libc support * via locale, or use our own logic: @@ -37,7 +43,7 @@ void FAST_FUNC reinit_unicode(const char *LANG) unicode_status = (width == 1 ? UNICODE_ON : UNICODE_OFF); } -void FAST_FUNC init_unicode(void) +void FAST_FUNC init_unicode(VOID) { if (unicode_status == UNICODE_UNKNOWN) reinit_unicode(getenv("LANG")); @@ -56,7 +62,7 @@ void FAST_FUNC reinit_unicode(const char *LANG) unicode_status = UNICODE_ON; } -void FAST_FUNC init_unicode(void) +void FAST_FUNC init_unicode(VOID) { if (unicode_status == UNICODE_UNKNOWN) reinit_unicode(getenv("LANG")); @@ -205,6 +211,8 @@ size_t FAST_FUNC mbstowcs(wchar_t *dest, const char *src, size_t n) { size_t org_n = n; + if (!src) return 0; + if (unicode_status != UNICODE_ON) { while (n) { unsigned char c = *src++; @@ -1006,9 +1014,11 @@ static char* FAST_FUNC unicode_conv_to_printable2(uni_stat_t *stats, const char } else { d = dst = xstrndup(src, width); while (*d) { +#if !ENABLE_UNICODE_PRESERVE_BROKEN /* Unicode checks are not working in 1.19.0 but can be displayed if not filtered */ unsigned char c = *d; if (c < ' ' || c >= 0x7f) *d = '?'; +#endif d++; } } diff --git a/libbb/wfopen.c b/libbb/wfopen.c index 76dc8b8..115b091 100644 --- a/libbb/wfopen.c +++ b/libbb/wfopen.c @@ -43,7 +43,7 @@ static FILE* xfdopen_helper(unsigned fd_and_rw_bit) { FILE* fp = fdopen(fd_and_rw_bit >> 1, fd_and_rw_bit & 1 ? "w" : "r"); if (!fp) - bb_error_msg_and_die(bb_msg_memory_exhausted); + bb_error_msg_and_die("%s", bb_msg_memory_exhausted); return fp; } FILE* FAST_FUNC xfdopen_for_read(int fd) diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c index 56ee459..a42424d 100644 --- a/libbb/xfuncs_printf.c +++ b/libbb/xfuncs_printf.c @@ -37,7 +37,7 @@ void* FAST_FUNC malloc_or_warn(size_t size) { void *ptr = malloc(size); if (ptr == NULL && size != 0) - bb_error_msg(bb_msg_memory_exhausted); + bb_error_msg("%s", bb_msg_memory_exhausted); return ptr; } @@ -46,7 +46,7 @@ void* FAST_FUNC xmalloc(size_t size) { void *ptr = malloc(size); if (ptr == NULL && size != 0) - bb_error_msg_and_die(bb_msg_memory_exhausted); + bb_error_msg_and_die("%s", bb_msg_memory_exhausted); return ptr; } @@ -57,7 +57,7 @@ void* FAST_FUNC xrealloc(void *ptr, size_t size) { ptr = realloc(ptr, size); if (ptr == NULL && size != 0) - bb_error_msg_and_die(bb_msg_memory_exhausted); + bb_error_msg_and_die("%s", bb_msg_memory_exhausted); return ptr; } #endif /* DMALLOC */ @@ -81,7 +81,7 @@ char* FAST_FUNC xstrdup(const char *s) t = strdup(s); if (t == NULL) - bb_error_msg_and_die(bb_msg_memory_exhausted); + bb_error_msg_and_die("%s", bb_msg_memory_exhausted); return t; } @@ -299,14 +299,14 @@ char* FAST_FUNC xasprintf(const char *format, ...) va_end(p); if (r < 0) - bb_error_msg_and_die(bb_msg_memory_exhausted); + bb_error_msg_and_die("%s", bb_msg_memory_exhausted); return string_ptr; } void FAST_FUNC xsetenv(const char *key, const char *value) { if (setenv(key, value, 1)) - bb_error_msg_and_die(bb_msg_memory_exhausted); + bb_error_msg_and_die("%s", bb_msg_memory_exhausted); } /* Handles "VAR=VAL" strings, even those which are part of environ diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index b37270f..fd5b40b 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c @@ -129,7 +129,7 @@ int addgroup_main(int argc UNUSED_PARAM, char **argv) /* need to be root */ if (geteuid()) { - bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); + bb_error_msg_and_die("%s", bb_msg_perm_denied_are_you_root); } #if ENABLE_FEATURE_ADDGROUP_LONG_OPTIONS applet_long_options = addgroup_longopts; diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 1d082c8..2a66100 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c @@ -154,7 +154,7 @@ int adduser_main(int argc UNUSED_PARAM, char **argv) /* got root? */ if (geteuid()) { - bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); + bb_error_msg_and_die("%s", bb_msg_perm_denied_are_you_root); } pw.pw_gecos = (char *)"Linux User,,,"; diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index 2262b79..33286fd 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c @@ -38,7 +38,7 @@ int chpasswd_main(int argc UNUSED_PARAM, char **argv) int opt, rc; if (getuid() != 0) - bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); + bb_error_msg_and_die("%s", bb_msg_perm_denied_are_you_root); opt_complementary = "m--e:e--m"; IF_LONG_OPTS(applet_long_options = chpasswd_longopts;) diff --git a/loginutils/deluser.c b/loginutils/deluser.c index e39ac55..ee60efc 100644 --- a/loginutils/deluser.c +++ b/loginutils/deluser.c @@ -38,7 +38,7 @@ int deluser_main(int argc, char **argv) int do_deluser = (ENABLE_DELUSER && (!ENABLE_DELGROUP || applet_name[3] == 'u')); if (geteuid() != 0) - bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); + bb_error_msg_and_die("%s", bb_msg_perm_denied_are_you_root); name = argv[1]; member = NULL; diff --git a/loginutils/getty.c b/loginutils/getty.c index 6245665..d62c724 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -462,7 +462,7 @@ static char *get_logname(void) if (read(STDIN_FILENO, &c, 1) < 1) { if (errno == EINTR || errno == EIO) exit(EXIT_SUCCESS); - bb_perror_msg_and_die(bb_msg_read_error); + bb_perror_msg_and_die("%s", bb_msg_read_error); } /* BREAK. If we have speeds to try, diff --git a/mailutils/mail.c b/mailutils/mail.c index 66c7947..8f9a634 100644 --- a/mailutils/mail.c +++ b/mailutils/mail.c @@ -140,7 +140,7 @@ void FAST_FUNC encode_base64(char *fname, const char *text, const char *eol) if (fname) { size = fread((char *)src_buf, 1, SRC_BUF_SIZE, fp); if ((ssize_t)size < 0) - bb_perror_msg_and_die(bb_msg_read_error); + bb_perror_msg_and_die("%s", bb_msg_read_error); } else { size = len; if (len > SRC_BUF_SIZE) diff --git a/miscutils/crontab.c b/miscutils/crontab.c index 4731d8d..49d1da7 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c @@ -115,7 +115,7 @@ int crontab_main(int argc UNUSED_PARAM, char **argv) if (sanitize_env_if_suid()) { /* Clears dangerous stuff, sets PATH */ /* Run by non-root */ if (opt_ler & (OPT_u|OPT_c)) - bb_error_msg_and_die(bb_msg_you_must_be_root); + bb_error_msg_and_die("%s", bb_msg_you_must_be_root); } if (opt_ler & OPT_u) { diff --git a/modutils/Config.src b/modutils/Config.src index 449ac65..4ab9102 100644 --- a/modutils/Config.src +++ b/modutils/Config.src @@ -244,14 +244,6 @@ config FEATURE_MODUTILS_SYMBOLS Say Y if unsure. -config DEFAULT_MODULES_DIR - string "Default directory containing modules" - default "/lib/modules" - depends on DEPMOD || MODPROBE || MODPROBE_SMALL || MODINFO - help - Directory that contains kernel modules. - Defaults to "/lib/modules" - config DEFAULT_DEPMOD_FILE string "Default name of modules.dep" default "modules.dep" diff --git a/modutils/depmod.c b/modutils/depmod.c index f6c0bf3..d912bac 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c @@ -175,8 +175,9 @@ int depmod_main(int argc UNUSED_PARAM, char **argv) { module_info *modules, *m, *dep; const char *moddir_base = "/"; - char *moddir, *version; + char *version; struct utsname uts; + struct stat info; int tmp; getopt32(argv, "aAb:eF:nruqC:", &moddir_base, NULL, NULL); @@ -194,10 +195,10 @@ int depmod_main(int argc UNUSED_PARAM, char **argv) uname(&uts); version = uts.release; } - moddir = concat_path_file(&CONFIG_DEFAULT_MODULES_DIR[1], version); - xchdir(moddir); - if (ENABLE_FEATURE_CLEAN_UP) - free(moddir); + xchdir(&CONFIG_DEFAULT_MODULES_DIR[1]); + if (stat(version, &info) == 0) { + xchdir(version); + } /* Scan modules */ modules = NULL; diff --git a/modutils/modinfo.c b/modutils/modinfo.c index 410b6fb..0eb93ac 100644 --- a/modutils/modinfo.c +++ b/modutils/modinfo.c @@ -58,7 +58,7 @@ static void modinfo(const char *path, const char *version, }; size_t len; int j, length; - char *ptr, *the_module; + char *ptr, *fullpath, *the_module; const char *field = env->field; int tags = env->tags; @@ -72,11 +72,18 @@ static void modinfo(const char *path, const char *version, if (path[0] == '/') return; /* Newer depmod puts relative paths in modules.dep */ - path = xasprintf("%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, version, path); - the_module = xmalloc_open_zipped_read_close(path, &len); - free((char*)path); - if (!the_module) + fullpath = xasprintf("%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, version, path); + the_module = xmalloc_open_zipped_read_close(fullpath, &len); + if (!the_module) { + fullpath = xasprintf("%s/%s", CONFIG_DEFAULT_MODULES_DIR, path); + the_module = xmalloc_open_zipped_read_close(fullpath, &len); + } + free((char*)fullpath); + if (!the_module) { + // outputs system error msg + bb_perror_msg(""); return; + } } if (field) @@ -137,8 +144,14 @@ int modinfo_main(int argc UNUSED_PARAM, char **argv) uname(&uts); parser = config_open2( xasprintf("%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, uts.release, CONFIG_DEFAULT_DEPMOD_FILE), - xfopen_for_read + fopen_for_read ); + if (!parser) { + parser = config_open2( + xasprintf("%s/%s", CONFIG_DEFAULT_MODULES_DIR, CONFIG_DEFAULT_DEPMOD_FILE), + xfopen_for_read + ); + } while (config_read(parser, tokens, 2, 1, "# \t", PARSE_NORMAL)) { colon = last_char_is(tokens[0], ':'); diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index f5b283b..275bec8 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c @@ -749,6 +749,7 @@ int modprobe_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int modprobe_main(int argc UNUSED_PARAM, char **argv) { struct utsname uts; + struct stat info; char applet0 = applet_name[0]; IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(char *options;) @@ -763,7 +764,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) /* Prevent ugly corner cases with no modules at all */ modinfo = xzalloc(sizeof(modinfo[0])); - if ('i' != applet0) { /* not insmod */ + if ('i' != applet0 && 'r' != applet0) { /* not insmod and not rmmod */ /* Goto modules directory */ xchdir(CONFIG_DEFAULT_MODULES_DIR); } @@ -793,8 +794,14 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) getopt32(argv, "na" "AeF:qru" /* "b:vV", NULL */, NULL); argv += optind; /* if (argv[0] && argv[1]) bb_show_usage(); */ - /* Goto $VERSION directory */ - xchdir(argv[0] ? argv[0] : uts.release); + if (argv[0]) { + xchdir(argv[0]); + } else { + if (stat(uts.release, &info) == 0) { + /* Goto $VERSION directory */ + xchdir(uts.release); + } + } /* Force full module scan by asking to find a bogus module. * This will generate modules.dep.bb as a side effect. */ process_module((char*)"/", NULL); @@ -813,9 +820,11 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) option_mask32 |= OPT_r; } - if ('i' != applet0) { /* not insmod */ - /* Goto $VERSION directory */ - xchdir(uts.release); + if ('i' != applet0 && 'r' != applet0) { /* not insmod and not rmmod */ + if (stat(uts.release, &info) == 0) { + /* Goto $VERSION directory */ + xchdir(uts.release); + } } #if ENABLE_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE diff --git a/modutils/modprobe.c b/modutils/modprobe.c index c1a1828..d715c4a 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -530,6 +530,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) int rc; unsigned opt; struct module_entry *me; + struct stat info; INIT_G(); @@ -587,6 +588,13 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) return EXIT_SUCCESS; } + /* Goto modules location */ + xchdir(CONFIG_DEFAULT_MODULES_DIR); + uname(&uts); + if (stat(uts.release, &info) == 0) { + xchdir(uts.release); + } + /* Retrieve module names of already loaded modules */ { char *s; diff --git a/networking/brctl.c b/networking/brctl.c index 19f474f..c0ca5df 100644 --- a/networking/brctl.c +++ b/networking/brctl.c @@ -67,7 +67,7 @@ # include <linux/if_bridge.h> /* FIXME: These 4 funcs are not really clean and could be improved */ -static ALWAYS_INLINE void strtotimeval(struct timeval *tv, +static ALWAYS_INLINE void strtotimevalbb(struct timeval *tv, const char *time_str) { double secs; @@ -104,7 +104,7 @@ static void jiffies_to_tv(struct timeval *tv, unsigned long jiffies) static unsigned long str_to_jiffies(const char *time_str) { struct timeval tv; - strtotimeval(&tv, time_str); + strtotimevalbb(&tv, time_str); return tv_to_jiffies(&tv); } diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index abdf94c..eae1dd0 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c @@ -220,7 +220,7 @@ int ftp_receive(const char *local_path, char *server_path) { int fd_data; int fd_local = -1; - off_t beg_range = 0; + filesize_t beg_range = 0; /* connect to the data socket */ fd_data = xconnect_ftpdata(); @@ -248,7 +248,7 @@ int ftp_receive(const char *local_path, char *server_path) } if (do_continue) { - sprintf(buf, "REST %"OFF_FMT"u", beg_range); + sprintf(buf, "REST %"FILESIZE_FMT"u", beg_range); if (ftpcmd(buf, NULL) != 350) { do_continue = 0; } diff --git a/networking/interface.c b/networking/interface.c index 79c322e..dc67995 100644 --- a/networking/interface.c +++ b/networking/interface.c @@ -35,6 +35,8 @@ #include "inet_common.h" #include <net/if.h> #include <net/if_arp.h> + +//if !defined(__UCLIBC__) && !defined(__BIONIC__) #ifdef HAVE_NET_ETHERNET_H # include <net/ethernet.h> #endif diff --git a/networking/ipv6/icmp6.h b/networking/ipv6/icmp6.h new file mode 100644 index 0000000..0cb1aa6 --- a/dev/null +++ b/networking/ipv6/icmp6.h @@ -0,0 +1,346 @@ +/* Copyright (C) 1991-1997,2000,2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _NETINET_ICMP6_H +#define _NETINET_ICMP6_H 1 + +#include <inttypes.h> +#include <string.h> +#include <sys/types.h> +#include <netinet/in.h> + +#define ICMP6_FILTER 1 + +#define ICMP6_FILTER_BLOCK 1 +#define ICMP6_FILTER_PASS 2 +#define ICMP6_FILTER_BLOCKOTHERS 3 +#define ICMP6_FILTER_PASSONLY 4 + +struct icmp6_filter + { + uint32_t icmp6_filt[8]; + }; + +struct icmp6_hdr + { + uint8_t icmp6_type; /* type field */ + uint8_t icmp6_code; /* code field */ + uint16_t icmp6_cksum; /* checksum field */ + union + { + uint32_t icmp6_un_data32[1]; /* type-specific field */ + uint16_t icmp6_un_data16[2]; /* type-specific field */ + uint8_t icmp6_un_data8[4]; /* type-specific field */ + } icmp6_dataun; + }; + +#define icmp6_data32 icmp6_dataun.icmp6_un_data32 +#define icmp6_data16 icmp6_dataun.icmp6_un_data16 +#define icmp6_data8 icmp6_dataun.icmp6_un_data8 +#define icmp6_pptr icmp6_data32[0] /* parameter prob */ +#define icmp6_mtu icmp6_data32[0] /* packet too big */ +#define icmp6_id icmp6_data16[0] /* echo request/reply */ +#define icmp6_seq icmp6_data16[1] /* echo request/reply */ +#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */ + +#define ICMP6_DST_UNREACH 1 +#define ICMP6_PACKET_TOO_BIG 2 +#define ICMP6_TIME_EXCEEDED 3 +#define ICMP6_PARAM_PROB 4 + +#define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */ + +#define ICMP6_ECHO_REQUEST 128 +#define ICMP6_ECHO_REPLY 129 +#define MLD_LISTENER_QUERY 130 +#define MLD_LISTENER_REPORT 131 +#define MLD_LISTENER_REDUCTION 132 + +#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */ +#define ICMP6_DST_UNREACH_ADMIN 1 /* communication with destination */ + /* administratively prohibited */ +#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */ +#define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */ +#define ICMP6_DST_UNREACH_NOPORT 4 /* bad port */ + +#define ICMP6_TIME_EXCEED_TRANSIT 0 /* Hop Limit == 0 in transit */ +#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* Reassembly time out */ + +#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */ +#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized Next Header */ +#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized IPv6 option */ + +#define ICMP6_FILTER_WILLPASS(type, filterp) \ + ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0) + +#define ICMP6_FILTER_WILLBLOCK(type, filterp) \ + ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0) + +#define ICMP6_FILTER_SETPASS(type, filterp) \ + ((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31)))) + +#define ICMP6_FILTER_SETBLOCK(type, filterp) \ + ((((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31)))) + +#define ICMP6_FILTER_SETPASSALL(filterp) \ + memset (filterp, 0, sizeof (struct icmp6_filter)); + +#define ICMP6_FILTER_SETBLOCKALL(filterp) \ + memset (filterp, 0xFF, sizeof (struct icmp6_filter)); + +#define ND_ROUTER_SOLICIT 133 +#define ND_ROUTER_ADVERT 134 +#define ND_NEIGHBOR_SOLICIT 135 +#define ND_NEIGHBOR_ADVERT 136 +#define ND_REDIRECT 137 + +struct nd_router_solicit /* router solicitation */ + { + struct icmp6_hdr nd_rs_hdr; + /* could be followed by options */ + }; + +#define nd_rs_type nd_rs_hdr.icmp6_type +#define nd_rs_code nd_rs_hdr.icmp6_code +#define nd_rs_cksum nd_rs_hdr.icmp6_cksum +#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0] + +struct nd_router_advert /* router advertisement */ + { + struct icmp6_hdr nd_ra_hdr; + uint32_t nd_ra_reachable; /* reachable time */ + uint32_t nd_ra_retransmit; /* retransmit timer */ + /* could be followed by options */ + }; + +#define nd_ra_type nd_ra_hdr.icmp6_type +#define nd_ra_code nd_ra_hdr.icmp6_code +#define nd_ra_cksum nd_ra_hdr.icmp6_cksum +#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0] +#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1] +#define ND_RA_FLAG_MANAGED 0x80 +#define ND_RA_FLAG_OTHER 0x40 +#define ND_RA_FLAG_HOME_AGENT 0x20 +#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1] + +struct nd_neighbor_solicit /* neighbor solicitation */ + { + struct icmp6_hdr nd_ns_hdr; + struct in6_addr nd_ns_target; /* target address */ + /* could be followed by options */ + }; + +#define nd_ns_type nd_ns_hdr.icmp6_type +#define nd_ns_code nd_ns_hdr.icmp6_code +#define nd_ns_cksum nd_ns_hdr.icmp6_cksum +#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0] + +struct nd_neighbor_advert /* neighbor advertisement */ + { + struct icmp6_hdr nd_na_hdr; + struct in6_addr nd_na_target; /* target address */ + /* could be followed by options */ + }; + +#define nd_na_type nd_na_hdr.icmp6_type +#define nd_na_code nd_na_hdr.icmp6_code +#define nd_na_cksum nd_na_hdr.icmp6_cksum +#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0] +#if BYTE_ORDER == BIG_ENDIAN +#define ND_NA_FLAG_ROUTER 0x80000000 +#define ND_NA_FLAG_SOLICITED 0x40000000 +#define ND_NA_FLAG_OVERRIDE 0x20000000 +#else /* BYTE_ORDER == LITTLE_ENDIAN */ +#define ND_NA_FLAG_ROUTER 0x00000080 +#define ND_NA_FLAG_SOLICITED 0x00000040 +#define ND_NA_FLAG_OVERRIDE 0x00000020 +#endif + +struct nd_redirect /* redirect */ + { + struct icmp6_hdr nd_rd_hdr; + struct in6_addr nd_rd_target; /* target address */ + struct in6_addr nd_rd_dst; /* destination address */ + /* could be followed by options */ + }; + +#define nd_rd_type nd_rd_hdr.icmp6_type +#define nd_rd_code nd_rd_hdr.icmp6_code +#define nd_rd_cksum nd_rd_hdr.icmp6_cksum +#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0] + +struct nd_opt_hdr /* Neighbor discovery option header */ + { + uint8_t nd_opt_type; + uint8_t nd_opt_len; /* in units of 8 octets */ + /* followed by option specific data */ + }; + +#define ND_OPT_SOURCE_LINKADDR 1 +#define ND_OPT_TARGET_LINKADDR 2 +#define ND_OPT_PREFIX_INFORMATION 3 +#define ND_OPT_REDIRECTED_HEADER 4 +#define ND_OPT_MTU 5 +#define ND_OPT_RTR_ADV_INTERVAL 7 +#define ND_OPT_HOME_AGENT_INFO 8 + +struct nd_opt_prefix_info /* prefix information */ + { + uint8_t nd_opt_pi_type; + uint8_t nd_opt_pi_len; + uint8_t nd_opt_pi_prefix_len; + uint8_t nd_opt_pi_flags_reserved; + uint32_t nd_opt_pi_valid_time; + uint32_t nd_opt_pi_preferred_time; + uint32_t nd_opt_pi_reserved2; + struct in6_addr nd_opt_pi_prefix; + }; + +#define ND_OPT_PI_FLAG_ONLINK 0x80 +#define ND_OPT_PI_FLAG_AUTO 0x40 +#define ND_OPT_PI_FLAG_RADDR 0x20 + +struct nd_opt_rd_hdr /* redirected header */ + { + uint8_t nd_opt_rh_type; + uint8_t nd_opt_rh_len; + uint16_t nd_opt_rh_reserved1; + uint32_t nd_opt_rh_reserved2; + /* followed by IP header and data */ + }; + +struct nd_opt_mtu /* MTU option */ + { + uint8_t nd_opt_mtu_type; + uint8_t nd_opt_mtu_len; + uint16_t nd_opt_mtu_reserved; + uint32_t nd_opt_mtu_mtu; + }; + +struct mld_hdr + { + struct icmp6_hdr mld_icmp6_hdr; + struct in6_addr mld_addr; /* multicast address */ + }; + +#define mld_type mld_icmp6_hdr.icmp6_type +#define mld_code mld_icmp6_hdr.icmp6_code +#define mld_cksum mld_icmp6_hdr.icmp6_cksum +#define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0] +#define mld_reserved mld_icmp6_hdr.icmp6_data16[1] + +#define ICMP6_ROUTER_RENUMBERING 138 + +struct icmp6_router_renum /* router renumbering header */ + { + struct icmp6_hdr rr_hdr; + uint8_t rr_segnum; + uint8_t rr_flags; + uint16_t rr_maxdelay; + uint32_t rr_reserved; + }; + +#define rr_type rr_hdr.icmp6_type +#define rr_code rr_hdr.icmp6_code +#define rr_cksum rr_hdr.icmp6_cksum +#define rr_seqnum rr_hdr.icmp6_data32[0] + +/* Router renumbering flags */ +#define ICMP6_RR_FLAGS_TEST 0x80 +#define ICMP6_RR_FLAGS_REQRESULT 0x40 +#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20 +#define ICMP6_RR_FLAGS_SPECSITE 0x10 +#define ICMP6_RR_FLAGS_PREVDONE 0x08 + +struct rr_pco_match /* match prefix part */ + { + uint8_t rpm_code; + uint8_t rpm_len; + uint8_t rpm_ordinal; + uint8_t rpm_matchlen; + uint8_t rpm_minlen; + uint8_t rpm_maxlen; + uint16_t rpm_reserved; + struct in6_addr rpm_prefix; + }; + +/* PCO code values */ +#define RPM_PCO_ADD 1 +#define RPM_PCO_CHANGE 2 +#define RPM_PCO_SETGLOBAL 3 + +struct rr_pco_use /* use prefix part */ + { + uint8_t rpu_uselen; + uint8_t rpu_keeplen; + uint8_t rpu_ramask; + uint8_t rpu_raflags; + uint32_t rpu_vltime; + uint32_t rpu_pltime; + uint32_t rpu_flags; + struct in6_addr rpu_prefix; + }; + +#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x20 +#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x10 + +#if BYTE_ORDER == BIG_ENDIAN +# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000 +# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000 +#elif BYTE_ORDER == LITTLE_ENDIAN +# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80 +# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40 +#endif + +struct rr_result /* router renumbering result message */ + { + uint16_t rrr_flags; + uint8_t rrr_ordinal; + uint8_t rrr_matchedlen; + uint32_t rrr_ifid; + struct in6_addr rrr_prefix; + }; + +#if BYTE_ORDER == BIG_ENDIAN +# define ICMP6_RR_RESULT_FLAGS_OOB 0x0002 +# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001 +#elif BYTE_ORDER == LITTLE_ENDIAN +# define ICMP6_RR_RESULT_FLAGS_OOB 0x0200 +# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100 +#endif + +/* Mobile IPv6 extension: Advertisement Interval. */ +struct nd_opt_adv_interval + { + uint8_t nd_opt_adv_interval_type; + uint8_t nd_opt_adv_interval_len; + uint16_t nd_opt_adv_interval_reserved; + uint32_t nd_opt_adv_interval_ival; + }; + +/* Mobile IPv6 extension: Home Agent Info. */ +struct nd_opt_home_agent_info + { + uint8_t nd_opt_home_agent_info_type; + uint8_t nd_opt_home_agent_info_len; + uint16_t nd_opt_home_agent_info_reserved; + int16_t nd_opt_home_agent_info_preference; + uint16_t nd_opt_home_agent_info_lifetime; + }; + +#endif /* netinet/icmpv6.h */ diff --git a/networking/ipv6/ip6.h b/networking/ipv6/ip6.h new file mode 100644 index 0000000..bef2af2 --- a/dev/null +++ b/networking/ipv6/ip6.h @@ -0,0 +1,189 @@ +/* Copyright (C) 1991-1997, 2001, 2003, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _NETINET_IP6_H +#define _NETINET_IP6_H 1 + +#include <inttypes.h> +#include <netinet/in.h> + +struct ip6_hdr + { + union + { + struct ip6_hdrctl + { + uint32_t ip6_un1_flow; /* 4 bits version, 8 bits TC, + 20 bits flow-ID */ + uint16_t ip6_un1_plen; /* payload length */ + uint8_t ip6_un1_nxt; /* next header */ + uint8_t ip6_un1_hlim; /* hop limit */ + } ip6_un1; + uint8_t ip6_un2_vfc; /* 4 bits version, top 4 bits tclass */ + } ip6_ctlun; + struct in6_addr ip6_src; /* source address */ + struct in6_addr ip6_dst; /* destination address */ + }; + +#define ip6_vfc ip6_ctlun.ip6_un2_vfc +#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow +#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen +#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt +#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim +#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim + +/* Generic extension header. */ +struct ip6_ext + { + uint8_t ip6e_nxt; /* next header. */ + uint8_t ip6e_len; /* length in units of 8 octets. */ + }; + +/* Hop-by-Hop options header. */ +struct ip6_hbh + { + uint8_t ip6h_nxt; /* next header. */ + uint8_t ip6h_len; /* length in units of 8 octets. */ + /* followed by options */ + }; + +/* Destination options header */ +struct ip6_dest + { + uint8_t ip6d_nxt; /* next header */ + uint8_t ip6d_len; /* length in units of 8 octets */ + /* followed by options */ + }; + +/* Routing header */ +struct ip6_rthdr + { + uint8_t ip6r_nxt; /* next header */ + uint8_t ip6r_len; /* length in units of 8 octets */ + uint8_t ip6r_type; /* routing type */ + uint8_t ip6r_segleft; /* segments left */ + /* followed by routing type specific data */ + }; + +/* Type 0 Routing header */ +struct ip6_rthdr0 + { + uint8_t ip6r0_nxt; /* next header */ + uint8_t ip6r0_len; /* length in units of 8 octets */ + uint8_t ip6r0_type; /* always zero */ + uint8_t ip6r0_segleft; /* segments left */ + uint8_t ip6r0_reserved; /* reserved field */ + uint8_t ip6r0_slmap[3]; /* strict/loose bit map */ + /* followed by up to 127 struct in6_addr */ + struct in6_addr ip6r0_addr[0]; + }; + +/* Fragment header */ +struct ip6_frag + { + uint8_t ip6f_nxt; /* next header */ + uint8_t ip6f_reserved; /* reserved field */ + uint16_t ip6f_offlg; /* offset, reserved, and flag */ + uint32_t ip6f_ident; /* identification */ + }; + +#if BYTE_ORDER == BIG_ENDIAN +# define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */ +# define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */ +# define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */ +#else /* BYTE_ORDER == LITTLE_ENDIAN */ +# define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */ +# define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */ +# define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */ +#endif + +/* IPv6 options */ +struct ip6_opt + { + uint8_t ip6o_type; + uint8_t ip6o_len; + }; + +/* The high-order 3 bits of the option type define the behavior + * when processing an unknown option and whether or not the option + * content changes in flight. + */ +#define IP6OPT_TYPE(o) ((o) & 0xc0) +#define IP6OPT_TYPE_SKIP 0x00 +#define IP6OPT_TYPE_DISCARD 0x40 +#define IP6OPT_TYPE_FORCEICMP 0x80 +#define IP6OPT_TYPE_ICMP 0xc0 +#define IP6OPT_TYPE_MUTABLE 0x20 + +/* Special option types for padding. */ +#define IP6OPT_PAD1 0 +#define IP6OPT_PADN 1 + +#define IP6OPT_JUMBO 0xc2 +#define IP6OPT_NSAP_ADDR 0xc3 +#define IP6OPT_TUNNEL_LIMIT 0x04 +#define IP6OPT_ROUTER_ALERT 0x05 + +/* Jumbo Payload Option */ +struct ip6_opt_jumbo + { + uint8_t ip6oj_type; + uint8_t ip6oj_len; + uint8_t ip6oj_jumbo_len[4]; + }; +#define IP6OPT_JUMBO_LEN 6 + +/* NSAP Address Option */ +struct ip6_opt_nsap + { + uint8_t ip6on_type; + uint8_t ip6on_len; + uint8_t ip6on_src_nsap_len; + uint8_t ip6on_dst_nsap_len; + /* followed by source NSAP */ + /* followed by destination NSAP */ + }; + +/* Tunnel Limit Option */ +struct ip6_opt_tunnel + { + uint8_t ip6ot_type; + uint8_t ip6ot_len; + uint8_t ip6ot_encap_limit; + }; + +/* Router Alert Option */ +struct ip6_opt_router + { + uint8_t ip6or_type; + uint8_t ip6or_len; + uint8_t ip6or_value[2]; + }; + +/* Router alert values (in network byte order) */ +#if BYTE_ORDER == BIG_ENDIAN +# define IP6_ALERT_MLD 0x0000 +# define IP6_ALERT_RSVP 0x0001 +# define IP6_ALERT_AN 0x0002 +#else /* BYTE_ORDER == LITTLE_ENDING */ +# define IP6_ALERT_MLD 0x0000 +# define IP6_ALERT_RSVP 0x0100 +# define IP6_ALERT_AN 0x0200 +#endif + +#endif /* netinet/ip6.h */ diff --git a/networking/ipv6/ipv6_route.h b/networking/ipv6/ipv6_route.h new file mode 100644 index 0000000..886bbb7 --- a/dev/null +++ b/networking/ipv6/ipv6_route.h @@ -0,0 +1,56 @@ +/* + * Linux INET6 implementation + * + * Authors: + * Pedro Roque <roque@di.fc.ul.pt> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _LINUX_IPV6_ROUTE_H +#define _LINUX_IPV6_ROUTE_H + +#define RTF_DEFAULT 0x00010000 /* default - learned via ND */ +#define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) + fallback, no routers on link */ +#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ +#define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */ +#define RTF_ANYCAST 0x00100000 /* Anycast */ + +#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ +#define RTF_EXPIRES 0x00400000 + +#define RTF_ROUTEINFO 0x00800000 /* route information - RA */ + +#define RTF_CACHE 0x01000000 /* cache entry */ +#define RTF_FLOW 0x02000000 /* flow significant route */ +#define RTF_POLICY 0x04000000 /* policy route */ + +#define RTF_PREF(pref) ((pref) << 27) +#define RTF_PREF_MASK 0x18000000 + +#define RTF_LOCAL 0x80000000 + + +struct in6_rtmsg { + struct in6_addr rtmsg_dst; + struct in6_addr rtmsg_src; + struct in6_addr rtmsg_gateway; + __u32 rtmsg_type; + __u16 rtmsg_dst_len; + __u16 rtmsg_src_len; + __u32 rtmsg_metric; + unsigned long rtmsg_info; + __u32 rtmsg_flags; + int rtmsg_ifindex; +}; + +#define RTMSG_NEWDEVICE 0x11 +#define RTMSG_DELDEVICE 0x12 +#define RTMSG_NEWROUTE 0x21 +#define RTMSG_DELROUTE 0x22 + +#endif diff --git a/networking/nslookup.c b/networking/nslookup.c index f4fd407..2dfce12 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c @@ -28,6 +28,19 @@ #include <resolv.h> #include "libbb.h" +#ifdef __BIONIC__ +# include <netinet/in.h> +# ifdef ENABLE_FEATURE_IPV6 +# include <netinet/in6.h> +# endif +# include <arpa_nameser.h> +# include <resolv_private.h> +# include <resolv.h> +# undef _res +extern struct __res_state _nres; +# define _res _nres +#endif + /* * I'm only implementing non-interactive mode; * I totally forgot nslookup even had an interactive mode. @@ -117,9 +130,9 @@ static int print_host(const char *hostname, const char *header) static void server_print(void) { char *server; - struct sockaddr *sa; + struct sockaddr *sa=NULL; -#if ENABLE_FEATURE_IPV6 +#if ENABLE_FEATURE_IPV6 && !defined(__BIONIC__) sa = (struct sockaddr*)_res._u._ext.nsaddrs[0]; if (!sa) #endif @@ -146,7 +159,7 @@ static void set_default_dns(const char *server) /* struct copy */ _res.nsaddr_list[0] = lsa->u.sin; } -#if ENABLE_FEATURE_IPV6 +#if ENABLE_FEATURE_IPV6 && !defined(__BIONIC__) /* Hoped libc can cope with IPv4 address there too. * No such luck, glibc 2.4 segfaults even with IPv6, * maybe I misunderstand how to make glibc use IPv6 addr? diff --git a/networking/ntpd.c b/networking/ntpd.c index 206af00..ed9aadb 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c @@ -46,7 +46,11 @@ #include "libbb.h" #include <math.h> #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */ +#ifdef __BIONIC__ +#include <linux/timex.h> +#else #include <sys/timex.h> +#endif #ifndef IPTOS_LOWDELAY # define IPTOS_LOWDELAY 0x10 #endif @@ -1903,7 +1907,7 @@ static NOINLINE void ntp_init(char **argv) srandom(getpid()); if (getuid()) - bb_error_msg_and_die(bb_msg_you_must_be_root); + bb_error_msg_and_die("%s", bb_msg_you_must_be_root); /* Set some globals */ G.stratum = MAXSTRAT; diff --git a/networking/ping.c b/networking/ping.c index d757479..9df1ae1 100644 --- a/networking/ping.c +++ b/networking/ping.c @@ -29,6 +29,22 @@ #include <netinet/ip_icmp.h> #include "libbb.h" +#ifdef __BIONIC__ +/* should be in netinet/ip_icmp.h */ +#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */ +#define ICMP_SOURCE_QUENCH 4 /* Source Quench */ +#define ICMP_REDIRECT 5 /* Redirect (change route) */ +#define ICMP_ECHO 8 /* Echo Request */ +#define ICMP_TIME_EXCEEDED 11 /* Time Exceeded */ +#define ICMP_PARAMETERPROB 12 /* Parameter Problem */ +#define ICMP_TIMESTAMP 13 /* Timestamp Request */ +#define ICMP_TIMESTAMPREPLY 14 /* Timestamp Reply */ +#define ICMP_INFO_REQUEST 15 /* Information Request */ +#define ICMP_INFO_REPLY 16 /* Information Reply */ +#define ICMP_ADDRESS 17 /* Address Mask Request */ +#define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */ +#endif + //config:config PING //config: bool "ping" //config: default y @@ -430,7 +446,7 @@ static void sendping_tail(void (*sp)(int), int size_pkt) * it doesn't matter */ sz = xsendto(pingsock, G.snd_packet, size_pkt, &pingaddr.sa, sizeof(pingaddr)); if (sz != size_pkt) - bb_error_msg_and_die(bb_msg_write_error); + bb_error_msg_and_die("%s", bb_msg_write_error); if (pingcount == 0 || deadline || ntransmitted < pingcount) { /* Didn't send all pings yet - schedule next in 1s */ diff --git a/networking/route.c b/networking/route.c index b7b5a02..194d9ae 100644 --- a/networking/route.c +++ b/networking/route.c @@ -35,10 +35,12 @@ #include <net/route.h> #include <net/if.h> - #include "libbb.h" #include "inet_common.h" +#if ENABLE_FEATURE_IPV6 +#include "ipv6/ipv6_route.h" +#endif #ifndef RTF_UP /* Keep this in sync with /usr/src/linux/include/linux/route.h */ @@ -57,6 +59,12 @@ #define RTF_REJECT 0x0200 /* Reject route */ #endif +#ifndef RTF_CACHE +#define RTF_DEFAULT 0x00010000 /* default - learned via ND */ +#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ +#define RTF_CACHE 0x01000000 /* cache entry */ +#endif + #if defined(SIOCADDRTOLD) || defined(RTF_IRTT) /* route */ #define HAVE_NEW_ADDRT 1 #endif diff --git a/networking/telnet.c b/networking/telnet.c index 6dd0de5..9781263 100644 --- a/networking/telnet.c +++ b/networking/telnet.c @@ -40,6 +40,23 @@ #include <netinet/in.h> #include "libbb.h" +#ifdef __BIONIC__ +/* should be in arpa/telnet.h */ +#define IAC 255 /* interpret as command: */ +#define DONT 254 /* you are not to use option */ +#define DO 253 /* please, you use option */ +#define WONT 252 /* I won't use option */ +#define WILL 251 /* I will use option */ +#define SB 250 /* interpret as subnegotiation */ +#define SE 240 /* end sub negotiation */ +#define TELOPT_ECHO 1 /* echo */ +#define TELOPT_SGA 3 /* suppress go ahead */ +#define TELOPT_TTYPE 24 /* terminal type */ +#define TELOPT_NAWS 31 /* window size */ +#else +#include <arpa/telnet.h> +#endif + #ifdef DOTRACE #define TRACE(x, y) do { if (x) printf y; } while (0) #else diff --git a/networking/traceroute.c b/networking/traceroute.c index c321035..8af5531 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -272,8 +272,13 @@ #include <netinet/ip.h> #include <netinet/ip_icmp.h> #if ENABLE_FEATURE_IPV6 -# include <netinet/ip6.h> -# include <netinet/icmp6.h> +# ifdef __BIONIC__ +# include "ipv6/ip6.h" +# include "ipv6/icmp6.h" +# else +# include <netinet/ip6.h> +# include <netinet/icmp6.h> +# endif # ifndef SOL_IPV6 # define SOL_IPV6 IPPROTO_IPV6 # endif @@ -883,7 +888,7 @@ common_traceroute_main(int op, char **argv) * probe (e.g., on a multi-homed host). */ if (getuid() != 0) - bb_error_msg_and_die(bb_msg_you_must_be_root); + bb_error_msg_and_die("%s", bb_msg_you_must_be_root); } if (op & OPT_WAITTIME) waittime = xatou_range(waittime_str, 1, 24 * 60 * 60); diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c index ff63478..fa23557 100644 --- a/networking/udhcp/arpping.c +++ b/networking/udhcp/arpping.c @@ -50,7 +50,7 @@ int FAST_FUNC arpping(uint32_t test_nip, s = socket(PF_PACKET, SOCK_PACKET, htons(ETH_P_ARP)); if (s == -1) { - bb_perror_msg(bb_msg_can_not_create_raw_socket); + bb_perror_msg("%s", bb_msg_can_not_create_raw_socket); return -1; } diff --git a/networking/wget.c b/networking/wget.c index 6443705..731c23b 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -199,7 +199,7 @@ static FILE *open_socket(len_and_sockaddr *lsa) /* hopefully it understands what ESPIPE means... */ fp = fdopen(xconnect_stream(lsa), "r+"); if (fp == NULL) - bb_perror_msg_and_die(bb_msg_memory_exhausted); + bb_perror_msg_and_die("%s", bb_msg_memory_exhausted); return fp; } @@ -504,7 +504,7 @@ static void NOINLINE retrieve_file_data(FILE *dfp) continue; /* yes */ #endif if (ferror(dfp)) - bb_perror_msg_and_die(bb_msg_read_error); + bb_perror_msg_and_die("%s", bb_msg_read_error); break; /* EOF, not error */ } diff --git a/networking/zcip.c b/networking/zcip.c index 8a35eca..6ef0e25 100644 --- a/networking/zcip.c +++ b/networking/zcip.c @@ -471,7 +471,7 @@ int zcip_main(int argc UNUSED_PARAM, char **argv) // read ARP packet if (safe_read(sock_fd, &p, sizeof(p)) < 0) { - bb_perror_msg_and_die(bb_msg_read_error); + bb_perror_msg_and_die("%s",bb_msg_read_error); } if (p.eth.ether_type != htons(ETHERTYPE_ARP)) continue; diff --git a/printutils/lpr.c b/printutils/lpr.c index fc6bca9..dd39c49 100644 --- a/printutils/lpr.c +++ b/printutils/lpr.c @@ -243,7 +243,7 @@ int lpqr_main(int argc UNUSED_PARAM, char *argv[]) bb_error_msg("sending data file"); st.st_size = 0; /* paranoia: fstat may theoretically fail */ fstat(dfd, &st); - fdprintf(fd, "\x3" "%"OFF_FMT"u d%s\n", st.st_size, remote_filename); + fdprintf(fd, "\x3" "%"FILESIZE_FMT"u d%s\n", st.st_size, remote_filename); get_response_or_say_and_die(fd, "sending data file"); if (bb_copyfd_size(dfd, fd, st.st_size) != st.st_size) { // We're screwed. We sent less bytes than we advertised. diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 5685b5b..921a528 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -336,6 +336,9 @@ ifneq ($(cmd_files),) include $(cmd_files) endif +PHONY += show-src +show-src: + @echo $(lib-y:.o=.c) # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable se we can use it in if_changed and friends. diff --git a/shell/ash.c b/shell/ash.c index d48cd01..e5a5776 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -3750,7 +3750,7 @@ setjobctl(int on) } if (pgrp == getpgrp()) break; - killpg(0, SIGTTIN); + killpg_busybox(0, SIGTTIN); } initialpgrp = pgrp; @@ -3863,7 +3863,7 @@ restartjob(struct job *jp, int mode) pgid = jp->ps[0].ps_pid; if (mode == FORK_FG) xtcsetpgrp(ttyfd, pgid); - killpg(pgid, SIGCONT); + killpg_busybox(pgid, SIGCONT); ps = jp->ps; i = jp->nprocs; do { @@ -3925,8 +3925,8 @@ sprint_status(char *s, int status, int sigonly) #endif } st &= 0x7f; + col = fmtstr(s, 32, "%s", strsignal(st)); //TODO: use bbox's get_signame? strsignal adds ~600 bytes to text+rodata - col = fmtstr(s, 32, strsignal(st)); if (WCOREDUMP(status)) { col += fmtstr(s + col, 16, " (core dumped)"); } diff --git a/shell/hush.c b/shell/hush.c index 1082738..4a32c42 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -2546,7 +2546,7 @@ static int glob_brace(char *pattern, o_string *o, int n) return o_save_ptr_helper(o, n); } if (gr == GLOB_NOSPACE) - bb_error_msg_and_die(bb_msg_memory_exhausted); + bb_error_msg_and_die("%s", bb_msg_memory_exhausted); /* GLOB_ABORTED? Only happens with GLOB_ERR flag, * but we didn't specify it. Paranoia again. */ bb_error_msg_and_die("glob error %d on '%s'", gr, pattern); @@ -2648,7 +2648,7 @@ static int perform_glob(o_string *o, int n) goto literal; } if (gr == GLOB_NOSPACE) - bb_error_msg_and_die(bb_msg_memory_exhausted); + bb_error_msg_and_die("%s", bb_msg_memory_exhausted); /* GLOB_ABORTED? Only happens with GLOB_ERR flag, * but we didn't specify it. Paranoia again. */ bb_error_msg_and_die("glob error %d on '%s'", gr, pattern); diff --git a/testsuite/date/date-works-1 b/testsuite/date/date-works-1 index cb5cea2..12018fe 100644 --- a/testsuite/date/date-works-1 +++ b/testsuite/date/date-works-1 @@ -9,7 +9,7 @@ test x"$dt" = x"01:02:00" dt=`busybox date -d 1:2:3 +%T` test x"$dt" = x"01:02:03" -host_date=/bin/date +host_date=/system/bin/date # date (GNU coreutils) 6.10 reports: # date: invalid date '1.2-3:4' diff --git a/testsuite/du/du-s-works b/testsuite/du/du-s-works index 534432c..adec894 100644 --- a/testsuite/du/du-s-works +++ b/testsuite/du/du-s-works @@ -1,6 +1,6 @@ # FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K -d=/bin +d=/system/bin du -s "$d" > logfile.gnu busybox du -s "$d" > logfile.bb cmp logfile.gnu logfile.bb && exit 0 diff --git a/testsuite/du/du-works b/testsuite/du/du-works index e320f1d..cac86c1 100644 --- a/testsuite/du/du-works +++ b/testsuite/du/du-works @@ -1,6 +1,6 @@ # FEATURE: CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K -d=/bin +d=/system/bin du "$d" > logfile.gnu busybox du "$d" > logfile.bb cmp logfile.gnu logfile.bb && exit 0 diff --git a/testsuite/testing.sh b/testsuite/testing.sh index e7e64e5..9ce9844 100644 --- a/testsuite/testing.sh +++ b/testsuite/testing.sh @@ -36,6 +36,13 @@ export FAILCOUNT=0 export SKIP= +# Android Specific + +if [ ! -x /bin ]; then + mount -o remount,rw / + ln -s /system/xbin /bin +fi + # Helper for helpers. Oh my... test x"$ECHO" != x"" || { diff --git a/util-linux/Config.src b/util-linux/Config.src index bb45705..d2ba57c 100644 --- a/util-linux/Config.src +++ b/util-linux/Config.src @@ -370,7 +370,7 @@ config IPCRM config IPCS bool "ipcs" default y - select PLATFORM_LINUX + depends on PLATFORM_LINUX help The ipcs utility is used to provide information on the currently allocated System V interprocess (IPC) objects in the system. diff --git a/util-linux/acpid.c b/util-linux/acpid.c index 2f27cfd..f39a788 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c @@ -33,6 +33,27 @@ #include <syslog.h> #include <linux/input.h> + +#ifndef EV_SW +# define EV_SW 0x05 +#endif +#ifndef EV_KEY +# define EV_KEY 0x01 +#endif +#ifndef SW_LID +# define SW_LID 0x00 +#endif +#ifndef SW_RFKILL_ALL +# define SW_RFKILL_ALL 0x03 +#endif +#ifndef KEY_POWER +# define KEY_POWER 116 /* SC System Power Down */ +#endif +#ifndef KEY_SLEEP +# define KEY_SLEEP 142 /* SC System Sleep */ +#endif + + enum { OPT_c = (1 << 0), OPT_d = (1 << 1), diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c index 2f0854a..c43db5e 100644 --- a/util-linux/fdformat.c +++ b/util-linux/fdformat.c @@ -107,7 +107,7 @@ int fdformat_main(int argc UNUSED_PARAM, char **argv) read_bytes = safe_read(fd, data, n); if (read_bytes != n) { if (read_bytes < 0) { - bb_perror_msg(bb_msg_read_error); + bb_perror_msg("%s", bb_msg_read_error); } bb_error_msg_and_die("problem reading cylinder %d, " "expected %d, read %d", cyl, n, read_bytes); diff --git a/util-linux/more.c b/util-linux/more.c index efceb71..2f884a9 100644 --- a/util-linux/more.c +++ b/util-linux/more.c @@ -37,11 +37,9 @@ struct globals { #define new_settings (G.new_settings ) #define cin_fileno (G.cin_fileno ) -#define setTermSettings(fd, argp) \ -do { \ - if (ENABLE_FEATURE_USE_TERMIOS) \ - tcsetattr(fd, TCSANOW, argp); \ -} while (0) +#define setTermSettings(fd, argp) do { \ + if (ENABLE_FEATURE_USE_TERMIOS) tcsetattr(fd, TCSANOW, argp); \ + } while (0) #define getTermSettings(fd, argp) tcgetattr(fd, argp) static void gotsig(int sig UNUSED_PARAM) @@ -58,7 +56,7 @@ static void gotsig(int sig UNUSED_PARAM) int more_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int more_main(int argc UNUSED_PARAM, char **argv) { - int c = c; /* for compiler */ + int c = EOF; /* for compiler */ int lines; int input = 0; int spaces = 0; @@ -122,11 +120,8 @@ int more_main(int argc UNUSED_PARAM, char **argv) if (input != 'r' && please_display_more_prompt) { len = printf("--More-- "); if (st.st_size != 0) { - uoff_t d = (uoff_t)st.st_size / 100; - if (d == 0) - d = 1; - len += printf("(%u%% of %"OFF_FMT"u bytes)", - (int) ((uoff_t)ftello(file) / d), + len += printf("(%u%% of %"FILESIZE_FMT"u bytes)", + (int) (ftello(file)*100 / st.st_size), st.st_size); } fflush_all(); diff --git a/util-linux/mount.c b/util-linux/mount.c index 05e532c..42e1983 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -600,7 +600,7 @@ static int mount_it_now(struct mntent *mp, long vfsflags, char *filteropts) // Abort entirely if permission denied. if (rc && errno == EPERM) - bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); + bb_error_msg_and_die("%s", bb_msg_perm_denied_are_you_root); // If the mount was successful, and we're maintaining an old-style // mtab file by hand, add the new entry to it now. @@ -1811,7 +1811,7 @@ static int singlemount(struct mntent *mp, int ignore_busy) mp->mnt_fsname = NULL; // will receive malloced loop dev name if (set_loop(&mp->mnt_fsname, loopFile, 0) < 0) { if (errno == EPERM || errno == EACCES) - bb_error_msg(bb_msg_perm_denied_are_you_root); + bb_error_msg("%s", bb_msg_perm_denied_are_you_root); else bb_perror_msg("can't setup loop device"); return errno; @@ -1995,7 +1995,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv) // argument when we get it. if (argv[1]) { if (nonroot) - bb_error_msg_and_die(bb_msg_you_must_be_root); + bb_error_msg_and_die("%s", bb_msg_you_must_be_root); mtpair->mnt_fsname = argv[0]; mtpair->mnt_dir = argv[1]; mtpair->mnt_type = fstype; @@ -2012,7 +2012,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv) i = parse_mount_options(cmdopts, NULL); // FIXME: should be "long", not "int" if (nonroot && (i & ~MS_SILENT)) // Non-root users cannot specify flags - bb_error_msg_and_die(bb_msg_you_must_be_root); + bb_error_msg_and_die("%s", bb_msg_you_must_be_root); // If we have a shared subtree flag, don't worry about fstab or mtab. if (ENABLE_FEATURE_MOUNT_FLAGS @@ -2075,7 +2075,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv) // No, mount -a won't mount anything, // even user mounts, for mere humans if (nonroot) - bb_error_msg_and_die(bb_msg_you_must_be_root); + bb_error_msg_and_die("%s", bb_msg_you_must_be_root); // Does type match? (NULL matches always) if (!match_fstype(mtcur, fstype)) @@ -2155,7 +2155,7 @@ int mount_main(int argc UNUSED_PARAM, char **argv) // fstab must have "users" or "user" l = parse_mount_options(mtcur->mnt_opts, NULL); if (!(l & MOUNT_USERS)) - bb_error_msg_and_die(bb_msg_you_must_be_root); + bb_error_msg_and_die("%s", bb_msg_you_must_be_root); } //util-linux-2.12 does not do this check. diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c index 83f01fa..7f49f47 100644 --- a/util-linux/pivot_root.c +++ b/util-linux/pivot_root.c @@ -24,7 +24,6 @@ int pivot_root_main(int argc, char **argv) { if (argc != 3) bb_show_usage(); - if (pivot_root(argv[1], argv[2]) < 0) { /* prints "pivot_root: <strerror text>" */ bb_perror_nomsg_and_die(); diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index dbefa4c..4905f09 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c @@ -24,7 +24,13 @@ #include "libbb.h" #include <mntent.h> +#ifndef __BIONIC__ #include <sys/swap.h> +#endif + +#ifndef MNTTYPE_SWAP +#define MNTTYPE_SWAP "swap" +#endif #if ENABLE_FEATURE_MOUNT_LABEL # include "volume_id.h" diff --git a/util-linux/volume_id/volume_id.c b/util-linux/volume_id/volume_id.c index f41d4e0..06d91eb 100644 --- a/util-linux/volume_id/volume_id.c +++ b/util-linux/volume_id/volume_id.c @@ -155,11 +155,12 @@ static const probe_fptr fs2[] = { int FAST_FUNC volume_id_probe_all(struct volume_id *id, /*uint64_t off,*/ uint64_t size) { - unsigned i; + unsigned i, arsize; /* probe for raid first, cause fs probes may be successful on raid members */ if (size) { - for (i = 0; i < ARRAY_SIZE(raid1); i++) { + arsize=ARRAY_SIZE(raid1); + for (i = 0; i < arsize; i++) { if (raid1[i](id, /*off,*/ size) == 0) goto ret; if (id->error) @@ -167,7 +168,8 @@ int FAST_FUNC volume_id_probe_all(struct volume_id *id, /*uint64_t off,*/ uint64 } } - for (i = 0; i < ARRAY_SIZE(raid2); i++) { + arsize=ARRAY_SIZE(raid2); + for (i = 0; i < arsize; i++) { if (raid2[i](id /*,off*/) == 0) goto ret; if (id->error) @@ -175,25 +177,29 @@ int FAST_FUNC volume_id_probe_all(struct volume_id *id, /*uint64_t off,*/ uint64 } /* signature in the first block, only small buffer needed */ - for (i = 0; i < ARRAY_SIZE(fs1); i++) { + arsize=ARRAY_SIZE(fs1); + for (i = 0; i < arsize; i++) { if (fs1[i](id /*,off*/) == 0) goto ret; if (id->error) goto ret; } + /* fill buffer with maximum */ volume_id_get_buffer(id, 0, SB_BUFFER_SIZE); - for (i = 0; i < ARRAY_SIZE(fs2); i++) { + arsize=ARRAY_SIZE(fs2); + for (i = 0; i < arsize; i++) { if (fs2[i](id /*,off*/) == 0) - goto ret; + break; if (id->error) - goto ret; + break; } - ret: volume_id_free_buffer(id); + +ret: return (- id->error); /* 0 or -1 */ } |