From daf286cda559dd1eff0c9db46a4562c0255e76f1 Mon Sep 17 00:00:00 2001 From: Alexander Shishkin Date: Thu, 15 Jul 2010 17:39:24 +0300 Subject: Fix out-of-tree build's recursion While doing O=build build I've noticed that it was getting gradually slower with each invocation. The reason turned out to be that the build directory was inside the source tree and got recreated inside itself with all its subdirectories. This patch changes the behavior so that only the directories with Kbuild.src or Config.src in them are created in the out-of-tree build directory. A quick rebuild from scratch revealed no problems with this. Signed-off-by: Alexander Shishkin Signed-off-by: Denys Vlasenko --- scripts/gen_build_files.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/gen_build_files.sh b/scripts/gen_build_files.sh index 968158758..18c172d5a 100755 --- a/scripts/gen_build_files.sh +++ b/scripts/gen_build_files.sh @@ -53,8 +53,8 @@ fi src="$srctree/$d/Kbuild.src" dst="$d/Kbuild" - mkdir -p -- "$d" 2>/dev/null if test -f "$src"; then + mkdir -p -- "$d" 2>/dev/null #echo " CHK $dst" s=`sed -n 's@^//kbuild:@@p' -- "$srctree/$d"/*.c` @@ -73,8 +73,8 @@ fi src="$srctree/$d/Config.src" dst="$d/Config.in" - mkdir -p -- "$d" 2>/dev/null if test -f "$src"; then + mkdir -p -- "$d" 2>/dev/null #echo " CHK $dst" s=`sed -n 's@^//config:@@p' -- "$srctree/$d"/*.c` -- cgit v1.2.3-55-g6feb From 0f8960542f6f5ae258e72e56ba7296a01a9c10af Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 26 Jul 2010 01:35:44 +0200 Subject: *: more empty lines removed. no code changes Signed-off-by: Denys Vlasenko --- archival/lzo1x_9x.c | 1 - e2fsprogs/old_e2fsprogs/ext2fs/rw_bitmaps.c | 1 - networking/interface.c | 1 - networking/ntpd.c | 1 - scripts/find_stray_empty_lines | 7 +++++++ 5 files changed, 7 insertions(+), 4 deletions(-) create mode 100755 scripts/find_stray_empty_lines (limited to 'scripts') diff --git a/archival/lzo1x_9x.c b/archival/lzo1x_9x.c index 0baed5469..483205155 100644 --- a/archival/lzo1x_9x.c +++ b/archival/lzo1x_9x.c @@ -675,7 +675,6 @@ static int min_gain(unsigned ahead, unsigned lit1, static void better_match(const lzo_swd_p swd, unsigned *m_len, unsigned *m_off) { - if (*m_len <= M2_MIN_LEN) return; diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/rw_bitmaps.c b/e2fsprogs/old_e2fsprogs/ext2fs/rw_bitmaps.c index b618acc5b..bba432679 100644 --- a/e2fsprogs/old_e2fsprogs/ext2fs/rw_bitmaps.c +++ b/e2fsprogs/old_e2fsprogs/ext2fs/rw_bitmaps.c @@ -266,7 +266,6 @@ errcode_t ext2fs_read_block_bitmap(ext2_filsys fs) errcode_t ext2fs_read_bitmaps(ext2_filsys fs) { - EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); if (fs->inode_map && fs->block_map) diff --git a/networking/interface.c b/networking/interface.c index 659ac36ea..7c6ed82df 100644 --- a/networking/interface.c +++ b/networking/interface.c @@ -927,7 +927,6 @@ static void print_bytes_scaled(unsigned long long ull, const char *end) static void ife_print6(struct interface *ptr) { - FILE *f; char addr6[40], devname[20]; struct sockaddr_in6 sap; diff --git a/networking/ntpd.c b/networking/ntpd.c index d00ee49e5..e9cfdbddd 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c @@ -2060,7 +2060,6 @@ int ntpd_main(int argc UNUSED_PARAM, char **argv) static double direct_freq(double fp_offset) { - #ifdef KERNEL_PLL /* * If the kernel is enabled, we need the residual offset to diff --git a/scripts/find_stray_empty_lines b/scripts/find_stray_empty_lines new file mode 100755 index 000000000..58daf2f0c --- /dev/null +++ b/scripts/find_stray_empty_lines @@ -0,0 +1,7 @@ +#!/bin/sh + +grep -n -B1 -r $'^\t*}$' . | grep -A1 '.[ch]-[0-9]*-$' +grep -n -A1 -r $'^\t*{$' . | grep -B1 '.[ch]-[0-9]*-$' +# or (less surefire ones): +grep -n -B1 -r $'^\t*}' . | grep -A1 '.[ch]-[0-9]*-$' +grep -n -A1 -r $'^\t*{' . | grep -B1 '.[ch]-[0-9]*-$' -- cgit v1.2.3-55-g6feb From ba2dcccd799963ac74ee92300df494947820608b Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 26 Jul 2010 01:49:12 +0200 Subject: *: trailing empty lines removed Signed-off-by: Denys Vlasenko --- archival/libunarchive/unxz/README | 1 - debianutils/Config.src | 1 - docs/busybox_footer.pod | 1 - docs/cgi/cl.html | 2 +- docs/cgi/env.html | 2 +- docs/cgi/in.html | 2 +- docs/cgi/interface.html | 2 +- docs/cgi/out.html | 2 +- docs/contributing.txt | 2 -- docs/posix_conformance.txt | 1 - e2fsprogs/old_e2fsprogs/e2fsck.h | 2 -- e2fsprogs/old_e2fsprogs/e2p/ostype.c | 2 -- examples/bootfloppy/display.txt | 1 - examples/bootfloppy/etc/fstab | 1 - examples/bootfloppy/etc/inittab | 1 - examples/bootfloppy/etc/profile | 1 - examples/bootfloppy/mkrootfs.sh | 1 - examples/inittab | 1 - init/reboot.h | 1 - libbb/README | 1 - libbb/selinux_common.c | 1 - networking/libiproute/ll_proto.c | 1 - scripts/Makefile.host | 1 - scripts/Makefile.lib | 2 -- scripts/basic/docproc.c | 1 - scripts/find_stray_empty_lines | 10 ++++++++++ scripts/kconfig/check.sh | 1 - scripts/kconfig/lex.zconf.c_shipped | 1 - scripts/kconfig/menu.c | 1 - scripts/kconfig/util.c | 1 - scripts/kconfig/zconf.hash.c_shipped | 1 - scripts/kconfig/zconf.tab.c_shipped | 2 -- scripts/showasm | 1 - selinux/Config.src | 1 - shell/hush_test/hush-misc/break1.tests | 1 - sysklogd/Config.src | 1 - testsuite/basename/basename-works | 1 - testsuite/dirname/dirname-works | 1 - testsuite/expr/expr-works | 1 - testsuite/ln/ln-preserves-soft-links | 1 - testsuite/readlink.tests | 1 - testsuite/uptime/uptime-works | 1 - 42 files changed, 15 insertions(+), 46 deletions(-) (limited to 'scripts') diff --git a/archival/libunarchive/unxz/README b/archival/libunarchive/unxz/README index f79b0a404..c5972f6b8 100644 --- a/archival/libunarchive/unxz/README +++ b/archival/libunarchive/unxz/README @@ -133,4 +133,3 @@ Specifying the calling convention For example, on Windows, you may make all functions use the stdcall calling convention by defining XZ_FUNC=__stdcall when building and using the functions from XZ Embedded. - diff --git a/debianutils/Config.src b/debianutils/Config.src index 838d8f00c..cbc09b5ce 100644 --- a/debianutils/Config.src +++ b/debianutils/Config.src @@ -83,4 +83,3 @@ config WHICH print out their pathnames. endmenu - diff --git a/docs/busybox_footer.pod b/docs/busybox_footer.pod index 5ed937991..47eabaeeb 100644 --- a/docs/busybox_footer.pod +++ b/docs/busybox_footer.pod @@ -253,4 +253,3 @@ Tito Ragusa devfsd and size optimizations in strings, openvt and deallocvt. =cut - diff --git a/docs/cgi/cl.html b/docs/cgi/cl.html index 5779d623e..4f8faae9f 100644 --- a/docs/cgi/cl.html +++ b/docs/cgi/cl.html @@ -43,4 +43,4 @@ CGI - Common Gateway Interface

