1 diff -Nur busybox-1.1.1/findutils/find.c busybox-1.1.1-owrt/findutils/find.c
2 --- busybox-1.1.1/findutils/find.c 2006-03-22 22:16:25.000000000 +0100
3 +++ busybox-1.1.1-owrt/findutils/find.c 2006-04-01 19:23:30.000000000 +0200
6 static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
8 +#ifdef CONFIG_FEATURE_FIND_XDEV
9 + if (S_ISDIR(statbuf->st_mode) && xdev_count) {
11 + for (i=0; i<xdev_count; i++) {
12 + if (xdev_dev[i] != statbuf->st_dev)
17 if (pattern != NULL) {
18 const char *tmp = strrchr(fileName, '/');
24 -#ifdef CONFIG_FEATURE_FIND_XDEV
27 - for (i=0; i<xdev_count; i++) {
28 - if (xdev_dev[i] == statbuf-> st_dev)
31 - if (i == xdev_count) {
32 - if(S_ISDIR(statbuf->st_mode))
39 #ifdef CONFIG_FEATURE_FIND_NEWER
40 if (newer_mtime != 0) {
41 time_t file_age = newer_mtime - statbuf->st_mtime;
42 diff -Nur busybox-1.1.1/libbb/Makefile.in busybox-1.1.1-owrt/libbb/Makefile.in
43 --- busybox-1.1.1/libbb/Makefile.in 2006-03-22 22:16:22.000000000 +0100
44 +++ busybox-1.1.1-owrt/libbb/Makefile.in 2006-04-01 19:23:30.000000000 +0200
46 # conditionally compiled objects:
47 LIBBB-$(CONFIG_FEATURE_SHADOWPASSWDS)+=pwd2spwd.c
48 LIBBB-$(CONFIG_FEATURE_MOUNT_LOOP)+= loop.c
49 +LIBBB-$(CONFIG_LOSETUP)+= loop.c
50 LIBBB-$(CONFIG_FEATURE_MTAB_SUPPORT)+= mtab.c
51 LIBBB-$(CONFIG_PASSWD)+= pw_encrypt.c
52 LIBBB-$(CONFIG_SULOGIN)+= pw_encrypt.c
53 diff -Nur busybox-1.1.1/modutils/insmod.c busybox-1.1.1-owrt/modutils/insmod.c
54 --- busybox-1.1.1/modutils/insmod.c 2006-03-22 22:16:20.000000000 +0100
55 +++ busybox-1.1.1-owrt/modutils/insmod.c 2006-04-01 19:23:30.000000000 +0200
61 -# define ELFDATAM ELFDATA2LSB
63 -# define ELFDATAM ELFDATA2MSB
67 # if ELFCLASSM == ELFCLASS32
68 # define ElfW(x) Elf32_ ## x
72 if (f->header.e_ident[EI_CLASS] != ELFCLASSM
73 - || f->header.e_ident[EI_DATA] != ELFDATAM
74 + || f->header.e_ident[EI_DATA] != (BB_BIG_ENDIAN
75 + ? ELFDATA2MSB : ELFDATA2LSB)
76 || f->header.e_ident[EI_VERSION] != EV_CURRENT
77 || !MATCH_MACHINE(f->header.e_machine)) {
78 bb_error_msg("ELF file not for this architecture");
79 diff -Nur busybox-1.1.1/util-linux/Makefile.in busybox-1.1.1-owrt/util-linux/Makefile.in
80 --- busybox-1.1.1/util-linux/Makefile.in 2006-03-22 22:16:26.000000000 +0100
81 +++ busybox-1.1.1-owrt/util-linux/Makefile.in 2006-04-01 19:23:30.000000000 +0200
83 UTILLINUX-$(CONFIG_SWITCH_ROOT) +=switch_root.o
84 UTILLINUX-$(CONFIG_UMOUNT) +=umount.o
86 +UTILLINUX-y:=$(sort $(UTILLINUX-y))
88 ifneq ($(strip $(UTILLINUX-y)),)
89 libraries-y+=$(UTILLINUX_DIR)$(UTILLINUX_AR)
91 diff -Nur busybox-1.1.1/util-linux/mount.c busybox-1.1.1-owrt/util-linux/mount.c
92 --- busybox-1.1.1/util-linux/mount.c 2006-03-22 22:16:26.000000000 +0100
93 +++ busybox-1.1.1-owrt/util-linux/mount.c 2006-04-01 19:23:30.000000000 +0200
99 +void delete_block_backed_filesystems(void);
102 #if ENABLE_FEATURE_MTAB_SUPPORT
105 // Perform actual mount of specific filesystem at specific location.
107 -static int mount_it_now(struct mntent *mp, int vfsflags)
108 +static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
111 - char *filteropts = 0;
113 - parse_mount_options(mp->mnt_opts, &filteropts);
115 if (fakeIt) { return 0; }
118 vfsflags |= MS_RDONLY;
123 // Abort entirely if permission denied.
125 if (rc && errno == EPERM)
126 @@ -266,11 +263,11 @@
127 static int singlemount(struct mntent *mp)
129 int rc = 1, vfsflags;
130 - char *loopFile = 0;
131 + char *loopFile = 0, *filteropts = 0;
135 - vfsflags = parse_mount_options(mp->mnt_opts, 0);
136 + vfsflags = parse_mount_options(mp->mnt_opts, &filteropts);
138 // Treat fstype "auto" as unspecified.
140 @@ -282,16 +279,16 @@
141 (!mp->mnt_type || !strcmp(mp->mnt_type,"nfs")) &&
142 strchr(mp->mnt_fsname, ':') != NULL)
145 - parse_mount_options(mp->mnt_opts, &options);
146 - if (nfsmount(mp->mnt_fsname, mp->mnt_dir, &vfsflags, &options, 1)) {
147 + if (nfsmount(mp->mnt_fsname, mp->mnt_dir, &vfsflags, &filteropts, 1)) {
148 bb_perror_msg("nfsmount failed");
151 + // Strangely enough, nfsmount() doesn't actually mount() anything.
152 + rc = mount_it_now(mp, vfsflags, filteropts);
153 + if (ENABLE_FEATURE_CLEAN_UP) free(filteropts);
158 - // Strangely enough, nfsmount() doesn't actually mount() anything.
160 - else return mount_it_now(mp, vfsflags);
163 // Look at the file. (Not found isn't a failure for remount.)
165 * to the actual mount. */
167 if (mp->mnt_type || (vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE)))
168 - rc = mount_it_now(mp, vfsflags);
169 + rc = mount_it_now(mp, vfsflags, filteropts);
171 // Loop through filesystem types until mount succeeds or we run out
173 @@ -336,25 +333,26 @@
176 fslist = get_block_backed_filesystems();
177 -#if ENABLE_FEATURE_CLEAN_UP
178 if (ENABLE_FEATURE_CLEAN_UP && fslist)
179 atexit(delete_block_backed_filesystems);
183 for (fl = fslist; fl; fl = fl->link) {
184 mp->mnt_type = fl->data;
186 - if (!(rc = mount_it_now(mp,vfsflags))) break;
187 + if (!(rc = mount_it_now(mp,vfsflags, filteropts))) break;
193 - // Mount failed. Clean up
194 + if (ENABLE_FEATURE_CLEAN_UP) free(filteropts);
196 + // If mount failed, clean up loop file (if any).
198 if (rc && loopFile) {
199 del_loop(mp->mnt_fsname);
200 - if(ENABLE_FEATURE_CLEAN_UP) {
201 + if (ENABLE_FEATURE_CLEAN_UP) {
203 free(mp->mnt_fsname);
206 if (ENABLE_FEATURE_CLEAN_UP) {