update to busybox-20090802, build busybox in initramfs shared because uClic segfault

This commit is contained in:
Stephan Raue 2009-08-03 00:01:08 +02:00
parent 80e83e12d4
commit b34b7d65f5
8 changed files with 67 additions and 401 deletions

View File

@ -1,13 +1,21 @@
dir /dev 755 0 0
nod /dev/console 644 0 0 c 5 1
nod /dev/tty1 644 0 0 c 4 1
nod /dev/loop0 644 0 0 b 7 0
nod /dev/fb0 644 0 0 c 29 0
dir /bin 755 1000 1000
slink /bin/sh busybox 777 0 0
file /bin/busybox initramfs/bin/busybox 755 0 0
dir /lib 755 1000 1000
file /lib/ld-uClibc.so.0 initramfs/lib/ld-uClibc.so.0 755 0 0
file /lib/libc.so.0 initramfs/lib/libc.so.0 755 0 0
dir /proc 755 0 0
dir /sys 755 0 0
dir /flash 755 0 0
dir /sysroot 755 0 0
dir /storage 755 0 0
file /init initramfs/init.initramfs 755 0 0

View File

@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.14.0
# Thu Apr 23 01:11:28 2009
# Busybox version: 1.15.0.svn
# Sun Aug 2 13:07:05 2009
#
CONFIG_HAVE_DOT_CONFIG=y
@ -14,7 +14,6 @@ CONFIG_HAVE_DOT_CONFIG=y
#
# CONFIG_DESKTOP is not set
# CONFIG_EXTRA_COMPAT is not set
# CONFIG_FEATURE_ASSUME_UNICODE is not set
# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
@ -23,7 +22,9 @@ CONFIG_FEATURE_VERBOSE_USAGE=y
# CONFIG_FEATURE_COMPRESS_USAGE is not set
# CONFIG_FEATURE_INSTALLER is not set
# CONFIG_LOCALE_SUPPORT is not set
CONFIG_GETOPT_LONG=y
# CONFIG_FEATURE_ASSUME_UNICODE is not set
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
# CONFIG_LONG_OPTS is not set
# CONFIG_FEATURE_DEVPTS is not set
# CONFIG_FEATURE_CLEAN_UP is not set
# CONFIG_FEATURE_PIDFILE is not set
@ -39,7 +40,7 @@ CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
#
# Build Options
#
CONFIG_STATIC=y
# CONFIG_STATIC is not set
# CONFIG_PIE is not set
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set
@ -88,6 +89,8 @@ CONFIG_FEATURE_EDITING_HISTORY=15
CONFIG_FEATURE_TAB_COMPLETION=y
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
# CONFIG_FEATURE_NON_POSIX_CP is not set
CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y
CONFIG_FEATURE_COPYBUF_KB=4
CONFIG_MONOTONIC_SYSCALL=y
@ -117,6 +120,8 @@ CONFIG_MONOTONIC_SYSCALL=y
# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
# CONFIG_GUNZIP is not set
# CONFIG_GZIP is not set
# CONFIG_LZOP is not set
# CONFIG_LZOP_COMPR_HIGH is not set
# CONFIG_RPM2CPIO is not set
# CONFIG_RPM is not set
# CONFIG_TAR is not set
@ -170,6 +175,7 @@ CONFIG_CAT=y
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
# CONFIG_FALSE is not set
# CONFIG_FOLD is not set
# CONFIG_FSYNC is not set
# CONFIG_HEAD is not set
# CONFIG_FEATURE_FANCY_HEAD is not set
# CONFIG_HOSTID is not set
@ -194,7 +200,7 @@ CONFIG_MKDIR=y
# CONFIG_MKFIFO is not set
# CONFIG_MKNOD is not set
CONFIG_MV=y
CONFIG_FEATURE_MV_LONG_OPTIONS=y
# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
# CONFIG_NICE is not set
# CONFIG_NOHUP is not set
# CONFIG_OD is not set
@ -369,6 +375,8 @@ CONFIG_FEATURE_KILL_DELAY=0
# CONFIG_FEATURE_INIT_COREDUMPS is not set
# CONFIG_FEATURE_INITRD is not set
CONFIG_HALT=y
# CONFIG_FEATURE_CALL_TELINIT is not set
CONFIG_TELINIT_PATH=""
# CONFIG_MESG is not set
#
@ -380,12 +388,15 @@ CONFIG_HALT=y
# CONFIG_USE_BB_CRYPT is not set
# CONFIG_USE_BB_CRYPT_SHA is not set
# CONFIG_ADDGROUP is not set
# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
# CONFIG_DELGROUP is not set
# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
# CONFIG_FEATURE_CHECK_NAMES is not set
# CONFIG_ADDUSER is not set
# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
CONFIG_FIRST_SYSTEM_ID=0
CONFIG_LAST_SYSTEM_ID=0
# CONFIG_DELUSER is not set
# CONFIG_GETTY is not set
# CONFIG_FEATURE_UTMP is not set
@ -469,6 +480,7 @@ CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_MKFS_VFAT is not set
# CONFIG_GETOPT is not set
# CONFIG_FEATURE_GETOPT_LONG is not set
# CONFIG_HEXDUMP is not set
# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
# CONFIG_HD is not set
@ -485,7 +497,7 @@ CONFIG_FEATURE_MDEV_RENAME=y
CONFIG_FEATURE_MDEV_EXEC=y
# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
# CONFIG_MKSWAP is not set
# CONFIG_FEATURE_MKSWAP_V0 is not set
# CONFIG_FEATURE_MKSWAP_UUID is not set
# CONFIG_MORE is not set
# CONFIG_FEATURE_USE_TERMIOS is not set
# CONFIG_VOLUMEID is not set
@ -520,6 +532,7 @@ CONFIG_FEATURE_MOUNT_FLAGS=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 is not set
# CONFIG_FEATURE_SWAPON_PRI is not set
@ -563,6 +576,8 @@ CONFIG_FEATURE_CROND_DIR=""
# CONFIG_EJECT is not set
# CONFIG_FEATURE_EJECT_SCSI is not set
# CONFIG_FBSPLASH 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
@ -609,6 +624,7 @@ CONFIG_FEATURE_LESS_MAXLINES=0
# Networking Utilities
#
# 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
@ -644,6 +660,7 @@ CONFIG_FEATURE_LESS_MAXLINES=0
# 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
@ -714,7 +731,7 @@ CONFIG_DHCPD_LEASES_FILE=""
# CONFIG_APP_UDHCPC is not set
# CONFIG_FEATURE_UDHCPC_ARPING is not set
# CONFIG_FEATURE_UDHCP_PORT is not set
# CONFIG_UDHCP_DEBUG is not set
CONFIG_UDHCP_DEBUG=0
# CONFIG_FEATURE_UDHCP_RFC3397 is not set
CONFIG_UDHCPC_DEFAULT_SCRIPT=""
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0
@ -765,6 +782,7 @@ CONFIG_FEATURE_MIME_CHARSET=""
# CONFIG_PS is not set
# CONFIG_FEATURE_PS_WIDE is not set
# CONFIG_FEATURE_PS_TIME is not set
# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
# CONFIG_RENICE is not set
# CONFIG_BB_SYSCTL is not set
@ -816,10 +834,6 @@ CONFIG_FEATURE_SH_IS_ASH=y
# CONFIG_FEATURE_SH_IS_MSH is not set
# CONFIG_FEATURE_SH_IS_NONE is not set
CONFIG_ASH=y
#
# Ash Shell Options
#
CONFIG_ASH_BASH_COMPAT=y
# CONFIG_ASH_JOB_CONTROL is not set
# CONFIG_ASH_READ_NCHARS is not set
@ -835,6 +849,7 @@ CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
# CONFIG_ASH_RANDOM_SUPPORT is not set
# CONFIG_ASH_EXPAND_PRMT is not set
# CONFIG_HUSH is not set
# CONFIG_HUSH_BASH_COMPAT is not set
# CONFIG_HUSH_HELP is not set
# CONFIG_HUSH_INTERACTIVE is not set
# CONFIG_HUSH_JOB is not set
@ -843,12 +858,10 @@ CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
# 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_EXPORT_N is not set
# CONFIG_LASH is not set
# CONFIG_MSH is not set
#
# Bourne Shell Options
#
CONFIG_SH_MATH_SUPPORT=y
# CONFIG_SH_MATH_SUPPORT_64 is not set
CONFIG_FEATURE_SH_EXTRA_QUIET=y

