Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/scripts


Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
Location:
branches/3.2/mindi-busybox/scripts
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/scripts/Makefile.IMA

    r2725 r3232  
    1010obj     := $(objtree)
    1111
    12 # Look for make include files relative to root of kernel src
     12# Make generated files
     13DUMMY := $(shell $(Q)$(srctree)/scripts/gen_build_files.sh $(srctree) $(objtree) >&2)
     14
     15# Look for make include files relative to root of src
    1316MAKEFLAGS += --include-dir=$(srctree)
    1417
     
    122125lib-all-y += $(patsubst %,miscutils/%,$(sort $(lib-y)))
    123126lib-y:=
     127include mailutils/Kbuild
     128lib-all-y += $(patsubst %,mailutils/%,$(sort $(lib-y)))
     129lib-y:=
    124130include coreutils/libcoreutils/Kbuild
    125131lib-all-y += $(patsubst %,coreutils/libcoreutils/%,$(sort $(lib-y)))
     
    169175
    170176comma:=,
    171 busybox_unstripped.o: $(usage_stuff) include/applet_tables.h include/autoconf.h
     177busybox_unstripped.o: $(usage_stuff) include/applet_tables.h include/NUM_APPLETS.h include/autoconf.h
    172178    $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) \
    173179        $(patsubst %,-Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS)) \
     
    195201    $(MAKE) -f $(srctree)/Makefile silentoldconfig
    196202
     203# Override rules for host compile
    197204applets/usage: include/autoconf.h
    198     $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/usage applets/usage.c
     205    $(HOSTCC) -Wall -O2 -I$(srctree)/include -o applets/usage applets/usage.c
    199206
    200207applets/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  
    4040#include <sys/types.h>
    4141#include <sys/wait.h>
     42#include <alloca.h>
    4243
    4344/* exitstatus is used to keep track of any failing calls to kernel-doc,
     
    213214 * Call kernel-doc with following parameters:
    214215 * kernel-doc -docbook -nofunction function_name1 filename
    215  * function names are obtained from all the the src files
     216 * function names are obtained from all the src files
    216217 * by find_export_symbols.
    217218 * intfunc uses -nofunction
  • branches/3.2/mindi-busybox/scripts/basic/fixdep.c

    r2725 r3232  
    114114#include <ctype.h>
    115115#include <arpa/inet.h>
     116#include <alloca.h>
    116117
    117118/* bbox: not needed
     
    330331
    331332    while (m < end) {
    332         while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))
     333        while (m < end && (*m == ' ' || *m == '\\' || *m == '\n' || *m == '\r'))
    333334            m++;
    334335        p = m;
  • branches/3.2/mindi-busybox/scripts/bloat-o-meter

    r2725 r3232  
    1 #!/usr/bin/python
     1#!/usr/bin/env python
    22#
    33# Copyright 2004 Matt Mackall <mpm@selenic.com>
    44#
    5 # inspired by perl Bloat-O-Meter (c) 1997 by Andi Kleen
     5# Inspired by perl Bloat-O-Meter (c) 1997 by Andi Kleen
    66#
    77# This software may be used and distributed according to the terms
     
    4040def getsizes(file):
    4141    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+$")
    4342    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
    5849        if "." in name: name = "static." + name.split(".")[0]
    5950        value = int(value, 16)
    60         size = int(size)
     51        size = int(size, 16) if size.startswith('0x') else int(size)
    6152        if vis != "DEFAULT" and bind != "GLOBAL": # see if it is an alias
    6253            alias[(value, size)] = {"name" : name}
  • branches/3.2/mindi-busybox/scripts/gen_build_files.sh

    r2725 r3232  
    11#!/bin/sh
     2
     3# Note: was using sed OPTS CMD -- FILES
     4# but users complain that many sed implementations
     5# are misinterpreting --.
    26
    37test $# -ge 2 || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
     
    1620generate()
    1721{
    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"
    1924    #chk "${dst}"
    20     (
     25    {
     26        # Need to use printf: different shells have inconsistent
     27        # rules re handling of "\n" in echo params.
    2128        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"
    3336    if ! cmp -s "${dst}" "${dst}.tmp"; then
    3437        gen "${dst}"
     
    4043
    4144# (Re)generate include/applets.h
    42 s=`sed -n 's@^//applet:@@p' -- "$srctree"/*/*.c "$srctree"/*/*/*.c`
    43 generate \
     45sed -n 's@^//applet:@@p' "$srctree"/*/*.c "$srctree"/*/*/*.c \
     46| generate \
    4447    "$srctree/include/applets.src.h" \
    4548    "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 */"
    4850
    4951# (Re)generate include/usage.h
     
    5153# and insert empty line before each line which doesn't start
    5254# 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 \
     55sed -n -e 's@^//usage:\([ \t].*\)$@\1 \\@p' -e 's@^//usage:\([^ \t].*\)$@\n\1 \\@p' \
     56    "$srctree"/*/*.c "$srctree"/*/*/*.c \
     57| generate \
    5658    "$srctree/include/usage.src.h" \
    5759    "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 */"
    6061
    6162# (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
    6366    d="${d#./}"
    6467
     
    6871        mkdir -p -- "$d" 2>/dev/null
    6972
    70         s=`sed -n 's@^//kbuild:@@p' -- "$srctree/$d"/*.c`
    71         generate \
     73        sed -n 's@^//kbuild:@@p' "$srctree/$d"/*.c \
     74        | generate \
    7275            "${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"
    7577    fi
    7678
     
    8082        mkdir -p -- "$d" 2>/dev/null
    8183
    82         s=`sed -n 's@^//config:@@p' -- "$srctree/$d"/*.c`
    83         generate \
     84        sed -n 's@^//config:@@p' "$srctree/$d"/*.c \
     85        | generate \
    8486            "${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"
    8788    fi
    8889done
  • branches/3.2/mindi-busybox/scripts/kconfig/Makefile

    r2725 r3232  
    8888
    8989%_defconfig: $(obj)/conf
    90     $(Q)$< -D $@ Config.in
     90    $(Q)$< -D configs/$@ Config.in
    9191    $(MTIME_IS_COARSE) && sleep 1
    9292
  • branches/3.2/mindi-busybox/scripts/kconfig/conf.c

    r2725 r3232  
    33 * Released under the terms of the GNU GPL v2.0.
    44 */
     5
     6#define _XOPEN_SOURCE 700
    57
    68#include <ctype.h>
     
    172174{
    173175    struct symbol *sym = menu->sym;
    174     const char *def, *help;
     176    const char *def;
    175177
    176178    while (1) {
     
    187189            /* print help */
    188190            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);
    193192                def = NULL;
    194193                break;
     
    206205{
    207206    struct symbol *sym = menu->sym;
    208     int type;
    209207    tristate oldval, newval;
    210208    const char *help;
     
    214212        if (sym->name)
    215213            printf("(%s) ", sym->name);
    216         type = sym_get_type(sym);
    217214        putchar('[');
    218215        oldval = sym_get_tristate_value(sym);
     
    281278    struct symbol *sym, *def_sym;
    282279    struct menu *child;
    283     int type;
    284280    bool is_new;
    285281
    286282    sym = menu->sym;
    287     type = sym_get_type(sym);
    288283    is_new = !sym_has_value(sym);
    289284    if (sym_is_changable(sym)) {
  • branches/3.2/mindi-busybox/scripts/kconfig/lxdialog/textbox.c

    r1765 r3232  
    3939    int i, x, y, cur_x, cur_y, fpos, key = 0;
    4040    int passed_end;
    41     char search_term[MAX_LEN + 1];
    4241    WINDOW *dialog, *text;
    43 
    44     search_term[0] = '\0';  /* no search term entered yet */
    4542
    4643    /* Open input file for reading */
     
    438435static void print_line(WINDOW * win, int row, int width)
    439436{
    440     int y, x;
    441437    char *line;
    442438
     
    447443    waddnstr(win, line, MIN(strlen(line), width - 2));
    448444
    449     getyx(win, y, x);
    450445    /* Clear 'residue' of previous line */
    451446#if OLD_NCURSES
    452447    {
    453448        int i;
     449        int y, x;
     450
     451        getyx(win, y, x);
    454452        for (i = 0; i < width - x; i++)
    455453            waddch(win, ' ');
  • branches/3.2/mindi-busybox/scripts/kconfig/mconf.c

    r2859 r3232  
    88 * i18n, 2005, Arnaldo Carvalho de Melo <acme@conectiva.com.br>
    99 */
     10
     11#define _XOPEN_SOURCE 700
     12/* On Darwin, this may be needed to get SIGWINCH: */
     13#define _DARWIN_C_SOURCE 1
    1014
    1115#include <sys/ioctl.h>
     
    1923#include <stdlib.h>
    2024#include <string.h>
     25#include <strings.h> /* for strcasecmp */
    2126#include <termios.h>
    2227#include <unistd.h>
     
    441446pid_t pid;
    442447
     448#ifdef SIGWINCH
    443449static void winch_handler(int sig)
    444450{
     
    448454    }
    449455}
     456#endif
    450457
    451458static int exec_conf(void)
    452459{
    453460    int pipefd[2], stat, size;
    454     struct sigaction sa;
    455461    sigset_t sset, osset;
    456462
     
    461467    signal(SIGINT, SIG_DFL);
    462468
    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
    467478
    468479    *argptr++ = NULL;
  • branches/3.2/mindi-busybox/scripts/randomtest.loop

    r2725 r3232  
    11#!/bin/sh
     2
     3run_testsuite=true
    24
    35test -d "$1" || { echo "'$1' is not a directory"; exit 1; }
     
    2224        exit 1 # you may comment this out...
    2325        let fail++
    24     else
     26        continue
     27    fi
     28    if $run_testsuite; then
    2529        (
    2630            cd -- "$dir/testsuite" || exit 1
     
    3034        if test $? != 0; then
    3135            echo "Failed runtest in $dir"
    32             exit 1
     36            exit 1 # you may comment this out...
     37            let fail++
     38            continue
    3339        fi
    3440        tail -n10 -- "$dir/testsuite/runtest.log"
    35         rm -rf -- "$dir"
    3641    fi
     42    rm -rf -- "$dir"
    3743    let cnt++
    3844done
  • branches/3.2/mindi-busybox/scripts/trylink

    r2725 r3232  
    256256        $START_GROUP $O_FILES $END_GROUP \
    257257        -L"$sharedlib_dir" -lbusybox \
     258        $l_list \
    258259        $INFO_OPTS \
    259260    || {
Note: See TracChangeset for help on using the changeset viewer.