cgi@ncsa.uiuc.edu
- \ No newline at end of file + diff --git a/docs/cgi/env.html b/docs/cgi/env.html index 924026b3e..b83c750bf 100644 --- a/docs/cgi/env.html +++ b/docs/cgi/env.html @@ -146,4 +146,4 @@ interface specification

CGI - Common Gateway Interface

cgi@ncsa.uiuc.edu
- \ No newline at end of file + diff --git a/docs/cgi/in.html b/docs/cgi/in.html index 679306aaa..7ee5fe601 100644 --- a/docs/cgi/in.html +++ b/docs/cgi/in.html @@ -30,4 +30,4 @@ interface specification

CGI - Common Gateway Interface

cgi@ncsa.uiuc.edu
- \ No newline at end of file + diff --git a/docs/cgi/interface.html b/docs/cgi/interface.html index ea73ce3a2..0be016b4c 100644 --- a/docs/cgi/interface.html +++ b/docs/cgi/interface.html @@ -26,4 +26,4 @@ the following is a hotlink to graphic detail.

CGI - Common Gateway Interface

cgi@ncsa.uiuc.edu
- \ No newline at end of file + diff --git a/docs/cgi/out.html b/docs/cgi/out.html index 2203ee5a0..5266985b5 100644 --- a/docs/cgi/out.html +++ b/docs/cgi/out.html @@ -123,4 +123,4 @@ interface specification