View File

@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.14.2
# Thu Jul 23 23:32:09 2009
# Busybox version: 1.15.0.svn
# Sun Aug 2 14:04:11 2009
#
CONFIG_HAVE_DOT_CONFIG=y
@ -14,7 +14,6 @@ CONFIG_HAVE_DOT_CONFIG=y
#
# CONFIG_DESKTOP is not set
# CONFIG_EXTRA_COMPAT is not set
# CONFIG_FEATURE_ASSUME_UNICODE is not set
# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
@ -23,7 +22,9 @@ CONFIG_FEATURE_VERBOSE_USAGE=y
CONFIG_FEATURE_COMPRESS_USAGE=y
# CONFIG_FEATURE_INSTALLER is not set
# CONFIG_LOCALE_SUPPORT is not set
CONFIG_GETOPT_LONG=y
# CONFIG_FEATURE_ASSUME_UNICODE is not set
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
CONFIG_LONG_OPTS=y
# CONFIG_FEATURE_DEVPTS is not set
# CONFIG_FEATURE_CLEAN_UP is not set
CONFIG_FEATURE_PIDFILE=y
@ -88,6 +89,8 @@ CONFIG_FEATURE_EDITING_HISTORY=15
CONFIG_FEATURE_TAB_COMPLETION=y
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
CONFIG_FEATURE_NON_POSIX_CP=y
CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y
CONFIG_FEATURE_COPYBUF_KB=4
CONFIG_MONOTONIC_SYSCALL=y
@ -117,6 +120,8 @@ CONFIG_BZIP2=y
# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
CONFIG_GUNZIP=y
CONFIG_GZIP=y
# CONFIG_LZOP is not set
# CONFIG_LZOP_COMPR_HIGH is not set
# CONFIG_RPM2CPIO is not set
# CONFIG_RPM is not set
CONFIG_TAR=y
@ -170,6 +175,7 @@ CONFIG_FEATURE_ENV_LONG_OPTIONS=y
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
# CONFIG_FALSE is not set
# CONFIG_FOLD is not set
# CONFIG_FSYNC is not set
CONFIG_HEAD=y
CONFIG_FEATURE_FANCY_HEAD=y
# CONFIG_HOSTID is not set
@ -377,6 +383,8 @@ CONFIG_FEATURE_KILL_DELAY=0
# CONFIG_FEATURE_INIT_COREDUMPS is not set
# CONFIG_FEATURE_INITRD is not set
CONFIG_HALT=y
# CONFIG_FEATURE_CALL_TELINIT is not set
CONFIG_TELINIT_PATH=""
# CONFIG_MESG is not set
#
@ -388,12 +396,15 @@ CONFIG_FEATURE_SHADOWPASSWDS=y
# CONFIG_USE_BB_CRYPT is not set
# CONFIG_USE_BB_CRYPT_SHA is not set
CONFIG_ADDGROUP=y
# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
CONFIG_FEATURE_ADDUSER_TO_GROUP=y
CONFIG_DELGROUP=y
CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
# CONFIG_FEATURE_CHECK_NAMES is not set
CONFIG_ADDUSER=y
CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
CONFIG_FIRST_SYSTEM_ID=100
CONFIG_LAST_SYSTEM_ID=999
CONFIG_DELUSER=y
CONFIG_GETTY=y
CONFIG_FEATURE_UTMP=y
@ -477,6 +488,7 @@ CONFIG_FINDFS=y
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_MKFS_VFAT is not set
CONFIG_GETOPT=y
CONFIG_FEATURE_GETOPT_LONG=y
# CONFIG_HEXDUMP is not set
# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
# CONFIG_HD is not set
@ -493,7 +505,7 @@ CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
# CONFIG_FEATURE_MDEV_EXEC is not set
# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
# CONFIG_MKSWAP is not set
# CONFIG_FEATURE_MKSWAP_V0 is not set
# CONFIG_FEATURE_MKSWAP_UUID is not set
CONFIG_MORE=y
CONFIG_FEATURE_USE_TERMIOS=y
CONFIG_VOLUMEID=y
@ -528,6 +540,7 @@ CONFIG_FEATURE_MOUNT_FLAGS=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 is not set
# CONFIG_FEATURE_SWAPON_PRI is not set
@ -571,6 +584,8 @@ CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
CONFIG_EJECT=y
CONFIG_FEATURE_EJECT_SCSI=y
CONFIG_FBSPLASH=y
# 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
@ -616,8 +631,9 @@ CONFIG_MOUNTPOINT=y
#
# Networking Utilities
#
CONFIG_FEATURE_IPV6=y
CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
# CONFIG_FEATURE_IPV6 is not set
# CONFIG_FEATURE_UNIX_LOCAL is not set
# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
# CONFIG_ARP is not set
# CONFIG_ARPING is not set
@ -652,6 +668,7 @@ CONFIG_FEATURE_IFCONFIG_STATUS=y
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
@ -694,7 +711,7 @@ CONFIG_NETSTAT=y
# CONFIG_FEATURE_NETSTAT_PRG is not set
# CONFIG_NSLOOKUP is not set
CONFIG_PING=y
CONFIG_PING6=y
# CONFIG_PING6 is not set
CONFIG_FEATURE_FANCY_PING=y
# CONFIG_PSCAN is not set
CONFIG_ROUTE=y
@ -722,7 +739,7 @@ CONFIG_DHCPD_LEASES_FILE=""
CONFIG_APP_UDHCPC=y
CONFIG_FEATURE_UDHCPC_ARPING=y
# CONFIG_FEATURE_UDHCP_PORT is not set
# CONFIG_UDHCP_DEBUG is not set
CONFIG_UDHCP_DEBUG=0
CONFIG_FEATURE_UDHCP_RFC3397=y
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
@ -773,6 +790,7 @@ CONFIG_PIDOF=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 is not set
# CONFIG_BB_SYSCTL is not set
@ -824,10 +842,6 @@ CONFIG_FEATURE_SH_IS_ASH=y
# CONFIG_FEATURE_SH_IS_MSH is not set
# CONFIG_FEATURE_SH_IS_NONE is not set
CONFIG_ASH=y
#
# Ash Shell Options
#
CONFIG_ASH_BASH_COMPAT=y
# CONFIG_ASH_JOB_CONTROL is not set
CONFIG_ASH_READ_NCHARS=y
@ -843,6 +857,7 @@ CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
CONFIG_ASH_RANDOM_SUPPORT=y
CONFIG_ASH_EXPAND_PRMT=y
# CONFIG_HUSH is not set
# CONFIG_HUSH_BASH_COMPAT is not set
# CONFIG_HUSH_HELP is not set
# CONFIG_HUSH_INTERACTIVE is not set
# CONFIG_HUSH_JOB is not set
@ -851,13 +866,10 @@ CONFIG_ASH_EXPAND_PRMT=y
# 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_EXPORT_N is not set
# CONFIG_LASH is not set
CONFIG_MSH=y
#
# Bourne Shell Options
#
CONFIG_SH_MATH_SUPPORT=y
# CONFIG_SH_MATH_SUPPORT_64 is not set
CONFIG_FEATURE_SH_EXTRA_QUIET=y

