source:
clfs-embedded/patches/busybox-1.13.2-branch_update-1.patch@
ea78b4e
Last change on this file since ea78b4e was 0e9e889, checked in by , 16 years ago | |
---|---|
|
|
File size: 5.9 KB |
-
archival/tar.c
Submitted By: Jim Gifford (jim at cross-lfs dot org) Date: 01-25-2009 Initial Package Version: 1.13.2 Origin: Upstream Upstream Status: Applied Description: This is a branch update for busybox-1.13.2, and should be rechecked periodically. diff -Naur busybox-1.13.2.orig/archival/tar.c busybox-1.13.2/archival/tar.c
old new 591 591 struct TarBallInfo tbInfo; 592 592 593 593 tbInfo.hlInfoHead = NULL; 594 595 fchmod(tar_fd, 0644);596 594 tbInfo.tarFd = tar_fd; 597 595 tbInfo.verboseFlag = verboseFlag; 598 596 -
modutils/depmod.c
diff -Naur busybox-1.13.2.orig/modutils/depmod.c busybox-1.13.2/modutils/depmod.c
old new 33 33 enum { 34 34 ARG_a = (1<<0), /* All modules, ignore mods in argv */ 35 35 ARG_A = (1<<1), /* Only emit .ko that are newer than modules.dep file */ 36 ARG_b = (1<<2), /* not /lib/modules/$(uname -r)/ but this base-dir*/36 ARG_b = (1<<2), /* base directory when modules are in staging area */ 37 37 ARG_e = (1<<3), /* with -F, print unresolved symbols */ 38 38 ARG_F = (1<<4), /* System.map that contains the symbols */ 39 39 ARG_n = (1<<5) /* dry-run, print to stdout only */ … … 57 57 *first = info; 58 58 59 59 info->dnext = info->dprev = info; 60 info->name = x strdup(fname);60 info->name = xasprintf("/%s", fname); 61 61 info->modname = filename2modname(fname, NULL); 62 62 for (ptr = image; ptr < image + len - 10; ptr++) { 63 63 if (strncmp(ptr, "depends=", 8) == 0) { … … 123 123 } 124 124 } 125 125 126 static void xfreopen_write(const char *file, FILE *f) 127 { 128 if (freopen(file, "w", f) == NULL) 129 bb_perror_msg_and_die("can't open '%s'", file); 130 } 131 126 132 int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 127 133 int depmod_main(int argc UNUSED_PARAM, char **argv) 128 134 { 129 135 module_info *modules = NULL, *m, *dep; 130 char *moddir_base = (char *)CONFIG_DEFAULT_MODULES_DIR; 136 const char *moddir_base = "/"; 137 char *moddir, *version; 138 struct utsname uts; 131 139 int tmp; 132 140 133 141 getopt32(argv, "aAb:eF:n", &moddir_base, NULL); 134 142 argv += optind; 135 143 136 144 /* goto modules location */ 145 xchdir(moddir_base); 137 146 138 147 /* If a version is provided, then that kernel version's module directory 139 148 * is used, rather than the current kernel version (as returned by 140 149 * "uname -r"). */ 141 xchdir(moddir_base); 142 if (*argv && (sscanf(*argv, "%d.%d.%d", &tmp, &tmp, &tmp) == 3)) { 143 xchdir(*argv++); 150 if (*argv && sscanf(*argv, "%d.%d.%d", &tmp, &tmp, &tmp) == 3) { 151 version = *argv++; 144 152 } else { 145 struct utsname uts;146 153 uname(&uts); 147 xchdir(uts.release);154 version = uts.release; 148 155 } 149 /* If no modules are given on the command-line, -a is on per default. */ 150 option_mask32 |= *argv == NULL; 156 moddir = concat_path_file(&CONFIG_DEFAULT_MODULES_DIR[1], version); 151 157 152 158 /* Scan modules */ 153 moddir_base = xrealloc_getcwd_or_warn(NULL); 154 do { 155 recursive_action((option_mask32 & ARG_a) ? moddir_base : *argv, 156 ACTION_RECURSE, parse_module, NULL, &modules, 0); 157 } while (!(option_mask32 & ARG_a) && *(++argv)); 159 if (*argv) { 160 char *modfile; 161 struct stat sb; 162 do { 163 modfile = concat_path_file(moddir, *argv); 164 xstat(modfile, &sb); 165 parse_module(modfile, &sb, &modules, 0); 166 free(modfile); 167 } while (*(++argv)); 168 } else { 169 recursive_action(moddir, ACTION_RECURSE, 170 parse_module, NULL, &modules, 0); 171 } 172 173 /* Prepare for writing out the dep files */ 174 xchdir(moddir); 158 175 if (ENABLE_FEATURE_CLEAN_UP) 159 free(moddir _base);176 free(moddir); 160 177 161 178 /* Generate dependency and alias files */ 162 179 if (!(option_mask32 & ARG_n)) 163 freopen(CONFIG_DEFAULT_DEPMOD_FILE, "w", stdout);180 xfreopen_write(CONFIG_DEFAULT_DEPMOD_FILE, stdout); 164 181 for (m = modules; m != NULL; m = m->next) { 165 182 printf("%s:", m->name); 166 183 … … 174 191 dep->dprev->dnext = dep->dnext; 175 192 dep->dnext = dep->dprev = dep; 176 193 } 177 puts("");194 bb_putchar('\n'); 178 195 } 179 196 180 197 #if ENABLE_FEATURE_MODUTILS_ALIAS 181 198 if (!(option_mask32 & ARG_n)) 182 freopen("modules.alias", "w", stdout);199 xfreopen_write("modules.alias", stdout); 183 200 for (m = modules; m != NULL; m = m->next) { 184 201 while (m->aliases) { 185 202 printf("alias %s %s\n", … … 190 207 #endif 191 208 #if ENABLE_FEATURE_MODUTILS_SYMBOLS 192 209 if (!(option_mask32 & ARG_n)) 193 freopen("modules.symbols", "w", stdout);210 xfreopen_write("modules.symbols", stdout); 194 211 for (m = modules; m != NULL; m = m->next) { 195 212 while (m->symbols) { 196 213 printf("alias symbol:%s %s\n", -
testsuite/mdev.tests
diff -Naur busybox-1.13.2.orig/testsuite/mdev.tests busybox-1.13.2/testsuite/mdev.tests
old new 111 111 112 112 # continuing to use directory structure from prev test 113 113 rm -rf mdev.testdir/dev/* 114 echo "sda 0:0 644 =block/ @echo @echo TEST" >mdev.testdir/etc/mdev.conf 115 testing "mdev move and command" \ 116 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; 117 ls -lnR mdev.testdir/dev | $FILTER_LS2" \ 118 "\ 119 @echo TEST 120 mdev.testdir/dev: 121 drwxr-xr-x 2 0 0 block 122 123 mdev.testdir/dev/block: 124 brw-r--r-- 1 0 0 sda 125 " \ 126 "" "" 127 128 # continuing to use directory structure from prev test 129 rm -rf mdev.testdir/dev/* 114 130 echo "@8,0 :1 644" >mdev.testdir/etc/mdev.conf 115 131 testing "mdev #maj,min and no explicit uid" \ 116 132 "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; -
util-linux/mdev.c
diff -Naur busybox-1.13.2.orig/util-linux/mdev.c busybox-1.13.2/util-linux/mdev.c
old new 179 179 unsigned i, n; 180 180 #endif 181 181 char *a = val; 182 s = strchr(val, ' '); 183 val = (s && s[1]) ? s+1 : NULL; 182 s = strchrnul(val, ' '); 183 val = (s[0] && s[1]) ? s+1 : NULL; 184 s[0] = '\0'; 184 185 #if ENABLE_FEATURE_MDEV_RENAME_REGEXP 185 186 /* substitute %1..9 with off[1..9], if any */ 186 187 n = 0;
Note:
See TracBrowser
for help on using the repository browser.