CGI - Common Gateway Interface

cgi@ncsa.uiuc.edu
- \ No newline at end of file + diff --git a/docs/contributing.txt b/docs/contributing.txt index d06e4a2da..39aaef1b5 100644 --- a/docs/contributing.txt +++ b/docs/contributing.txt @@ -426,5 +426,3 @@ you're having difficulty following some of the steps outlined in this document don't worry, the folks on the Busybox mailing list are a fairly good-natured bunch and will work with you to help get your patches into shape or help you make contributions. - - diff --git a/docs/posix_conformance.txt b/docs/posix_conformance.txt index d9fa116b8..5b616d701 100644 --- a/docs/posix_conformance.txt +++ b/docs/posix_conformance.txt @@ -739,4 +739,3 @@ xargs Busybox specific options: zcat POSIX options: None zcat Busybox specific options: None - diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.h b/e2fsprogs/old_e2fsprogs/e2fsck.h index 73d398ff4..fdfa2d84a 100644 --- a/e2fsprogs/old_e2fsprogs/e2fsck.h +++ b/e2fsprogs/old_e2fsprogs/e2fsck.h @@ -636,5 +636,3 @@ static inline int tid_geq(tid_t x, tid_t y) int difference = (x - y); return (difference >= 0); } - - diff --git a/e2fsprogs/old_e2fsprogs/e2p/ostype.c b/e2fsprogs/old_e2fsprogs/e2p/ostype.c index 1abe2ba91..6a2f178f3 100644 --- a/e2fsprogs/old_e2fsprogs/e2p/ostype.c +++ b/e2fsprogs/old_e2fsprogs/e2p/ostype.c @@ -70,5 +70,3 @@ int main(int argc, char **argv) exit(0); } #endif - - diff --git a/examples/bootfloppy/display.txt b/examples/bootfloppy/display.txt index 399d326d9..7cae48bb3 100644 --- a/examples/bootfloppy/display.txt +++ b/examples/bootfloppy/display.txt @@ -1,4 +1,3 @@ This boot floppy is made with Busybox, uClibc, and the Linux kernel. Hit RETURN to boot or enter boot parameters at the prompt below. - diff --git a/examples/bootfloppy/etc/fstab b/examples/bootfloppy/etc/fstab index ef14ca2cc..b31f60217 100644 --- a/examples/bootfloppy/etc/fstab +++ b/examples/bootfloppy/etc/fstab @@ -1,2 +1 @@ proc /proc proc defaults 0 0 - diff --git a/examples/bootfloppy/etc/inittab b/examples/bootfloppy/etc/inittab index eb3e979ce..1ac9f68ce 100644 --- a/examples/bootfloppy/etc/inittab +++ b/examples/bootfloppy/etc/inittab @@ -2,4 +2,3 @@ ::respawn:-/bin/sh tty2::askfirst:-/bin/sh ::ctrlaltdel:/bin/umount -a -r - diff --git a/examples/bootfloppy/etc/profile b/examples/bootfloppy/etc/profile index 8a7c77d78..cf68d3393 100644 --- a/examples/bootfloppy/etc/profile +++ b/examples/bootfloppy/etc/profile @@ -5,4 +5,3 @@ echo -n "Processing /etc/profile... " # no-op echo "Done" echo - diff --git a/examples/bootfloppy/mkrootfs.sh b/examples/bootfloppy/mkrootfs.sh index 5cdff21a0..a7fc48b13 100755 --- a/examples/bootfloppy/mkrootfs.sh +++ b/examples/bootfloppy/mkrootfs.sh @@ -102,4 +102,3 @@ then rmdir $TARGET_DIR gzip -9 rootfs fi - diff --git a/examples/inittab b/examples/inittab index 64fc4fce1..c4e0af514 100644 --- a/examples/inittab +++ b/examples/inittab @@ -87,4 +87,3 @@ tty5::respawn:/sbin/getty 38400 tty6 ::ctrlaltdel:/sbin/reboot ::shutdown:/bin/umount -a -r ::shutdown:/sbin/swapoff -a - diff --git a/init/reboot.h b/init/reboot.h index ff045fdd1..949763949 100644 --- a/init/reboot.h +++ b/init/reboot.h @@ -28,4 +28,3 @@ # define RB_POWER_OFF RB_HALT_SYSTEM # endif #endif - diff --git a/libbb/README b/libbb/README index 4f28f7e34..6e63dc5f2 100644 --- a/libbb/README +++ b/libbb/README @@ -8,4 +8,3 @@ that you wrote that is mis-attributed, do let me know so we can fix that up. Erik Andersen - diff --git a/libbb/selinux_common.c b/libbb/selinux_common.c index 7b5696754..2acb50e96 100644 --- a/libbb/selinux_common.c +++ b/libbb/selinux_common.c @@ -53,4 +53,3 @@ void FAST_FUNC selinux_preserve_fcontext(int fdesc) setfscreatecon_or_die(context); freecon(context); } - diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c index 145902b2e..1cd576f1d 100644 --- a/networking/libiproute/ll_proto.c +++ b/networking/libiproute/ll_proto.c @@ -126,4 +126,3 @@ int FAST_FUNC ll_proto_a2n(unsigned short *id, char *buf) *id = htons(i); return 0; } - diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 23bd9ff10..2e628508d 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -153,4 +153,3 @@ $(host-cshlib): %: $(host-cshobjs) FORCE targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) - diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index be679b624..3e54ea712 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -168,5 +168,3 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ quiet_cmd_gzip = GZIP $@ cmd_gzip = gzip -f -9 < $< > $@ - - diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index 50ef37157..db30019d8 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c @@ -397,4 +397,3 @@ int main(int argc, char **argv) fflush(stdout); return exitstatus; } - diff --git a/scripts/find_stray_empty_lines b/scripts/find_stray_empty_lines index 58daf2f0c..60873dac1 100755 --- a/scripts/find_stray_empty_lines +++ b/scripts/find_stray_empty_lines @@ -5,3 +5,13 @@ grep -n -A1 -r $'^\t*{$' . | grep -B1 '.[ch]-[0-9]*-$' # or (less surefire ones): grep -n -B1 -r $'^\t*}' . | grep -A1 '.[ch]-[0-9]*-$' grep -n -A1 -r $'^\t*{' . | grep -B1 '.[ch]-[0-9]*-$' + +# find trailing empty lines +find -type f | xargs tail -1 | while read file; do + test x"$file" = x"" && continue + read lastline + #echo "|$file|$lastline" + if test x"$lastline" = x""; then + echo "$file" + fi +done diff --git a/scripts/kconfig/check.sh b/scripts/kconfig/check.sh index fa59cbf9d..15fc29421 100755 --- a/scripts/kconfig/check.sh +++ b/scripts/kconfig/check.sh @@ -11,4 +11,3 @@ EOF if [ ! "$?" -eq "0" ]; then echo -DKBUILD_NO_NLS; fi - diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index 5fc323de3..4837bbf64 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped @@ -2322,4 +2322,3 @@ char *zconf_curname(void) { return current_pos.file ? current_pos.file->name : ""; } - diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 0fce20cb7..14cf2ead0 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -394,4 +394,3 @@ struct menu *menu_get_parent_menu(struct menu *menu) } return menu; } - diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index ef4c83228..263091945 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c @@ -112,4 +112,3 @@ const char *str_get(struct gstr *gs) { return gs->s; } - diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped index 345f0fc07..d39cf189a 100644 --- a/scripts/kconfig/zconf.hash.c_shipped +++ b/scripts/kconfig/zconf.hash.c_shipped @@ -228,4 +228,3 @@ kconf_id_lookup (register const char *str, register unsigned int len) } return 0; } - diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index b62724da0..a27d256d6 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped @@ -2169,5 +2169,3 @@ void zconfdump(FILE *out) #include "expr.c" #include "symbol.c" #include "menu.c" - - diff --git a/scripts/showasm b/scripts/showasm index 046442653..dc2cd705d 100755 --- a/scripts/showasm +++ b/scripts/showasm @@ -18,4 +18,3 @@ then fi objdump -d $1 | sed -n -e '/./{H;$!d}' -e "x;/^.[0-9a-fA-F]* <$2>:/p" - diff --git a/selinux/Config.src b/selinux/Config.src index 64a99203e..47d15b6af 100644 --- a/selinux/Config.src +++ b/selinux/Config.src @@ -122,4 +122,3 @@ config SESTATUS Displays the status of SELinux. endmenu - diff --git a/shell/hush_test/hush-misc/break1.tests b/shell/hush_test/hush-misc/break1.tests index 912f149c1..3a6b060d9 100755 --- a/shell/hush_test/hush-misc/break1.tests +++ b/shell/hush_test/hush-misc/break1.tests @@ -1,3 +1,2 @@ while true; do echo A; break; echo B; done echo OK:$? - diff --git a/sysklogd/Config.src b/sysklogd/Config.src index bfe2d1cc3..41c0d286b 100644 --- a/sysklogd/Config.src +++ b/sysklogd/Config.src @@ -128,4 +128,3 @@ config LOGGER problems that occur within programs and scripts. endmenu - diff --git a/testsuite/basename/basename-works b/testsuite/basename/basename-works index 38907d4c1..7140e9988 100644 --- a/testsuite/basename/basename-works +++ b/testsuite/basename/basename-works @@ -1,2 +1 @@ test x$(basename $(pwd)) = x$(busybox basename $(pwd)) - diff --git a/testsuite/dirname/dirname-works b/testsuite/dirname/dirname-works index f339c8f73..d673dd937 100644 --- a/testsuite/dirname/dirname-works +++ b/testsuite/dirname/dirname-works @@ -1,2 +1 @@ test x$(dirname $(pwd)) = x$(busybox dirname $(pwd)) - diff --git a/testsuite/expr/expr-works b/testsuite/expr/expr-works index af49ac4d5..5a0fffbdc 100644 --- a/testsuite/expr/expr-works +++ b/testsuite/expr/expr-works @@ -56,4 +56,3 @@ busybox expr 0 \>= 1 if [ $? != 1 ] ; then exit 1; fi; - diff --git a/testsuite/ln/ln-preserves-soft-links b/testsuite/ln/ln-preserves-soft-links index a8123ece3..3a49bedf4 100644 --- a/testsuite/ln/ln-preserves-soft-links +++ b/testsuite/ln/ln-preserves-soft-links @@ -6,4 +6,3 @@ if [ $? != 0 ] ; then exit 0; fi exit 1; - diff --git a/testsuite/readlink.tests b/testsuite/readlink.tests index e6822dff1..ecc3ad03e 100755 --- a/testsuite/readlink.tests +++ b/testsuite/readlink.tests @@ -29,4 +29,3 @@ testing "readlink -f on a wierd dir" "readlink -f $TESTDIR/../$TESTFILE" "$PWD/$ # clean up rm -r "$TESTLINK" "$TESTDIR" - diff --git a/testsuite/uptime/uptime-works b/testsuite/uptime/uptime-works index 80e578778..6b168ab0e 100644 --- a/testsuite/uptime/uptime-works +++ b/testsuite/uptime/uptime-works @@ -1,2 +1 @@ busybox uptime - -- cgit v1.2.3-55-g6feb From b4d035165f9304e869ec2733ee6ded058c4c9270 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 26 Jul 2010 12:47:36 +0200 Subject: *: s/spaces/tabs/ Signed-off-by: Denys Vlasenko --- docs/ifupdown_design.txt | 28 ++++++++++++++-------------- scripts/kconfig/zconf.y | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'scripts') diff --git a/docs/ifupdown_design.txt b/docs/ifupdown_design.txt index 8008e4507..8ab4e51ad 100644 --- a/docs/ifupdown_design.txt +++ b/docs/ifupdown_design.txt @@ -10,27 +10,27 @@ for that. We are doomed to have problems with ifup/ifdown. Just look as this code: static const struct dhcp_client_t ext_dhcp_clients[] = { - { "dhcpcd", "", "" }, - { "dhclient", ........ }, - { "pump", ........ }, - { "udhcpc", ........ }, + { "dhcpcd", "", "" }, + { "dhclient", ........ }, + { "pump", ........ }, + { "udhcpc", ........ }, }; static int dhcp_down(struct interface_defn_t *ifd, execfn *exec) { #if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP - int i ; - for (i = 0; i < ARRAY_SIZE(ext_dhcp_clients); i++) { - if (exists_execable(ext_dhcp_clients[i].name)) - return execute(ext_dhcp_clients[i].stopcmd, ifd, exec); - } - bb_error_msg("no dhcp clients found, using static interface shutdown"); - return static_down(ifd, exec); + int i ; + for (i = 0; i < ARRAY_SIZE(ext_dhcp_clients); i++) { + if (exists_execable(ext_dhcp_clients[i].name)) + return execute(ext_dhcp_clients[i].stopcmd, ifd, exec); + } + bb_error_msg("no dhcp clients found, using static interface shutdown"); + return static_down(ifd, exec); #elif ENABLE_UDHCPC - return execute("kill " - "`cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); + return execute("kill " + "`cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); #else - return 0; /* no dhcp support */ + return 0; /* no dhcp support */ #endif } diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 2007a4e02..bef5e92a3 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y @@ -473,7 +473,7 @@ void conf_parse(const char *name) menu_finalize(&rootmenu); for_all_symbols(i, sym) { sym_check_deps(sym); - } + } sym_change_count = 1; } -- cgit v1.2.3-55-g6feb From a3f71001c30f8927495828da9888bcef86e24035 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 27 Jul 2010 11:13:28 +0200 Subject: find_stray_empty_lines: fix tail "invalid context" error "tail -1" works only with one input file. Using it with multiple input files throws following error on Ubuntu systems: tail: option used in invalid context Adding "-n" makes it work on all cases. Signed-off-by: Javier Viguera Signed-off-by: Bernhard Reutner-Fischer --- scripts/find_stray_empty_lines | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/find_stray_empty_lines b/scripts/find_stray_empty_lines index 60873dac1..17a2d4a49 100755 --- a/scripts/find_stray_empty_lines +++ b/scripts/find_stray_empty_lines @@ -7,7 +7,7 @@ grep -n -B1 -r $'^\t*}' . | grep -A1 '.[ch]-[0-9]*-$' grep -n -A1 -r $'^\t*{' . | grep -B1 '.[ch]-[0-9]*-$' # find trailing empty lines -find -type f | xargs tail -1 | while read file; do +find -type f | xargs tail -n1 | while read file; do test x"$file" = x"" && continue read lastline #echo "|$file|$lastline" -- cgit v1.2.3-55-g6feb From 3d615b8a4153d791164e44687831392fed26d9b4 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 28 Jul 2010 21:29:19 +0200 Subject: find_stray_empty_lines: make it work Signed-off-by: Bernhard Reutner-Fischer --- scripts/find_stray_empty_lines | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/find_stray_empty_lines b/scripts/find_stray_empty_lines index 17a2d4a49..aae18f99b 100755 --- a/scripts/find_stray_empty_lines +++ b/scripts/find_stray_empty_lines @@ -7,11 +7,13 @@ grep -n -B1 -r $'^\t*}' . | grep -A1 '.[ch]-[0-9]*-$' grep -n -A1 -r $'^\t*{' . | grep -B1 '.[ch]-[0-9]*-$' # find trailing empty lines -find -type f | xargs tail -n1 | while read file; do +find -type f | while read file; do test x"$file" = x"" && continue - read lastline - #echo "|$file|$lastline" - if test x"$lastline" = x""; then + tail -n1 $file | while read lastline + do + #echo "|$file|$lastline" + if test x"$lastline" = x""; then echo "$file" - fi + fi + done done -- cgit v1.2.3-55-g6feb From 6e06da5efd5d6e341ae2f5116c449994740f5613 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 2 Aug 2010 02:17:25 +0200 Subject: update _shipped file with hurd fix Signed-off-by: Denys Vlasenko --- scripts/kconfig/lex.zconf.c_shipped | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index 4837bbf64..51f15e175 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped @@ -2235,13 +2235,14 @@ static void zconf_endhelp(void) */ FILE *zconf_fopen(const char *name) { - char *env, fullname[PATH_MAX+1]; + char *env; FILE *f; f = fopen(name, "r"); if (!f && name[0] != '/') { env = getenv(SRCTREE); if (env) { + char *fullname = alloca(strlen(env) + strlen(name) + 2); sprintf(fullname, "%s/%s", env, name); f = fopen(fullname, "r"); } -- cgit v1.2.3-55-g6feb