View File

@ -1,139 +0,0 @@
diff -urpN busybox-1.14.2/coreutils/df.c busybox-1.14.2-df/coreutils/df.c
--- busybox-1.14.2/coreutils/df.c 2009-07-05 22:59:28.000000000 +0200
+++ busybox-1.14.2-df/coreutils/df.c 2009-07-05 23:00:09.000000000 +0200
@@ -44,7 +44,6 @@ int df_main(int argc, char **argv)
FILE *mount_table;
struct mntent *mount_entry;
struct statfs s;
- static const char ignored_mounts[] ALIGN1 = "rootfs\0";
enum {
OPT_KILO = (1 << 0),
@@ -120,7 +119,7 @@ int df_main(int argc, char **argv)
mount_point = *argv++;
if (!mount_point)
break;
- mount_entry = find_mount_point(mount_point, bb_path_mtab_file);
+ mount_entry = find_mount_point(mount_point);
if (!mount_entry) {
bb_error_msg("%s: can't find mount point", mount_point);
set_error:
@@ -154,8 +153,8 @@ int df_main(int argc, char **argv)
) / (blocks_used + s.f_bavail);
}
- /* GNU coreutils 6.10 skip certain mounts, try to be compatible. */
- if (index_in_strings(device, ignored_mounts) != -1)
+ /* GNU coreutils 6.10 skips certain mounts, try to be compatible. */
+ if (strcmp(device, "rootfs") == 0)
continue;
#ifdef WHY_WE_DO_IT_FOR_DEV_ROOT_ONLY
diff -urpN busybox-1.14.2/include/libbb.h busybox-1.14.2-df/include/libbb.h
--- busybox-1.14.2/include/libbb.h 2009-07-05 22:59:31.000000000 +0200
+++ busybox-1.14.2-df/include/libbb.h 2009-07-05 23:00:09.000000000 +0200
@@ -1025,7 +1025,7 @@ extern void run_applet_no_and_exit(int a
#ifdef HAVE_MNTENT_H
extern int match_fstype(const struct mntent *mt, const char *fstypes) FAST_FUNC;
-extern struct mntent *find_mount_point(const char *name, const char *table) FAST_FUNC;
+extern struct mntent *find_mount_point(const char *name) FAST_FUNC;
#endif
extern void erase_mtab(const char * name) FAST_FUNC;
extern unsigned int tty_baud_to_value(speed_t speed) FAST_FUNC;
diff -urpN busybox-1.14.2/libbb/find_mount_point.c busybox-1.14.2-df/libbb/find_mount_point.c
--- busybox-1.14.2/libbb/find_mount_point.c 2009-07-05 22:59:24.000000000 +0200
+++ busybox-1.14.2-df/libbb/find_mount_point.c 2009-07-05 23:00:09.000000000 +0200
@@ -17,7 +17,7 @@
* Given any other file (or directory), find the mount table entry for its
* filesystem.
*/
-struct mntent* FAST_FUNC find_mount_point(const char *name, const char *table)
+struct mntent* FAST_FUNC find_mount_point(const char *name)
{
struct stat s;
dev_t mountDevice;
@@ -25,27 +25,35 @@ struct mntent* FAST_FUNC find_mount_poin
struct mntent *mountEntry;
if (stat(name, &s) != 0)
- return 0;
+ return NULL;
- if ((s.st_mode & S_IFMT) == S_IFBLK)
+ if (S_ISBLK(s.st_mode))
mountDevice = s.st_rdev;
else
mountDevice = s.st_dev;
- mountTable = setmntent(table ? table : bb_path_mtab_file, "r");
+ mountTable = setmntent(bb_path_mtab_file, "r");
if (!mountTable)
return 0;
- while ((mountEntry = getmntent(mountTable)) != 0) {
+ while ((mountEntry = getmntent(mountTable)) != NULL) {
+ /* rootfs mount in Linux 2.6 exists always,
+ * and it makes sense to always ignore it.
+ * Otherwise people can't reference their "real" root! */
+ if (strcmp(mountEntry->mnt_fsname, "rootfs") == 0)
+ continue;
+
if (strcmp(name, mountEntry->mnt_dir) == 0
|| strcmp(name, mountEntry->mnt_fsname) == 0
) { /* String match. */
break;
}
- if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice) /* Match the device. */
+ /* Match the device. */
+ if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice)
break;
- if (stat(mountEntry->mnt_dir, &s) == 0 && s.st_dev == mountDevice) /* Match the directory's mount point. */
+ /* Match the directory's mount point. */
+ if (stat(mountEntry->mnt_dir, &s) == 0 && s.st_dev == mountDevice)
break;
}
endmntent(mountTable);
diff -urpN busybox-1.14.2/util-linux/mkfs_minix.c busybox-1.14.2-df/util-linux/mkfs_minix.c
--- busybox-1.14.2/util-linux/mkfs_minix.c 2009-07-05 22:59:30.000000000 +0200
+++ busybox-1.14.2-df/util-linux/mkfs_minix.c 2009-07-05 23:00:09.000000000 +0200
@@ -624,7 +624,6 @@ static void setup_tables(void)
int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mkfs_minix_main(int argc UNUSED_PARAM, char **argv)
{
- struct mntent *mp;
unsigned opt;
char *tmp;
struct stat statbuf;
@@ -683,11 +682,8 @@ int mkfs_minix_main(int argc UNUSED_PARA
G.total_blocks = 65535;
/* Check if it is mounted */
- mp = find_mount_point(G.device_name, NULL);
- if (mp && strcmp(G.device_name, mp->mnt_fsname) == 0)
- bb_error_msg_and_die("%s is mounted on %s; "
- "refusing to make a filesystem",
- G.device_name, mp->mnt_dir);
+ if (find_mount_point(G.device_name))
+ bb_error_msg_and_die("can't format mounted filesystem");
xmove_fd(xopen(G.device_name, O_RDWR), dev_fd);
if (fstat(dev_fd, &statbuf) < 0)
diff -urpN busybox-1.14.2/util-linux/mkfs_vfat.c busybox-1.14.2-df/util-linux/mkfs_vfat.c
--- busybox-1.14.2/util-linux/mkfs_vfat.c 2009-07-05 22:59:30.000000000 +0200
+++ busybox-1.14.2-df/util-linux/mkfs_vfat.c 2009-07-05 23:00:35.000000000 +0200
@@ -273,10 +273,10 @@ int mkfs_vfat_main(int argc UNUSED_PARAM
device_num == 0x0d00 || // xd
device_num == 0x1600 ) // hdc, hdd
)
- bb_error_msg_and_die("Will not try to make filesystem on full-disk device (use -I if wanted)");
+ bb_error_msg_and_die("will not try to make filesystem on full-disk device (use -I if wanted)");
// can't work on mounted filesystems
- if (find_mount_point(device_name, NULL))
- bb_error_msg_and_die("Can't format mounted filesystem");
+ if (find_mount_point(device_name))
+ bb_error_msg_and_die("can't format mounted filesystem");
#endif
// get true sector size
// (parameter must be int*, not long* or size_t*)

View File

@ -1,152 +0,0 @@
diff -urpN busybox-1.14.2/coreutils/ls.c busybox-1.14.2-ls/coreutils/ls.c
--- busybox-1.14.2/coreutils/ls.c 2009-07-05 22:59:28.000000000 +0200
+++ busybox-1.14.2-ls/coreutils/ls.c 2009-07-05 22:59:14.000000000 +0200
@@ -144,8 +144,7 @@ static const char ls_options[] ALIGN1 =
USE_FEATURE_LS_FOLLOWLINKS("L") /* 1, 24 */
USE_FEATURE_LS_RECURSIVE("R") /* 1, 25 */
USE_FEATURE_HUMAN_READABLE("h") /* 1, 26 */
- USE_SELINUX("K") /* 1, 27 */
- USE_SELINUX("Z") /* 1, 28 */
+ USE_SELINUX("KZ") /* 2, 28 */
USE_FEATURE_AUTOWIDTH("T:w:") /* 2, 30 */
;
enum {
@@ -162,6 +161,16 @@ enum {
OPT_Q = (1 << 10),
//OPT_A = (1 << 11),
//OPT_k = (1 << 12),
+ OPTBIT_color = 13
+ + 4 * ENABLE_FEATURE_LS_TIMESTAMPS
+ + 4 * ENABLE_FEATURE_LS_SORTFILES
+ + 2 * ENABLE_FEATURE_LS_FILETYPES
+ + 1 * ENABLE_FEATURE_LS_FOLLOWLINKS
+ + 1 * ENABLE_FEATURE_LS_RECURSIVE
+ + 1 * ENABLE_FEATURE_HUMAN_READABLE
+ + 2 * ENABLE_SELINUX
+ + 2 * ENABLE_FEATURE_AUTOWIDTH,
+ OPT_color = 1 << OPTBIT_color,
};
enum {
@@ -889,16 +898,6 @@ static int list_single(const struct dnod
}
-/* colored LS support by JaWi, janwillem.janssen@lxtreme.nl */
-#if ENABLE_FEATURE_LS_COLOR
-/* long option entry used only for --color, which has no short option
- * equivalent */
-static const char ls_color_opt[] ALIGN1 =
- "color\0" Optional_argument "\xff" /* no short equivalent */
- ;
-#endif
-
-
int ls_main(int argc UNUSED_PARAM, char **argv)
{
struct dnode **dnd;
@@ -911,8 +910,25 @@ int ls_main(int argc UNUSED_PARAM, char
int dnfiles;
int dndirs;
int i;
+#if ENABLE_FEATURE_LS_COLOR
+ /* colored LS support by JaWi, janwillem.janssen@lxtreme.nl */
+ /* coreutils 6.10:
+ * # ls --color=BOGUS
+ * ls: invalid argument 'BOGUS' for '--color'
+ * Valid arguments are:
+ * 'always', 'yes', 'force'
+ * 'never', 'no', 'none'
+ * 'auto', 'tty', 'if-tty'
+ * (and substrings: "--color=alwa" work too)
+ */
+ static const char ls_longopts[] ALIGN1 =
+ "color\0" Optional_argument "\xff"; /* no short equivalent */
+ static const char color_str[] ALIGN1 =
+ "always\0""yes\0""force\0"
+ "auto\0""tty\0""if-tty\0";
/* need to initialize since --color has _an optional_ argument */
- USE_FEATURE_LS_COLOR(const char *color_opt = "always";)
+ const char *color_opt = color_str; /* "always" */
+#endif
INIT_G();
@@ -927,7 +943,7 @@ int ls_main(int argc UNUSED_PARAM, char
#endif
/* process options */
- USE_FEATURE_LS_COLOR(applet_long_options = ls_color_opt;)
+ USE_FEATURE_LS_COLOR(applet_long_options = ls_longopts;)
#if ENABLE_FEATURE_AUTOWIDTH
opt_complementary = "T+:w+"; /* -T N, -w N */
opt = getopt32(argv, ls_options, &tabstops, &terminal_width
@@ -966,13 +982,20 @@ int ls_main(int argc UNUSED_PARAM, char
if (!p || (p[0] && strcmp(p, "none") != 0))
show_color = 1;
}
- if (opt & (1 << i)) { /* next flag after short options */
- if (strcmp("always", color_opt) == 0)
- show_color = 1;
- else if (strcmp("never", color_opt) == 0)
+ if (opt & OPT_color) {
+ if (color_opt[0] == 'n')
show_color = 0;
- else if (strcmp("auto", color_opt) == 0 && isatty(STDOUT_FILENO))
- show_color = 1;
+ else switch (index_in_substrings(color_str, color_opt)) {
+ case 3:
+ case 4:
+ case 5:
+ if (isatty(STDOUT_FILENO)) {
+ case 0:
+ case 1:
+ case 2:
+ show_color = 1;
+ }
+ }
}
#endif
diff -urpN busybox-1.14.2/testsuite/ls/ls-1-works busybox-1.14.2-ls/testsuite/ls/ls-1-works
--- busybox-1.14.2/testsuite/ls/ls-1-works 2009-07-05 22:59:21.000000000 +0200
+++ busybox-1.14.2-ls/testsuite/ls/ls-1-works 2009-07-05 22:59:09.000000000 +0200
@@ -1,4 +1,4 @@
[ -n "$d" ] || d=..
-ls -1 "$d" > logfile.gnu
-busybox ls -1 "$d" > logfile.bb
-cmp logfile.gnu logfile.bb
+LC_ALL=C ls -1 "$d" > logfile.gnu
+LC_ALL=C busybox ls -1 "$d" > logfile.bb
+diff -ubw logfile.gnu logfile.bb
diff -urpN busybox-1.14.2/testsuite/ls/ls-h-works busybox-1.14.2-ls/testsuite/ls/ls-h-works
--- busybox-1.14.2/testsuite/ls/ls-h-works 2009-07-05 22:59:21.000000000 +0200
+++ busybox-1.14.2-ls/testsuite/ls/ls-h-works 2009-07-05 22:59:09.000000000 +0200
@@ -1,4 +1,4 @@
[ -n "$d" ] || d=..
-ls -h "$d" > logfile.gnu
-busybox ls -h "$d" > logfile.bb
-cmp logfile.gnu logfile.bb
+LC_ALL=C ls -h "$d" > logfile.gnu
+LC_ALL=C busybox ls -h "$d" > logfile.bb
+diff -ubw logfile.gnu logfile.bb
diff -urpN busybox-1.14.2/testsuite/ls/ls-l-works busybox-1.14.2-ls/testsuite/ls/ls-l-works
--- busybox-1.14.2/testsuite/ls/ls-l-works 2009-07-05 22:59:21.000000000 +0200
+++ busybox-1.14.2-ls/testsuite/ls/ls-l-works 2009-07-05 22:59:09.000000000 +0200
@@ -1,4 +1,4 @@
[ -n "$d" ] || d=..
LC_ALL=C ls -l "$d" > logfile.gnu
-busybox ls -l "$d" > logfile.bb
-diff -w logfile.gnu logfile.bb
+LC_ALL=C busybox ls -l "$d" > logfile.bb
+diff -ubw logfile.gnu logfile.bb
diff -urpN busybox-1.14.2/testsuite/ls/ls-s-works busybox-1.14.2-ls/testsuite/ls/ls-s-works
--- busybox-1.14.2/testsuite/ls/ls-s-works 2009-07-05 22:59:21.000000000 +0200
+++ busybox-1.14.2-ls/testsuite/ls/ls-s-works 2009-07-05 22:59:09.000000000 +0200
@@ -1,4 +1,4 @@
[ -n "$d" ] || d=..
LC_ALL=C ls -1s "$d" > logfile.gnu
-busybox ls -1s "$d" > logfile.bb
-cmp logfile.gnu logfile.bb
+LC_ALL=C busybox ls -1s "$d" > logfile.bb
+diff -ubw logfile.gnu logfile.bb

View File

@ -1,64 +0,0 @@
diff -urpN busybox-1.14.2/coreutils/test.c busybox-1.14.2-test/coreutils/test.c
--- busybox-1.14.2/coreutils/test.c 2009-07-05 22:59:28.000000000 +0200
+++ busybox-1.14.2-test/coreutils/test.c 2009-07-17 01:46:28.000000000 +0200
@@ -571,7 +571,14 @@ static number_t nexpr(enum token n)
nest_msg(">nexpr(%s)\n", TOKSTR[n]);
if (n == UNOT) {
- res = !nexpr(check_operator(*++args));
+ n = check_operator(*++args);
+ if (n == EOI) {
+ /* special case: [ ! ], [ a -a ! ] are valid */
+ /* IOW, "! ARG" may miss ARG */
+ unnest_msg("<nexpr:1 (!EOI)\n");
+ return 1;
+ }
+ res = !nexpr(n);
unnest_msg("<nexpr:%lld\n", res);
return res;
}
@@ -742,7 +749,7 @@ int test_main(int argc, char **argv)
check_operator(argv[1]);
if (last_operator->op_type == BINOP) {
/* "test [!] arg1 <binary_op> arg2" */
- args = &argv[0];
+ args = argv;
res = (binop() == 0);
goto ret;
}
@@ -755,7 +762,7 @@ int test_main(int argc, char **argv)
argv--;
}
#endif
- args = &argv[0];
+ args = argv;
res = !oexpr(check_operator(*args));
if (*args != NULL && *++args != NULL) {
diff -urpN busybox-1.14.2/testsuite/test.tests busybox-1.14.2-test/testsuite/test.tests
--- busybox-1.14.2/testsuite/test.tests 2009-07-05 22:59:22.000000000 +0200
+++ busybox-1.14.2-test/testsuite/test.tests 2009-07-17 01:46:28.000000000 +0200
@@ -21,6 +21,11 @@ testing "test '': should be false (1)" \
"1\n" \
"" ""
+testing "test !: should be true (0)" \
+ "busybox test !; echo \$?" \
+ "0\n" \
+ "" ""
+
testing "test a: should be true (0)" \
"busybox test a; echo \$?" \
"0\n" \
@@ -51,6 +56,11 @@ testing "test -lt = -gt: should be false
"1\n" \
"" ""
+testing "test a -a !: should be true (0)" \
+ "busybox test a -a !; echo \$?" \
+ "0\n" \
+ "" ""
+
testing "test -f = a -o b: should be true (0)" \
"busybox test -f = a -o b; echo \$?" \
"0\n" \

View File

@ -1,12 +0,0 @@
diff -urpN busybox-1.14.2/networking/udhcp/files.c busybox-1.14.2-udhcpd/networking/udhcp/files.c
--- busybox-1.14.2/networking/udhcp/files.c 2009-06-22 00:40:29.000000000 +0200
+++ busybox-1.14.2-udhcpd/networking/udhcp/files.c 2009-07-07 14:58:39.000000000 +0200
@@ -420,7 +420,7 @@ void FAST_FUNC read_leases(const char *f
continue;
/* NB: add_lease takes "relative time", IOW,
* lease duration, not lease deadline. */
- if (!(add_lease(lease.chaddr, lease.yiaddr, expires, lease.hostname))) {
+ if (!(add_lease(lease.chaddr, lease.yiaddr, expires, NULL /* was lease.hostname. bug in add_lease, disabled */ ))) {
bb_error_msg("too many leases while loading %s", file);
break;
}

View File

@ -1 +1 @@
http://busybox.net/downloads/busybox-1.14.2.tar.bz2
http://sources.openelec.tv/svn/busybox-20090802.tar.bz2