From 5d26df6497505e8ed486bf3e3ba65d0d6f0daa15 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 16 Jul 2010 15:31:38 +0200 Subject: tweak defconfig Signed-off-by: Denys Vlasenko --- libbb/Config.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/Config.src b/libbb/Config.src index 80b1e0d21..09bf89246 100644 --- a/libbb/Config.src +++ b/libbb/Config.src @@ -98,7 +98,7 @@ config FEATURE_USERNAME_COMPLETION config FEATURE_EDITING_FANCY_PROMPT bool "Fancy shell prompts" - default n + default y depends on FEATURE_EDITING help Setting this option allows for prompts to use things like \w and -- cgit v1.2.3-55-g6feb From b9e35dc15dbf8aa22dbc260d121ad8f7a34017de Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 18 Jul 2010 22:21:24 +0200 Subject: lineedit: cosmetics, no code changes Signed-off-by: Denys Vlasenko --- libbb/lineedit.c | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 8a2ea7974..3905b8cc4 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -53,19 +53,15 @@ #if ENABLE_FEATURE_EDITING -#define ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR \ +#define ENABLE_USERNAME_OR_HOMEDIR \ (ENABLE_FEATURE_USERNAME_COMPLETION || ENABLE_FEATURE_EDITING_FANCY_PROMPT) -#define IF_FEATURE_GETUSERNAME_AND_HOMEDIR(...) -#if ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR -#undef IF_FEATURE_GETUSERNAME_AND_HOMEDIR -#define IF_FEATURE_GETUSERNAME_AND_HOMEDIR(...) __VA_ARGS__ +#define IF_USERNAME_OR_HOMEDIR(...) +#if ENABLE_USERNAME_OR_HOMEDIR +# undef IF_USERNAME_OR_HOMEDIR +# define IF_USERNAME_OR_HOMEDIR(...) __VA_ARGS__ #endif -#define SEQ_CLEAR_TILL_END_OF_SCREEN "\033[J" -//#define SEQ_CLEAR_TILL_END_OF_LINE "\033[K" - - #undef CHAR_T #if ENABLE_UNICODE_SUPPORT # define BB_NUL ((wchar_t)0) @@ -90,14 +86,16 @@ static bool BB_ispunct(CHAR_T c) { return ((unsigned)c < 256 && ispunct(c)); } # define BB_isalnum(c) isalnum(c) # define BB_ispunct(c) ispunct(c) #endif +#if ENABLE_UNICODE_PRESERVE_BROKEN +# define unicode_mark_raw_byte(wc) ((wc) | 0x20000000) +# define unicode_is_raw_byte(wc) ((wc) & 0x20000000) +#else +# define unicode_is_raw_byte(wc) 0 +#endif -# if ENABLE_UNICODE_PRESERVE_BROKEN -# define unicode_mark_raw_byte(wc) ((wc) | 0x20000000) -# define unicode_is_raw_byte(wc) ((wc) & 0x20000000) -# else -# define unicode_is_raw_byte(wc) 0 -# endif +#define SEQ_CLEAR_TILL_END_OF_SCREEN "\033[J" +//#define SEQ_CLEAR_TILL_END_OF_LINE "\033[K" enum { @@ -107,7 +105,7 @@ enum { : 0x7ff0 }; -#if ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR +#if ENABLE_USERNAME_OR_HOMEDIR static const char null_str[] ALIGN1 = ""; #endif @@ -134,7 +132,7 @@ struct lineedit_statics { int num_ok_lines; /* = 1; */ #endif -#if ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR +#if ENABLE_USERNAME_OR_HOMEDIR char *user_buf; char *home_pwd_buf; /* = (char*)null_str; */ #endif @@ -145,7 +143,7 @@ struct lineedit_statics { #endif #if ENABLE_FEATURE_EDITING_VI -#define DELBUFSIZ 128 +# define DELBUFSIZ 128 CHAR_T *delptr; smallint newdelflag; /* whether delbuf should be reused yet */ CHAR_T delbuf[DELBUFSIZ]; /* a place to store deleted characters */ @@ -191,7 +189,7 @@ extern struct lineedit_statics *const lineedit_ptr_to_statics; barrier(); \ cmdedit_termw = 80; \ IF_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines = 1;) \ - IF_FEATURE_GETUSERNAME_AND_HOMEDIR(home_pwd_buf = (char*)null_str;) \ + IF_USERNAME_OR_HOMEDIR(home_pwd_buf = (char*)null_str;) \ } while (0) static void deinit_S(void) { @@ -200,7 +198,7 @@ static void deinit_S(void) * (otherwise it points to verbatim prompt (NOT malloced) */ free((char*)cmdedit_prompt); #endif -#if ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR +#if ENABLE_USERNAME_OR_HOMEDIR free(user_buf); if (home_pwd_buf != null_str) free(home_pwd_buf); @@ -1669,7 +1667,7 @@ static void parse_and_put_prompt(const char *prmt_ptr) c = *prmt_ptr++; switch (c) { -# if ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR +# if ENABLE_USERNAME_OR_HOMEDIR case 'u': pbuf = user_buf ? user_buf : (char*)""; break; @@ -1681,7 +1679,7 @@ static void parse_and_put_prompt(const char *prmt_ptr) case '$': c = (geteuid() == 0 ? '#' : '$'); break; -# if ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR +# if ENABLE_USERNAME_OR_HOMEDIR case 'w': /* /home/user[/something] -> ~[/something] */ pbuf = cwd_buf; @@ -1957,7 +1955,7 @@ int FAST_FUNC read_line_input(const char *prompt, char *command, int maxsize, li /* Now initialize things */ previous_SIGWINCH_handler = signal(SIGWINCH, win_changed); win_changed(0); /* do initial resizing */ -#if ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR +#if ENABLE_USERNAME_OR_HOMEDIR { struct passwd *entry; @@ -2379,7 +2377,7 @@ int FAST_FUNC read_line_input(const char *prompt, char *command, int maxsize, li } #endif -/* Stop bug catching using "command_must_not_be_used" trick */ +/* End of bug-catching "command_must_not_be_used" trick */ #undef command #if ENABLE_UNICODE_SUPPORT @@ -2413,7 +2411,7 @@ int FAST_FUNC read_line_input(const char *prompt, char *command, int maxsize, li return len; /* can't return command_len, DEINIT_S() destroys it */ } -#else +#else /* !FEATURE_EDITING */ #undef read_line_input int FAST_FUNC read_line_input(const char* prompt, char* command, int maxsize) @@ -2424,7 +2422,7 @@ int FAST_FUNC read_line_input(const char* prompt, char* command, int maxsize) return strlen(command); } -#endif /* FEATURE_EDITING */ +#endif /* !FEATURE_EDITING */ /* -- cgit v1.2.3-55-g6feb From 55241fa2e0a623c6f3f3f9c6e430d72bc10858bc Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 18 Jul 2010 22:53:06 +0200 Subject: lineedit: limit ASK_TERMINAL to the case when we can't find out the width Signed-off-by: Denys Vlasenko --- libbb/lineedit.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 3905b8cc4..a62ab6d29 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -149,6 +149,7 @@ struct lineedit_statics { CHAR_T delbuf[DELBUFSIZ]; /* a place to store deleted characters */ #endif #if ENABLE_FEATURE_EDITING_ASK_TERMINAL + smallint unknown_width; smallint sent_ESC_br6n; #endif @@ -1610,14 +1611,16 @@ static void ask_terminal(void) * poll([{fd=0, events=POLLIN}], 1, 4294967295) = 1 ([{fd=0, revents=POLLIN}]) * read(0, "\n", 1) = 1 <-- oh crap, user's input got in first */ - struct pollfd pfd; - - pfd.fd = STDIN_FILENO; - pfd.events = POLLIN; - if (safe_poll(&pfd, 1, 0) == 0) { - S.sent_ESC_br6n = 1; - fputs("\033" "[6n", stdout); - fflush_all(); /* make terminal see it ASAP! */ + if (S.unknown_width) { /* only if window size is not known */ + struct pollfd pfd; + + pfd.fd = STDIN_FILENO; + pfd.events = POLLIN; + if (safe_poll(&pfd, 1, 0) == 0) { + S.sent_ESC_br6n = 1; + fputs("\033" "[6n", stdout); + fflush_all(); /* make terminal see it ASAP! */ + } } } #else @@ -1763,11 +1766,13 @@ static void cmdedit_setwidth(unsigned w, int redraw_flg) static void win_changed(int nsig) { + int sv_errno = errno; unsigned width; - get_terminal_width_height(0, &width, NULL); + IF_FEATURE_EDITING_ASK_TERMINAL(S.unknown_width =) get_terminal_width_height(0, &width, NULL); cmdedit_setwidth(width, nsig /* - just a yes/no flag */); if (nsig == SIGWINCH) signal(SIGWINCH, win_changed); /* rearm ourself */ + errno = sv_errno; } static int lineedit_read_key(char *read_key_buffer) -- cgit v1.2.3-55-g6feb From 1d7266d3b59be361763dab61f680103bbb70f3e9 Mon Sep 17 00:00:00 2001 From: Jeremie Koenig Date: Mon, 19 Jul 2010 00:44:56 +0200 Subject: mark Linux-specific configuration options PLATFORM_LINUX is used as a dependency for applets or features which require Linux-specific interfaces. Signed-off-by: Jeremie Koenig Signed-off-by: Denys Vlasenko --- Config.in | 12 ++++++++++++ console-tools/Config.src | 13 +++++++++++++ coreutils/Config.src | 2 ++ coreutils/date.c | 2 +- e2fsprogs/Config.src | 1 + init/Config.src | 2 ++ init/bootchartd.c | 1 + libbb/Config.src | 1 + loginutils/Config.src | 3 +++ miscutils/Config.src | 19 ++++++++++++++++++- miscutils/conspy.c | 1 + miscutils/ubi_attach_detach.c | 2 ++ modutils/Config.src | 1 + networking/Config.src | 23 ++++++++++++++++++++++- networking/udhcp/Config.src | 2 ++ procps/Config.src | 4 +++- shell/cttyhack.c | 1 + sysklogd/Config.src | 1 + util-linux/Config.src | 27 +++++++++++++++++++++++++++ 19 files changed, 114 insertions(+), 4 deletions(-) (limited to 'libbb') diff --git a/Config.in b/Config.in index eebc9774d..35f43b3cd 100644 --- a/Config.in +++ b/Config.in @@ -47,6 +47,17 @@ config USE_PORTABLE_CODE compiler other than gcc. If you do use gcc, this option may needlessly increase code size. +config PLATFORM_LINUX + bool "Enable Linux-specific applets and features" + default y + help + For the most part, busybox requires only POSIX compatibility + from the target system, but some applets and features use + Linux-specific interfaces. + + Answering 'N' here will disable such applets and hide the + corresponding configuration options. + choice prompt "Buffer allocation policy" default FEATURE_BUFFERS_USE_MALLOC @@ -353,6 +364,7 @@ config FEATURE_SUID_CONFIG_QUIET config SELINUX bool "Support NSA Security Enhanced Linux" default n + depends on PLATFORM_LINUX help Enable support for SELinux in applets ls, ps, and id. Also provide the option of compiling in SELinux applets. diff --git a/console-tools/Config.src b/console-tools/Config.src index 6e3191ada..cdb26800e 100644 --- a/console-tools/Config.src +++ b/console-tools/Config.src @@ -10,6 +10,7 @@ INSERT config CHVT bool "chvt" default y + depends on PLATFORM_LINUX help This program is used to change to another terminal. Example: chvt 4 (change to terminal /dev/tty4) @@ -17,6 +18,7 @@ config CHVT config FGCONSOLE bool "fgconsole" default y + depends on PLATFORM_LINUX help This program prints active (foreground) console number. @@ -29,12 +31,14 @@ config CLEAR config DEALLOCVT bool "deallocvt" default y + depends on PLATFORM_LINUX help This program deallocates unused virtual consoles. config DUMPKMAP bool "dumpkmap" default y + depends on PLATFORM_LINUX help This program dumps the kernel's keyboard translation table to stdout, in binary format. You can then use loadkmap to load it. @@ -42,18 +46,21 @@ config DUMPKMAP config KBD_MODE bool "kbd_mode" default y + depends on PLATFORM_LINUX help This program reports and sets keyboard mode. config LOADFONT bool "loadfont" default y + depends on PLATFORM_LINUX help This program loads a console font from standard input. config LOADKMAP bool "loadkmap" default y + depends on PLATFORM_LINUX help This program loads a keyboard translation table from standard input. @@ -61,6 +68,7 @@ config LOADKMAP config OPENVT bool "openvt" default y + depends on PLATFORM_LINUX help This program is used to start a command on an unused virtual terminal. @@ -92,6 +100,7 @@ config FEATURE_RESIZE_PRINT config SETCONSOLE bool "setconsole" default y + depends on PLATFORM_LINUX help This program redirects the system console to another device, like the current tty while logged in via telnet. @@ -106,6 +115,7 @@ config FEATURE_SETCONSOLE_LONG_OPTIONS config SETFONT bool "setfont" default y + depends on PLATFORM_LINUX help Allows to load console screen map. Useful for i18n. @@ -127,6 +137,7 @@ config DEFAULT_SETFONT_DIR config SETKEYCODES bool "setkeycodes" default y + depends on PLATFORM_LINUX help This program loads entries into the kernel's scancode-to-keycode map, allowing unusual keyboards to generate usable keycodes. @@ -134,12 +145,14 @@ config SETKEYCODES config SETLOGCONS bool "setlogcons" default y + depends on PLATFORM_LINUX help This program redirects the output console of kernel messages. config SHOWKEY bool "showkey" default y + depends on PLATFORM_LINUX help Shows keys pressed. diff --git a/coreutils/Config.src b/coreutils/Config.src index d4c9e0541..780b73fda 100644 --- a/coreutils/Config.src +++ b/coreutils/Config.src @@ -591,6 +591,7 @@ config FEATURE_SPLIT_FANCY config STAT bool "stat" default y + depends on PLATFORM_LINUX # statfs() help display file or filesystem status. @@ -606,6 +607,7 @@ config FEATURE_STAT_FORMAT config STTY bool "stty" default y + depends on PLATFORM_LINUX help stty is used to change and print terminal line settings. diff --git a/coreutils/date.c b/coreutils/date.c index c737f09f3..cb41724af 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -72,7 +72,7 @@ //config:config FEATURE_DATE_NANO //config: bool "Support %[num]N nanosecond format specifier" //config: default n -//config: depends on DATE +//config: depends on DATE && PLATFORM_LINUX # syscall(__NR_clock_gettime) //config: help //config: Support %[num]N format specifier. Adds ~250 bytes of code. //config: diff --git a/e2fsprogs/Config.src b/e2fsprogs/Config.src index 62bc810f8..6043e9b57 100644 --- a/e2fsprogs/Config.src +++ b/e2fsprogs/Config.src @@ -33,6 +33,7 @@ config FSCK config LSATTR bool "lsattr" default y + depends on PLATFORM_LINUX help lsattr lists the file attributes on a second extended file system. diff --git a/init/Config.src b/init/Config.src index 590e29890..a5e76be6a 100644 --- a/init/Config.src +++ b/init/Config.src @@ -10,6 +10,7 @@ INSERT config INIT bool "init" default y + depends on PLATFORM_LINUX select FEATURE_SYSLOG help init is the first program run when the system boots. @@ -92,6 +93,7 @@ config FEATURE_INITRD config HALT bool "poweroff, halt, and reboot" default y + depends on PLATFORM_LINUX help Stop all processes and either halt, reboot, or power off the system. diff --git a/init/bootchartd.c b/init/bootchartd.c index dae2fe6e9..a1c01641b 100644 --- a/init/bootchartd.c +++ b/init/bootchartd.c @@ -6,6 +6,7 @@ //config:config BOOTCHARTD //config: bool "bootchartd" //config: default y +//config: depends on PLATFORM_LINUX //config: help //config: bootchartd is commonly used to profile the boot process //config: for the purpose of speeding it up. In this case, it is started diff --git a/libbb/Config.src b/libbb/Config.src index 09bf89246..9b01757c6 100644 --- a/libbb/Config.src +++ b/libbb/Config.src @@ -153,6 +153,7 @@ config FEATURE_COPYBUF_KB config MONOTONIC_SYSCALL bool "Use clock_gettime(CLOCK_MONOTONIC) syscall" default n + depends on PLATFORM_LINUX help Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring time intervals (time, ping, traceroute etc need this). diff --git a/loginutils/Config.src b/loginutils/Config.src index 5d497c4dc..425d041b9 100644 --- a/loginutils/Config.src +++ b/loginutils/Config.src @@ -179,6 +179,7 @@ config DELUSER config GETTY bool "getty" default y + depends on PLATFORM_LINUX select FEATURE_SYSLOG help getty lets you log in on a tty, it is normally invoked by init. @@ -186,6 +187,7 @@ config GETTY config LOGIN bool "login" default y + depends on PLATFORM_LINUX select FEATURE_SUID select FEATURE_SYSLOG help @@ -295,6 +297,7 @@ config SULOGIN config VLOCK bool "vlock" default y + depends on PLATFORM_LINUX select FEATURE_SUID help Build the "vlock" applet which allows you to lock (virtual) terminals. diff --git a/miscutils/Config.src b/miscutils/Config.src index 2f7c50271..e89e231e6 100644 --- a/miscutils/Config.src +++ b/miscutils/Config.src @@ -10,6 +10,7 @@ INSERT config ADJTIMEX bool "adjtimex" default y + depends on PLATFORM_LINUX help Adjtimex reads and optionally sets adjustment parameters for the Linux clock adjustment algorithm. @@ -24,6 +25,7 @@ config BBCONFIG config BEEP bool "beep" default y + depends on PLATFORM_LINUX help The beep applets beeps in a given freq/Hz. @@ -180,6 +182,7 @@ config FEATURE_DC_LIBM config DEVFSD bool "devfsd (obsolete)" default n + depends on PLATFORM_LINUX select FEATURE_SYSLOG help This is deprecated and should NOT be used anymore. @@ -223,6 +226,7 @@ config DEVFSD_VERBOSE config FEATURE_DEVFS bool "Use devfs names for all devices (obsolete)" default n + depends on PLATFORM_LINUX help This is obsolete and should NOT be used anymore. Use linux >= 2.6 (optionally with hotplug) and mdev instead! @@ -242,6 +246,7 @@ config DEVMEM config EJECT bool "eject" default y + depends on PLATFORM_LINUX help Used to eject cdroms. (defaults to /dev/cdrom) @@ -256,6 +261,7 @@ config FEATURE_EJECT_SCSI config FBSPLASH bool "fbsplash" default y + depends on PLATFORM_LINUX help Shows splash image and progress bar on framebuffer device. Can be used during boot phase of an embedded device. ~2kb. @@ -305,6 +311,7 @@ config FLASH_ERASEALL config IONICE bool "ionice" default y + depends on PLATFORM_LINUX help Set/set program io scheduling class and priority Requires kernel >= 2.6.13 @@ -344,6 +351,11 @@ endchoice config LESS bool "less" default y + depends on PLATFORM_LINUX + depends on PLATFORM_LINUX + depends on PLATFORM_LINUX + depends on PLATFORM_LINUX + depends on PLATFORM_LINUX help 'less' is a pager, meaning that it displays text files. It possesses a wide array of features, and is an improvement over 'more'. @@ -410,6 +422,7 @@ config FEATURE_LESS_LINENUMS config HDPARM bool "hdparm" default y + depends on PLATFORM_LINUX help Get/Set hard drive parameters. Primarily intended for ATA drives. Adds about 13k (or around 30k if you enable the @@ -526,6 +539,7 @@ config MT config RAIDAUTORUN bool "raidautorun" default y + depends on PLATFORM_LINUX help raidautorun tells the kernel md driver to search and start RAID arrays. @@ -533,7 +547,7 @@ config RAIDAUTORUN config READAHEAD bool "readahead" default y - depends on LFS + depends on LFS && PLATFORM_LINUX help Preload the files listed on the command line into RAM cache so that subsequent reads on these files will not block on disk I/O. @@ -550,6 +564,7 @@ config READAHEAD config RFKILL bool "rfkill" default n # doesn't build on Ubuntu 9.04 + depends on PLATFORM_LINUX help Enable/disable wireless devices. @@ -570,6 +585,7 @@ config RUNLEVEL config RX bool "rx" default y + depends on PLATFORM_LINUX help Receive files using the Xmodem protocol. @@ -641,6 +657,7 @@ config WALL config WATCHDOG bool "watchdog" default y + depends on PLATFORM_LINUX help The watchdog utility is used with hardware or software watchdog device drivers. It opens the specified watchdog device special file diff --git a/miscutils/conspy.c b/miscutils/conspy.c index 509a0f271..a173d8efd 100644 --- a/miscutils/conspy.c +++ b/miscutils/conspy.c @@ -17,6 +17,7 @@ //config:config CONSPY //config: bool "conspy" //config: default n +//config: depends on PLATFORM_LINUX //config: help //config: A text-mode VNC like program for Linux virtual terminals. //config: example: conspy NUM shared access to console num diff --git a/miscutils/ubi_attach_detach.c b/miscutils/ubi_attach_detach.c index 7b92a8afc..0d63a10d5 100644 --- a/miscutils/ubi_attach_detach.c +++ b/miscutils/ubi_attach_detach.c @@ -12,12 +12,14 @@ //config:config UBIATTACH //config: bool "ubiattach" //config: default n +//config: depends on PLATFORM_LINUX //config: help //config: Attach MTD device to an UBI device. //config: //config:config UBIDETACH //config: bool "ubidetach" //config: default n +//config: depends on PLATFORM_LINUX //config: help //config: Detach MTD device from an UBI device. diff --git a/modutils/Config.src b/modutils/Config.src index a7dcb3ab3..4191d29f2 100644 --- a/modutils/Config.src +++ b/modutils/Config.src @@ -4,6 +4,7 @@ # menu "Linux Module Utilities" +depends on PLATFORM_LINUX INSERT diff --git a/networking/Config.src b/networking/Config.src index 449436247..26c59e7c1 100644 --- a/networking/Config.src +++ b/networking/Config.src @@ -43,6 +43,7 @@ config FEATURE_PREFER_IPV4_ADDRESS config VERBOSE_RESOLUTION_ERRORS bool "Verbose resolution errors" default n + depends on PLATFORM_LINUX #because of xsocket() in libbb/xfuncs_prinf.c help Enable if you are not satisfied with simplistic "can't resolve 'hostname.com'" and want to know more. @@ -51,18 +52,21 @@ config VERBOSE_RESOLUTION_ERRORS config ARP bool "arp" default y + depends on PLATFORM_LINUX help Manipulate the system ARP cache. config ARPING bool "arping" default y + depends on PLATFORM_LINUX help Ping hosts by ARP packets. config BRCTL bool "brctl" default y + depends on PLATFORM_LINUX help Manage ethernet bridges. Supports addbr/delbr and addif/delif. @@ -95,6 +99,7 @@ config DNSD config ETHER_WAKE bool "ether-wake" default y + depends on PLATFORM_LINUX help Send a magic packet to wake up sleeping machines. @@ -269,6 +274,7 @@ config FEATURE_HTTPD_PROXY config IFCONFIG bool "ifconfig" default y + depends on PLATFORM_LINUX help Ifconfig is used to configure the kernel-resident network interfaces. @@ -316,6 +322,7 @@ config FEATURE_IFCONFIG_BROADCAST_PLUS config IFENSLAVE bool "ifenslave" default y + depends on PLATFORM_LINUX help Userspace application to bind several interfaces to a logical interface (use with kernel bonding driver). @@ -323,6 +330,7 @@ config IFENSLAVE config IFPLUGD bool "ifplugd" default y + depends on PLATFORM_LINUX help Network interface plug detection daemon. @@ -364,7 +372,7 @@ config FEATURE_IFUPDOWN_IP config FEATURE_IFUPDOWN_IP_BUILTIN bool "Use busybox ip applet" default y - depends on FEATURE_IFUPDOWN_IP + depends on FEATURE_IFUPDOWN_IP && PLATFORM_LINUX select IP select FEATURE_IP_ADDRESS select FEATURE_IP_LINK @@ -483,6 +491,7 @@ config FEATURE_INETD_RPC config IP bool "ip" default y + depends on PLATFORM_LINUX help The "ip" applet is a TCP/IP interface configuration and routing utility. You generally don't need "ip" to use busybox with @@ -598,6 +607,7 @@ config FEATURE_IPCALC_LONG_OPTIONS config NAMEIF bool "nameif" default y + depends on PLATFORM_LINUX select FEATURE_SYSLOG help nameif is used to rename network interface by its MAC address. @@ -626,6 +636,7 @@ config FEATURE_NAMEIF_EXTENDED config NETSTAT bool "netstat" default y + depends on PLATFORM_LINUX help netstat prints information about the Linux networking subsystem. @@ -654,6 +665,7 @@ config NSLOOKUP config NTPD bool "ntpd" default y + depends on PLATFORM_LINUX help The NTP client/server daemon. @@ -668,6 +680,7 @@ config FEATURE_NTPD_SERVER config PING bool "ping" default y + depends on PLATFORM_LINUX help ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. @@ -696,12 +709,14 @@ config PSCAN config ROUTE bool "route" default y + depends on PLATFORM_LINUX help Route displays or manipulates the kernel's IP routing tables. config SLATTACH bool "slattach" default y + depends on PLATFORM_LINUX help slattach is a small utility to attach network interfaces to serial lines. @@ -719,6 +734,7 @@ config SLATTACH config TCPSVD bool "tcpsvd" default y + depends on PLATFORM_LINUX help tcpsvd listens on a TCP port and runs a program for each new connection. @@ -888,6 +904,7 @@ config TFTP_DEBUG config TRACEROUTE bool "traceroute" default y + depends on PLATFORM_LINUX help Utility to trace the route of IP packets. @@ -924,6 +941,7 @@ config FEATURE_TRACEROUTE_USE_ICMP config TUNCTL bool "tunctl" default y + depends on PLATFORM_LINUX help tunctl creates or deletes tun devices. @@ -949,6 +967,7 @@ config IFUPDOWN_UDHCPC_CMD_OPTIONS config UDPSVD bool "udpsvd" default y + depends on PLATFORM_LINUX help udpsvd listens on an UDP port and runs a program for each new connection. @@ -956,6 +975,7 @@ config UDPSVD config VCONFIG bool "vconfig" default y + depends on PLATFORM_LINUX help Creates, removes, and configures VLAN interfaces @@ -990,6 +1010,7 @@ config FEATURE_WGET_LONG_OPTIONS config ZCIP bool "zcip" default y + depends on PLATFORM_LINUX select FEATURE_SYSLOG help ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927. diff --git a/networking/udhcp/Config.src b/networking/udhcp/Config.src index aac88569b..331dffc2e 100644 --- a/networking/udhcp/Config.src +++ b/networking/udhcp/Config.src @@ -8,6 +8,7 @@ INSERT config UDHCPD bool "udhcp server (udhcpd)" default y + depends on PLATFORM_LINUX help udhcpd is a DHCP server geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. @@ -51,6 +52,7 @@ config DHCPD_LEASES_FILE config UDHCPC bool "udhcp client (udhcpc)" default y + depends on PLATFORM_LINUX help udhcpc is a DHCP client geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. diff --git a/procps/Config.src b/procps/Config.src index e61de5614..1ff6dfd30 100644 --- a/procps/Config.src +++ b/procps/Config.src @@ -10,6 +10,7 @@ INSERT config FREE bool "free" default y + depends on PLATFORM_LINUX #sysinfo() help free displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. @@ -104,7 +105,7 @@ config FEATURE_PS_WIDE config FEATURE_PS_TIME bool "Enable time and elapsed time output" default y - depends on PS && DESKTOP + depends on PS && DESKTOP && PLATFORM_LINUX #sysinfo() help Support -o time and -o etime output specifiers. @@ -200,6 +201,7 @@ config FEATURE_SHOW_THREADS config UPTIME bool "uptime" default y + depends on PLATFORM_LINUX #sysinfo() help uptime gives a one line display of the current time, how long the system has been running, how many users are currently logged diff --git a/shell/cttyhack.c b/shell/cttyhack.c index 7af13fdfd..a80d49dc3 100644 --- a/shell/cttyhack.c +++ b/shell/cttyhack.c @@ -13,6 +13,7 @@ //config:config CTTYHACK //config: bool "cttyhack" //config: default y +//config: depends on PLATFORM_LINUX //config: help //config: One common problem reported on the mailing list is "can't access tty; //config: job control turned off" error message which typically appears when diff --git a/sysklogd/Config.src b/sysklogd/Config.src index 6d574abb1..bfe2d1cc3 100644 --- a/sysklogd/Config.src +++ b/sysklogd/Config.src @@ -109,6 +109,7 @@ config FEATURE_LOGREAD_REDUCED_LOCKING config KLOGD bool "klogd" default y + depends on PLATFORM_LINUX help klogd is a utility which intercepts and logs all messages from the Linux kernel and sends the messages diff --git a/util-linux/Config.src b/util-linux/Config.src index 91d1fc2ce..98953c17b 100644 --- a/util-linux/Config.src +++ b/util-linux/Config.src @@ -10,6 +10,7 @@ INSERT config ACPID bool "acpid" default y + depends on PLATFORM_LINUX help acpid listens to ACPI events coming either in textual form from /proc/acpi/event (though it is marked deprecated it is still widely @@ -32,6 +33,7 @@ config FEATURE_ACPID_COMPAT config BLKID bool "blkid" default y + depends on PLATFORM_LINUX select VOLUMEID help Lists labels and UUIDs of all filesystems. @@ -41,6 +43,7 @@ config BLKID config DMESG bool "dmesg" default y + depends on PLATFORM_LINUX help dmesg is used to examine or control the kernel ring buffer. When the Linux kernel prints messages to the system log, they are stored in @@ -74,6 +77,7 @@ config FEATURE_DMESG_PRETTY config FBSET bool "fbset" default y + depends on PLATFORM_LINUX help fbset is used to show or change the settings of a Linux frame buffer device. The frame buffer device provides a simple and unique @@ -102,6 +106,7 @@ config FEATURE_FBSET_READMODE config FDFLUSH bool "fdflush" default y + depends on PLATFORM_LINUX help fdflush is only needed when changing media on slightly-broken removable media drives. It is used to make Linux believe that a @@ -114,12 +119,14 @@ config FDFLUSH config FDFORMAT bool "fdformat" default y + depends on PLATFORM_LINUX help fdformat is used to low-level format a floppy disk. config FDISK bool "fdisk" default y + depends on PLATFORM_LINUX help The fdisk utility is used to divide hard disks into one or more logical disks, which are generally called partitions. This utility @@ -187,6 +194,7 @@ config FEATURE_FDISK_ADVANCED config FINDFS bool "findfs" default y + depends on PLATFORM_LINUX select VOLUMEID help Prints the name of a filesystem with given label or UUID. @@ -202,6 +210,7 @@ config FLOCK config FREERAMDISK bool "freeramdisk" default y + depends on PLATFORM_LINUX help Linux allows you to create ramdisks. This utility allows you to delete them and completely free all memory that was used for the @@ -224,12 +233,14 @@ config FSCK_MINIX config MKFS_EXT2 bool "mkfs_ext2" default y + depends on PLATFORM_LINUX help Utility to create EXT2 filesystems. config MKFS_MINIX bool "mkfs_minix" default y + depends on PLATFORM_LINUX help The minix filesystem is a nice, small, compact, read-write filesystem with little overhead. If you wish to be able to create minix @@ -247,6 +258,7 @@ config FEATURE_MINIX2 config MKFS_REISER bool "mkfs_reiser" default n + depends on PLATFORM_LINUX help Utility to create ReiserFS filesystems. Note: this applet needs a lot of testing and polishing. @@ -254,6 +266,7 @@ config MKFS_REISER config MKFS_VFAT bool "mkfs_vfat" default y + depends on PLATFORM_LINUX help Utility to create FAT32 filesystems. @@ -302,6 +315,7 @@ config HD config HWCLOCK bool "hwclock" default y + depends on PLATFORM_LINUX help The hwclock utility is used to read and set the hardware clock on a system. This is primarily used to set the current time on @@ -341,6 +355,7 @@ config IPCRM config IPCS bool "ipcs" default y + depends on PLATFORM_LINUX select FEATURE_SUID help The ipcs utility is used to provide information on the currently @@ -349,6 +364,7 @@ config IPCS config LOSETUP bool "losetup" default y + depends on PLATFORM_LINUX help losetup is used to associate or detach a loop device with a regular file or block device, and to query the status of a loop device. This @@ -357,6 +373,7 @@ config LOSETUP config LSPCI bool "lspci" default y + #depends on PLATFORM_LINUX help lspci is a utility for displaying information about PCI buses in the system and devices connected to them. @@ -366,6 +383,7 @@ config LSPCI config LSUSB bool "lsusb" default y + #depends on PLATFORM_LINUX help lsusb is a utility for displaying information about USB buses in the system and devices connected to them. @@ -375,6 +393,7 @@ config LSUSB config MDEV bool "mdev" default y + depends on PLATFORM_LINUX help mdev is a mini-udev implementation for dynamically creating device nodes in the /dev directory. @@ -473,6 +492,7 @@ config FEATURE_USE_TERMIOS config MOUNT bool "mount" default y + depends on PLATFORM_LINUX help All files and filesystems in Unix are arranged into one big directory tree. The 'mount' utility is used to graft a filesystem onto a @@ -555,6 +575,7 @@ config FEATURE_MOUNT_FSTAB config PIVOT_ROOT bool "pivot_root" default y + depends on PLATFORM_LINUX help The pivot_root utility swaps the mount points for the root filesystem with some other mounted filesystem. This allows you to do all sorts @@ -582,12 +603,14 @@ config RDEV config READPROFILE bool "readprofile" default y + #depends on PLATFORM_LINUX help This allows you to parse /proc/profile for basic profiling. config RTCWAKE bool "rtcwake" default y + depends on PLATFORM_LINUX help Enter a system sleep state until specified wakeup time. @@ -607,6 +630,7 @@ config SCRIPTREPLAY config SETARCH bool "setarch" default y + depends on PLATFORM_LINUX help The linux32 utility is used to create a 32bit environment for the specified program (usually a shell). It only makes sense to have @@ -616,6 +640,7 @@ config SETARCH config SWAPONOFF bool "swaponoff" default y + depends on PLATFORM_LINUX help This option enables both the 'swapon' and the 'swapoff' utilities. Once you have created some swap space using 'mkswap', you also need @@ -634,6 +659,7 @@ config FEATURE_SWAPON_PRI config SWITCH_ROOT bool "switch_root" default y + depends on PLATFORM_LINUX help The switch_root utility is used from initramfs to select a new root device. Under initramfs, you have to use this instead of @@ -653,6 +679,7 @@ config SWITCH_ROOT config UMOUNT bool "umount" default y + depends on PLATFORM_LINUX help When you want to remove a mounted filesystem from its current mount point, for example when you are shutting down the system, the -- cgit v1.2.3-55-g6feb From 84b01d5afc8230c79a1b8469c222d940c0d4e792 Mon Sep 17 00:00:00 2001 From: Jeremie Koenig Date: Thu, 27 May 2010 15:46:33 +0200 Subject: mkdir: fix -p on FreeBSD This patch is libbb.make_directory.diff from Debian kFreeBSD at: http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian Signed-off-by: Jeremie Koenig Signed-off-by: Denys Vlasenko --- libbb/make_directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/make_directory.c b/libbb/make_directory.c index 4486eb1ed..6dd04cf99 100644 --- a/libbb/make_directory.c +++ b/libbb/make_directory.c @@ -86,7 +86,7 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags) if (mkdir(path, 0777) < 0) { /* If we failed for any other reason than the directory * already exists, output a diagnostic and return -1 */ - if (errno != EEXIST + if ((errno != EEXIST && errno != EISDIR) || !(flags & FILEUTILS_RECUR) || ((stat(path, &st) < 0) || !S_ISDIR(st.st_mode)) ) { -- cgit v1.2.3-55-g6feb From 29885114a5e3d22ee7aa3ab0e373e00e7cff443c Mon Sep 17 00:00:00 2001 From: Jeremie Koenig Date: Thu, 27 May 2010 15:39:24 +0200 Subject: libbb: conditionalize AF_* usage in error reporting Signed-off-by: Jeremie Koenig Signed-off-by: Denys Vlasenko --- libbb/xfuncs_printf.c | 4 ++++ networking/Config.src | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c index 7069a7c8e..91f7ba22c 100644 --- a/libbb/xfuncs_printf.c +++ b/libbb/xfuncs_printf.c @@ -387,8 +387,12 @@ int FAST_FUNC xsocket(int domain, int type, int protocol) /* Hijack vaguely related config option */ #if ENABLE_VERBOSE_RESOLUTION_ERRORS const char *s = "INET"; +# ifdef AF_PACKET if (domain == AF_PACKET) s = "PACKET"; +# endif +# ifdef AF_NETLINK if (domain == AF_NETLINK) s = "NETLINK"; +# endif IF_FEATURE_IPV6(if (domain == AF_INET6) s = "INET6";) bb_perror_msg_and_die("socket(AF_%s,%d,%d)", s, type, protocol); #else diff --git a/networking/Config.src b/networking/Config.src index 26c59e7c1..fc613e8d3 100644 --- a/networking/Config.src +++ b/networking/Config.src @@ -43,7 +43,6 @@ config FEATURE_PREFER_IPV4_ADDRESS config VERBOSE_RESOLUTION_ERRORS bool "Verbose resolution errors" default n - depends on PLATFORM_LINUX #because of xsocket() in libbb/xfuncs_prinf.c help Enable if you are not satisfied with simplistic "can't resolve 'hostname.com'" and want to know more. -- cgit v1.2.3-55-g6feb From 451add4f23c14459734e05104ea0bc5ed4de39ee Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 25 Jul 2010 00:06:41 +0200 Subject: lineedit: mostly revert recent wrong logic in "ask terminal" code Signed-off-by: Denys Vlasenko --- libbb/lineedit.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index a62ab6d29..6df556f4e 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -149,7 +149,6 @@ struct lineedit_statics { CHAR_T delbuf[DELBUFSIZ]; /* a place to store deleted characters */ #endif #if ENABLE_FEATURE_EDITING_ASK_TERMINAL - smallint unknown_width; smallint sent_ESC_br6n; #endif @@ -1611,16 +1610,14 @@ static void ask_terminal(void) * poll([{fd=0, events=POLLIN}], 1, 4294967295) = 1 ([{fd=0, revents=POLLIN}]) * read(0, "\n", 1) = 1 <-- oh crap, user's input got in first */ - if (S.unknown_width) { /* only if window size is not known */ - struct pollfd pfd; - - pfd.fd = STDIN_FILENO; - pfd.events = POLLIN; - if (safe_poll(&pfd, 1, 0) == 0) { - S.sent_ESC_br6n = 1; - fputs("\033" "[6n", stdout); - fflush_all(); /* make terminal see it ASAP! */ - } + struct pollfd pfd; + + pfd.fd = STDIN_FILENO; + pfd.events = POLLIN; + if (safe_poll(&pfd, 1, 0) == 0) { + S.sent_ESC_br6n = 1; + fputs("\033" "[6n", stdout); + fflush_all(); /* make terminal see it ASAP! */ } } #else @@ -1768,7 +1765,7 @@ static void win_changed(int nsig) { int sv_errno = errno; unsigned width; - IF_FEATURE_EDITING_ASK_TERMINAL(S.unknown_width =) get_terminal_width_height(0, &width, NULL); + get_terminal_width_height(0, &width, NULL); cmdedit_setwidth(width, nsig /* - just a yes/no flag */); if (nsig == SIGWINCH) signal(SIGWINCH, win_changed); /* rearm ourself */ -- 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 'libbb') 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