Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/scripts
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (11 years ago)
- Location:
- branches/3.2/mindi-busybox/scripts
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/scripts/Makefile.IMA
r2725 r3232 10 10 obj := $(objtree) 11 11 12 # Look for make include files relative to root of kernel src 12 # Make generated files 13 DUMMY := $(shell $(Q)$(srctree)/scripts/gen_build_files.sh $(srctree) $(objtree) >&2) 14 15 # Look for make include files relative to root of src 13 16 MAKEFLAGS += --include-dir=$(srctree) 14 17 … … 122 125 lib-all-y += $(patsubst %,miscutils/%,$(sort $(lib-y))) 123 126 lib-y:= 127 include mailutils/Kbuild 128 lib-all-y += $(patsubst %,mailutils/%,$(sort $(lib-y))) 129 lib-y:= 124 130 include coreutils/libcoreutils/Kbuild 125 131 lib-all-y += $(patsubst %,coreutils/libcoreutils/%,$(sort $(lib-y))) … … 169 175 170 176 comma:=, 171 busybox_unstripped.o: $(usage_stuff) include/applet_tables.h include/ autoconf.h177 busybox_unstripped.o: $(usage_stuff) include/applet_tables.h include/NUM_APPLETS.h include/autoconf.h 172 178 $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) \ 173 179 $(patsubst %,-Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS)) \ … … 195 201 $(MAKE) -f $(srctree)/Makefile silentoldconfig 196 202 203 # Override rules for host compile 197 204 applets/usage: include/autoconf.h 198 $(HOSTCC) -Wall - Wstrict-prototypes -O2 -fomit-frame-pointer-I$(srctree)/include -o applets/usage applets/usage.c205 $(HOSTCC) -Wall -O2 -I$(srctree)/include -o applets/usage applets/usage.c 199 206 200 207 applets/applet_tables: include/autoconf.h 201 $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/applet_tables applets/applet_tables.c 202 203 include/usage_compressed.h: include/usage.h applets/usage 204 $(srctree)/applets/usage_compressed include/usage_compressed.h applets 205 206 include/applet_tables.h: include/applets.h 207 applets/applet_tables include/applet_tables.h 208 $(HOSTCC) -Wall -O2 -I$(srctree)/include -o applets/applet_tables applets/applet_tables.c -
branches/3.2/mindi-busybox/scripts/basic/docproc.c
r2725 r3232 40 40 #include <sys/types.h> 41 41 #include <sys/wait.h> 42 #include <alloca.h> 42 43 43 44 /* exitstatus is used to keep track of any failing calls to kernel-doc, … … 213 214 * Call kernel-doc with following parameters: 214 215 * kernel-doc -docbook -nofunction function_name1 filename 215 * function names are obtained from all the thesrc files216 * function names are obtained from all the src files 216 217 * by find_export_symbols. 217 218 * intfunc uses -nofunction -
branches/3.2/mindi-busybox/scripts/basic/fixdep.c
r2725 r3232 114 114 #include <ctype.h> 115 115 #include <arpa/inet.h> 116 #include <alloca.h> 116 117 117 118 /* bbox: not needed … … 330 331 331 332 while (m < end) { 332 while (m < end && (*m == ' ' || *m == '\\' || *m == '\n' ))333 while (m < end && (*m == ' ' || *m == '\\' || *m == '\n' || *m == '\r')) 333 334 m++; 334 335 p = m; -
branches/3.2/mindi-busybox/scripts/bloat-o-meter
r2725 r3232 1 #!/usr/bin/ python1 #!/usr/bin/env python 2 2 # 3 3 # Copyright 2004 Matt Mackall <mpm@selenic.com> 4 4 # 5 # inspired by perl Bloat-O-Meter (c) 1997 by Andi Kleen5 # Inspired by perl Bloat-O-Meter (c) 1997 by Andi Kleen 6 6 # 7 7 # This software may be used and distributed according to the terms … … 40 40 def getsizes(file): 41 41 sym, alias, lut = {}, {}, {} 42 #dynsym_filter = re.compile("^\d+:\s+[\dA-Fa-f]+\s+\d+\s+\w+\s+\w+\s+\w+\s+\w+\s+\w+$")43 42 for l in os.popen("readelf -W -s %s %s" % (sym_args, file)).readlines(): 44 if True: 45 l = l.strip() 46 if not (len(l) and l[0].isdigit() and len(l.split()) == 8): 47 continue 48 num, value, size, typ, bind, vis, ndx, name = l.split() 49 if ndx == "UND": continue # skip undefined 50 if typ in ["SECTION", "FILES"]: continue # skip sections and files 51 #else: 52 # l = l.strip() 53 # match = dynsym_filter.match(l) 54 # if not match: continue 55 # x, value, size, typ, bind, x, ndx, name = l.split() 56 # if ndx == "UND": continue # skip undefined 57 # if typ in ["SECTION", "FILES"]: continue # skip sections and files 43 l = l.strip() 44 if not (len(l) and l[0].isdigit() and len(l.split()) == 8): 45 continue 46 num, value, size, typ, bind, vis, ndx, name = l.split() 47 if ndx == "UND": continue # skip undefined 48 if typ in ["SECTION", "FILES"]: continue # skip sections and files 58 49 if "." in name: name = "static." + name.split(".")[0] 59 50 value = int(value, 16) 60 size = int(size )51 size = int(size, 16) if size.startswith('0x') else int(size) 61 52 if vis != "DEFAULT" and bind != "GLOBAL": # see if it is an alias 62 53 alias[(value, size)] = {"name" : name} -
branches/3.2/mindi-busybox/scripts/gen_build_files.sh
r2725 r3232 1 1 #!/bin/sh 2 3 # Note: was using sed OPTS CMD -- FILES 4 # but users complain that many sed implementations 5 # are misinterpreting --. 2 6 3 7 test $# -ge 2 || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; } … … 16 20 generate() 17 21 { 18 local src="$1" dst="$2" header="$3" insert="$4" 22 # NB: data to be inserted at INSERT line is coming on stdin 23 local src="$1" dst="$2" header="$3" 19 24 #chk "${dst}" 20 ( 25 { 26 # Need to use printf: different shells have inconsistent 27 # rules re handling of "\n" in echo params. 21 28 printf "%s\n" "${header}" 22 if grep -qs '^INSERT$' "${src}"; then 23 sed -n '1,/^INSERT$/p' "${src}" 24 printf "%s\n" "${insert}" 25 sed -n '/^INSERT$/,$p' "${src}" 26 else 27 if [ -n "${insert}" ]; then 28 printf "%s\n" "ERROR: INSERT line missing in: ${src}" 1>&2 29 fi 30 cat "${src}" 31 fi 32 ) | sed '/^INSERT$/d' > "${dst}.tmp" 29 # print everything up to INSERT line 30 sed -n '/^INSERT$/ q; p' "${src}" 31 # copy stdin to stdout 32 cat 33 # print everything after INSERT line 34 sed -n '/^INSERT$/ { :l; n; p; bl }' "${src}" 35 } >"${dst}.tmp" 33 36 if ! cmp -s "${dst}" "${dst}.tmp"; then 34 37 gen "${dst}" … … 40 43 41 44 # (Re)generate include/applets.h 42 s =`sed -n 's@^//applet:@@p' -- "$srctree"/*/*.c "$srctree"/*/*/*.c`43 generate \45 sed -n 's@^//applet:@@p' "$srctree"/*/*.c "$srctree"/*/*/*.c \ 46 | generate \ 44 47 "$srctree/include/applets.src.h" \ 45 48 "include/applets.h" \ 46 "/* DO NOT EDIT. This file is generated from applets.src.h */" \ 47 "${s}" 49 "/* DO NOT EDIT. This file is generated from applets.src.h */" 48 50 49 51 # (Re)generate include/usage.h … … 51 53 # and insert empty line before each line which doesn't start 52 54 # with space or tab 53 # (note: we need to use \\\\ because of ``) 54 s=`sed -n -e 's@^//usage:\([ \t].*\)$@\1 \\\\@p' -e 's@^//usage:\([^ \t].*\)$@\n\1 \\\\@p' -- "$srctree"/*/*.c "$srctree"/*/*/*.c` 55 generate \55 sed -n -e 's@^//usage:\([ \t].*\)$@\1 \\@p' -e 's@^//usage:\([^ \t].*\)$@\n\1 \\@p' \ 56 "$srctree"/*/*.c "$srctree"/*/*/*.c \ 57 | generate \ 56 58 "$srctree/include/usage.src.h" \ 57 59 "include/usage.h" \ 58 "/* DO NOT EDIT. This file is generated from usage.src.h */" \ 59 "${s}" 60 "/* DO NOT EDIT. This file is generated from usage.src.h */" 60 61 61 62 # (Re)generate */Kbuild and */Config.in 62 { cd -- "$srctree" && find . -type d; } | while read -r d; do 63 # We skip .dotdirs - makes git/svn/etc users happier 64 { cd -- "$srctree" && find . -type d -not '(' -name '.?*' -prune ')'; } \ 65 | while read -r d; do 63 66 d="${d#./}" 64 67 … … 68 71 mkdir -p -- "$d" 2>/dev/null 69 72 70 s =`sed -n 's@^//kbuild:@@p' -- "$srctree/$d"/*.c`71 generate \73 sed -n 's@^//kbuild:@@p' "$srctree/$d"/*.c \ 74 | generate \ 72 75 "${src}" "${dst}" \ 73 "# DO NOT EDIT. This file is generated from Kbuild.src" \ 74 "${s}" 76 "# DO NOT EDIT. This file is generated from Kbuild.src" 75 77 fi 76 78 … … 80 82 mkdir -p -- "$d" 2>/dev/null 81 83 82 s =`sed -n 's@^//config:@@p' -- "$srctree/$d"/*.c`83 generate \84 sed -n 's@^//config:@@p' "$srctree/$d"/*.c \ 85 | generate \ 84 86 "${src}" "${dst}" \ 85 "# DO NOT EDIT. This file is generated from Config.src" \ 86 "${s}" 87 "# DO NOT EDIT. This file is generated from Config.src" 87 88 fi 88 89 done -
branches/3.2/mindi-busybox/scripts/kconfig/Makefile
r2725 r3232 88 88 89 89 %_defconfig: $(obj)/conf 90 $(Q)$< -D $@ Config.in90 $(Q)$< -D configs/$@ Config.in 91 91 $(MTIME_IS_COARSE) && sleep 1 92 92 -
branches/3.2/mindi-busybox/scripts/kconfig/conf.c
r2725 r3232 3 3 * Released under the terms of the GNU GPL v2.0. 4 4 */ 5 6 #define _XOPEN_SOURCE 700 5 7 6 8 #include <ctype.h> … … 172 174 { 173 175 struct symbol *sym = menu->sym; 174 const char *def , *help;176 const char *def; 175 177 176 178 while (1) { … … 187 189 /* print help */ 188 190 if (line[1] == '\n') { 189 help = nohelp_text; 190 if (menu->sym->help) 191 help = menu->sym->help; 192 printf("\n%s\n", menu->sym->help); 191 printf("\n%s\n", menu->sym->help ? menu->sym->help : nohelp_text); 193 192 def = NULL; 194 193 break; … … 206 205 { 207 206 struct symbol *sym = menu->sym; 208 int type;209 207 tristate oldval, newval; 210 208 const char *help; … … 214 212 if (sym->name) 215 213 printf("(%s) ", sym->name); 216 type = sym_get_type(sym);217 214 putchar('['); 218 215 oldval = sym_get_tristate_value(sym); … … 281 278 struct symbol *sym, *def_sym; 282 279 struct menu *child; 283 int type;284 280 bool is_new; 285 281 286 282 sym = menu->sym; 287 type = sym_get_type(sym);288 283 is_new = !sym_has_value(sym); 289 284 if (sym_is_changable(sym)) { -
branches/3.2/mindi-busybox/scripts/kconfig/lxdialog/textbox.c
r1765 r3232 39 39 int i, x, y, cur_x, cur_y, fpos, key = 0; 40 40 int passed_end; 41 char search_term[MAX_LEN + 1];42 41 WINDOW *dialog, *text; 43 44 search_term[0] = '\0'; /* no search term entered yet */45 42 46 43 /* Open input file for reading */ … … 438 435 static void print_line(WINDOW * win, int row, int width) 439 436 { 440 int y, x;441 437 char *line; 442 438 … … 447 443 waddnstr(win, line, MIN(strlen(line), width - 2)); 448 444 449 getyx(win, y, x);450 445 /* Clear 'residue' of previous line */ 451 446 #if OLD_NCURSES 452 447 { 453 448 int i; 449 int y, x; 450 451 getyx(win, y, x); 454 452 for (i = 0; i < width - x; i++) 455 453 waddch(win, ' '); -
branches/3.2/mindi-busybox/scripts/kconfig/mconf.c
r2859 r3232 8 8 * i18n, 2005, Arnaldo Carvalho de Melo <acme@conectiva.com.br> 9 9 */ 10 11 #define _XOPEN_SOURCE 700 12 /* On Darwin, this may be needed to get SIGWINCH: */ 13 #define _DARWIN_C_SOURCE 1 10 14 11 15 #include <sys/ioctl.h> … … 19 23 #include <stdlib.h> 20 24 #include <string.h> 25 #include <strings.h> /* for strcasecmp */ 21 26 #include <termios.h> 22 27 #include <unistd.h> … … 441 446 pid_t pid; 442 447 448 #ifdef SIGWINCH 443 449 static void winch_handler(int sig) 444 450 { … … 448 454 } 449 455 } 456 #endif 450 457 451 458 static int exec_conf(void) 452 459 { 453 460 int pipefd[2], stat, size; 454 struct sigaction sa;455 461 sigset_t sset, osset; 456 462 … … 461 467 signal(SIGINT, SIG_DFL); 462 468 463 sa.sa_handler = winch_handler; 464 sigemptyset(&sa.sa_mask); 465 sa.sa_flags = SA_RESTART; 466 sigaction(SIGWINCH, &sa, NULL); 469 #ifdef SIGWINCH 470 { 471 struct sigaction sa; 472 sa.sa_handler = winch_handler; 473 sigemptyset(&sa.sa_mask); 474 sa.sa_flags = SA_RESTART; 475 sigaction(SIGWINCH, &sa, NULL); 476 } 477 #endif 467 478 468 479 *argptr++ = NULL; -
branches/3.2/mindi-busybox/scripts/randomtest.loop
r2725 r3232 1 1 #!/bin/sh 2 3 run_testsuite=true 2 4 3 5 test -d "$1" || { echo "'$1' is not a directory"; exit 1; } … … 22 24 exit 1 # you may comment this out... 23 25 let fail++ 24 else 26 continue 27 fi 28 if $run_testsuite; then 25 29 ( 26 30 cd -- "$dir/testsuite" || exit 1 … … 30 34 if test $? != 0; then 31 35 echo "Failed runtest in $dir" 32 exit 1 36 exit 1 # you may comment this out... 37 let fail++ 38 continue 33 39 fi 34 40 tail -n10 -- "$dir/testsuite/runtest.log" 35 rm -rf -- "$dir"36 41 fi 42 rm -rf -- "$dir" 37 43 let cnt++ 38 44 done -
branches/3.2/mindi-busybox/scripts/trylink
r2725 r3232 256 256 $START_GROUP $O_FILES $END_GROUP \ 257 257 -L"$sharedlib_dir" -lbusybox \ 258 $l_list \ 258 259 $INFO_OPTS \ 259 260 || {
Note:
See TracChangeset
for help on using the changeset viewer.