aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-07-25 00:13:27 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-07-25 00:13:27 +0200
commit503a07cab24a1e58099a04970babd2b761469449 (patch)
treef96b01fd405adcbcbeed0086389da27bd1a07ccc
parentb2d95147c989448f23cc59c63b83e2d89f0bd9cd (diff)
downloadbusybox-w32-503a07cab24a1e58099a04970babd2b761469449.tar.gz
busybox-w32-503a07cab24a1e58099a04970babd2b761469449.tar.bz2
busybox-w32-503a07cab24a1e58099a04970babd2b761469449.zip
Apply post-1.17.0 fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--Config.in3
-rwxr-xr-xapplets/usage_compressed6
-rw-r--r--archival/Config.src2
-rw-r--r--archival/tar.c2
-rw-r--r--archival/unzip_doc.txt.bz2bin11359 -> 0 bytes
-rw-r--r--coreutils/dos2unix.c2
-rw-r--r--coreutils/realpath.c2
-rw-r--r--debianutils/mktemp.c3
-rw-r--r--e2fsprogs/Config.src2
-rw-r--r--editors/diff.c27
-rw-r--r--editors/vi.c20
-rw-r--r--init/bootchartd.c4
-rw-r--r--libbb/Config.src2
-rw-r--r--libbb/lineedit.c2
-rw-r--r--miscutils/Config.src14
-rw-r--r--modutils/depmod.c76
-rw-r--r--modutils/modprobe.c10
-rw-r--r--networking/ip.c62
-rw-r--r--networking/nc.c2
-rw-r--r--networking/wget.c2
-rw-r--r--procps/top.c8
-rw-r--r--scripts/Makefile.build7
-rwxr-xr-xscripts/gen_build_files.sh7
-rwxr-xr-xscripts/test_make_O11
-rwxr-xr-xtestsuite/diff.tests31
-rw-r--r--util-linux/Config.src435
-rw-r--r--util-linux/acpid.c18
-rw-r--r--util-linux/fdisk.c2
-rw-r--r--util-linux/more.c4
29 files changed, 430 insertions, 336 deletions
diff --git a/Config.in b/Config.in
index fc02a2d93..fe64f2b3f 100644
--- a/Config.in
+++ b/Config.in
@@ -15,7 +15,7 @@ menu "General Configuration"
15 15
16config DESKTOP 16config DESKTOP
17 bool "Enable options for full-blown desktop systems" 17 bool "Enable options for full-blown desktop systems"
18 default n 18 default y
19 help 19 help
20 Enable options and features which are not essential. 20 Enable options and features which are not essential.
21 Select this only if you plan to use busybox on full-blown 21 Select this only if you plan to use busybox on full-blown
@@ -138,6 +138,7 @@ config UNICODE_USING_LOCALE
138 help 138 help
139 With this option on, Unicode support is implemented using libc 139 With this option on, Unicode support is implemented using libc
140 routines. Otherwise, internal implementation is used. 140 routines. Otherwise, internal implementation is used.
141 Internal implementation is smaller.
141 142
142config FEATURE_CHECK_UNICODE_IN_ENV 143config FEATURE_CHECK_UNICODE_IN_ENV
143 bool "Check $LANG environment variable" 144 bool "Check $LANG environment variable"
diff --git a/applets/usage_compressed b/applets/usage_compressed
index 9ddf16d38..e1fd0d94d 100755
--- a/applets/usage_compressed
+++ b/applets/usage_compressed
@@ -40,8 +40,4 @@ echo '#define PACKED_USAGE \'
40 -e 's/$/ \\/' 40 -e 's/$/ \\/'
41echo '' 41echo ''
42 42
43if cmp -s "$target.$$" "$target" 2>/dev/null; then 43mv -- "$target.$$" "$target"
44 rm -- "$target.$$"
45else
46 mv -- "$target.$$" "$target"
47fi
diff --git a/archival/Config.src b/archival/Config.src
index f64b3347b..9a84fd6c6 100644
--- a/archival/Config.src
+++ b/archival/Config.src
@@ -39,7 +39,7 @@ config FEATURE_SEAMLESS_Z
39 39
40config AR 40config AR
41 bool "ar" 41 bool "ar"
42 default y 42 default n # needs to be improved to be able to replace binutils ar
43 help 43 help
44 ar is an archival utility program used to create, modify, and 44 ar is an archival utility program used to create, modify, and
45 extract contents from archives. An archive is a single file holding 45 extract contents from archives. An archive is a single file holding
diff --git a/archival/tar.c b/archival/tar.c
index 9dd74536e..5ddff7fa5 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -237,7 +237,7 @@ static int writeTarHeader(struct TarBallInfo *tbInfo,
237 struct tar_header_t header; 237 struct tar_header_t header;
238 238
239 memset(&header, 0, sizeof(header)); 239 memset(&header, 0, sizeof(header));
240 240
241 strncpy(header.name, header_name, sizeof(header.name)); 241 strncpy(header.name, header_name, sizeof(header.name));
242 242
243 /* POSIX says to mask mode with 07777. */ 243 /* POSIX says to mask mode with 07777. */
diff --git a/archival/unzip_doc.txt.bz2 b/archival/unzip_doc.txt.bz2
deleted file mode 100644
index ab77d10da..000000000
--- a/archival/unzip_doc.txt.bz2
+++ /dev/null
Binary files differ
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index 1911f5319..e06ecc4e0 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -92,7 +92,7 @@ int dos2unix_main(int argc UNUSED_PARAM, char **argv)
92 do { 92 do {
93 /* might be convert(NULL) if there is no filename given */ 93 /* might be convert(NULL) if there is no filename given */
94 convert(*argv, conv_type); 94 convert(*argv, conv_type);
95 } while (*++argv); 95 } while (*argv && *++argv);
96 96
97 return 0; 97 return 0;
98} 98}
diff --git a/coreutils/realpath.c b/coreutils/realpath.c
index 90a71ed7d..3bc40ee04 100644
--- a/coreutils/realpath.c
+++ b/coreutils/realpath.c
@@ -23,7 +23,7 @@ int realpath_main(int argc UNUSED_PARAM, char **argv)
23 23
24 do { 24 do {
25 char *resolved_path = xmalloc_realpath(*argv); 25 char *resolved_path = xmalloc_realpath(*argv);
26 if (resolved_path != NULL) { 26 if (resolved_path != NULL) {
27 puts(resolved_path); 27 puts(resolved_path);
28 free(resolved_path); 28 free(resolved_path);
29 } else { 29 } else {
diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c
index c40211476..2c4e19670 100644
--- a/debianutils/mktemp.c
+++ b/debianutils/mktemp.c
@@ -50,7 +50,8 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv)
50 opts = getopt32(argv, "dqtp:", &path); 50 opts = getopt32(argv, "dqtp:", &path);
51 51
52 chp = argv[optind] ? argv[optind] : xstrdup("tmp.XXXXXX"); 52 chp = argv[optind] ? argv[optind] : xstrdup("tmp.XXXXXX");
53 chp = concat_path_file(path, chp); 53 if (chp[0] != '/' || (opts & 8))
54 chp = concat_path_file(path, chp);
54 55
55 if (opts & 1) { /* -d */ 56 if (opts & 1) { /* -d */
56 if (mkdtemp(chp) == NULL) 57 if (mkdtemp(chp) == NULL)
diff --git a/e2fsprogs/Config.src b/e2fsprogs/Config.src
index f362c6b0a..62bc810f8 100644
--- a/e2fsprogs/Config.src
+++ b/e2fsprogs/Config.src
@@ -45,7 +45,7 @@ config LSATTR
45 45
46config TUNE2FS 46config TUNE2FS
47 bool "tune2fs" 47 bool "tune2fs"
48 default y 48 default n # off: it is too limited compared to upstream version
49 help 49 help
50 tune2fs allows the system administrator to adjust various tunable 50 tune2fs allows the system administrator to adjust various tunable
51 filesystem parameters on Linux ext2/ext3 filesystems. 51 filesystem parameters on Linux ext2/ext3 filesystems.
diff --git a/editors/diff.c b/editors/diff.c
index 07594e8d8..a3ca2b660 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -121,6 +121,7 @@ typedef struct FILE_and_pos_t {
121struct globals { 121struct globals {
122 smallint exit_status; 122 smallint exit_status;
123 int opt_U_context; 123 int opt_U_context;
124 const char *other_dir;
124 char *label[2]; 125 char *label[2];
125 struct stat stb[2]; 126 struct stat stb[2];
126}; 127};
@@ -760,9 +761,11 @@ static int FAST_FUNC add_to_dirlist(const char *filename,
760 void *userdata, int depth UNUSED_PARAM) 761 void *userdata, int depth UNUSED_PARAM)
761{ 762{
762 struct dlist *const l = userdata; 763 struct dlist *const l = userdata;
764 const char *file = filename + l->len;
765 while (*file == '/')
766 file++;
763 l->dl = xrealloc_vector(l->dl, 6, l->e); 767 l->dl = xrealloc_vector(l->dl, 6, l->e);
764 /* + 1 skips "/" after dirname */ 768 l->dl[l->e] = xstrdup(file);
765 l->dl[l->e] = xstrdup(filename + l->len + 1);
766 l->e++; 769 l->e++;
767 return TRUE; 770 return TRUE;
768} 771}
@@ -778,6 +781,25 @@ static int FAST_FUNC skip_dir(const char *filename,
778 add_to_dirlist(filename, sb, userdata, depth); 781 add_to_dirlist(filename, sb, userdata, depth);
779 return SKIP; 782 return SKIP;
780 } 783 }
784 if (!(option_mask32 & FLAG(N))) {
785 /* -r without -N: no need to recurse into dirs
786 * which do not exist on the "other side".
787 * Testcase: diff -r /tmp /
788 * (it would recurse deep into /proc without this code) */
789 struct dlist *const l = userdata;
790 filename += l->len;
791 if (filename[0]) {
792 struct stat osb;
793 char *othername = concat_path_file(G.other_dir, filename);
794 int r = stat(othername, &osb);
795 free(othername);
796 if (r != 0 || !S_ISDIR(osb.st_mode)) {
797 /* other dir doesn't have similarly named
798 * directory, don't recurse */
799 return SKIP;
800 }
801 }
802 }
781 return TRUE; 803 return TRUE;
782} 804}
783 805
@@ -791,6 +813,7 @@ static void diffdir(char *p[2], const char *s_start)
791 /*list[i].s = list[i].e = 0; - memset did it */ 813 /*list[i].s = list[i].e = 0; - memset did it */
792 /*list[i].dl = NULL; */ 814 /*list[i].dl = NULL; */
793 815
816 G.other_dir = p[1 - i];
794 /* We need to trim root directory prefix. 817 /* We need to trim root directory prefix.
795 * Using list.len to specify its length, 818 * Using list.len to specify its length,
796 * add_to_dirlist will remove it. */ 819 * add_to_dirlist will remove it. */
diff --git a/editors/vi.c b/editors/vi.c
index 0f412c362..73e095cf8 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -504,20 +504,17 @@ static int init_text_buffer(char *fn)
504} 504}
505 505
506#if ENABLE_FEATURE_VI_WIN_RESIZE 506#if ENABLE_FEATURE_VI_WIN_RESIZE
507static void query_screen_dimensions(void) 507static int query_screen_dimensions(void)
508{ 508{
509# if ENABLE_FEATURE_VI_ASK_TERMINAL 509 int err = get_terminal_width_height(STDIN_FILENO, &columns, &rows);
510 if (!G.get_rowcol_error)
511 G.get_rowcol_error =
512# endif
513 get_terminal_width_height(STDIN_FILENO, &columns, &rows);
514 if (rows > MAX_SCR_ROWS) 510 if (rows > MAX_SCR_ROWS)
515 rows = MAX_SCR_ROWS; 511 rows = MAX_SCR_ROWS;
516 if (columns > MAX_SCR_COLS) 512 if (columns > MAX_SCR_COLS)
517 columns = MAX_SCR_COLS; 513 columns = MAX_SCR_COLS;
514 return err;
518} 515}
519#else 516#else
520# define query_screen_dimensions() ((void)0) 517# define query_screen_dimensions() (0)
521#endif 518#endif
522 519
523static void edit_file(char *fn) 520static void edit_file(char *fn)
@@ -536,7 +533,7 @@ static void edit_file(char *fn)
536 rows = 24; 533 rows = 24;
537 columns = 80; 534 columns = 80;
538 size = 0; 535 size = 0;
539 query_screen_dimensions(); 536 IF_FEATURE_VI_ASK_TERMINAL(G.get_rowcol_error =) query_screen_dimensions();
540#if ENABLE_FEATURE_VI_ASK_TERMINAL 537#if ENABLE_FEATURE_VI_ASK_TERMINAL
541 if (G.get_rowcol_error /* TODO? && no input on stdin */) { 538 if (G.get_rowcol_error /* TODO? && no input on stdin */) {
542 uint64_t k; 539 uint64_t k;
@@ -546,9 +543,12 @@ static void edit_file(char *fn)
546 if ((int32_t)k == KEYCODE_CURSOR_POS) { 543 if ((int32_t)k == KEYCODE_CURSOR_POS) {
547 uint32_t rc = (k >> 32); 544 uint32_t rc = (k >> 32);
548 columns = (rc & 0x7fff); 545 columns = (rc & 0x7fff);
546 if (columns > MAX_SCR_COLS)
547 columns = MAX_SCR_COLS;
549 rows = ((rc >> 16) & 0x7fff); 548 rows = ((rc >> 16) & 0x7fff);
549 if (rows > MAX_SCR_ROWS)
550 rows = MAX_SCR_ROWS;
550 } 551 }
551 query_screen_dimensions();
552 } 552 }
553#endif 553#endif
554 new_screen(rows, columns); // get memory for virtual screen 554 new_screen(rows, columns); // get memory for virtual screen
@@ -2797,7 +2797,7 @@ static void refresh(int full_screen)
2797 int li, changed; 2797 int li, changed;
2798 char *tp, *sp; // pointer into text[] and screen[] 2798 char *tp, *sp; // pointer into text[] and screen[]
2799 2799
2800 if (ENABLE_FEATURE_VI_WIN_RESIZE) { 2800 if (ENABLE_FEATURE_VI_WIN_RESIZE IF_FEATURE_VI_ASK_TERMINAL(&& !G.get_rowcol_error) ) {
2801 unsigned c = columns, r = rows; 2801 unsigned c = columns, r = rows;
2802 query_screen_dimensions(); 2802 query_screen_dimensions();
2803 full_screen |= (c - columns) | (r - rows); 2803 full_screen |= (c - columns) | (r - rows);
diff --git a/init/bootchartd.c b/init/bootchartd.c
index b3e08af92..dae2fe6e9 100644
--- a/init/bootchartd.c
+++ b/init/bootchartd.c
@@ -18,7 +18,7 @@
18//config: and stopped using bootchartd stop. 18//config: and stopped using bootchartd stop.
19//config: 19//config:
20//config:config FEATURE_BOOTCHARTD_BLOATED_HEADER 20//config:config FEATURE_BOOTCHARTD_BLOATED_HEADER
21//config: bool "bootchartd" 21//config: bool "Compatible, bloated header"
22//config: default y 22//config: default y
23//config: depends on BOOTCHARTD 23//config: depends on BOOTCHARTD
24//config: help 24//config: help
@@ -35,7 +35,7 @@
35//config: makes bootchartd applet to dump a subset of it. 35//config: makes bootchartd applet to dump a subset of it.
36//config: 36//config:
37//config:config FEATURE_BOOTCHARTD_CONFIG_FILE 37//config:config FEATURE_BOOTCHARTD_CONFIG_FILE
38//config: bool "bootchartd" 38//config: bool "Support bootchartd.conf"
39//config: default y 39//config: default y
40//config: depends on BOOTCHARTD 40//config: depends on BOOTCHARTD
41//config: help 41//config: help
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
98 98
99config FEATURE_EDITING_FANCY_PROMPT 99config FEATURE_EDITING_FANCY_PROMPT
100 bool "Fancy shell prompts" 100 bool "Fancy shell prompts"
101 default n 101 default y
102 depends on FEATURE_EDITING 102 depends on FEATURE_EDITING
103 help 103 help
104 Setting this option allows for prompts to use things like \w and 104 Setting this option allows for prompts to use things like \w and
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 8a2ea7974..a9b790cf7 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1765,11 +1765,13 @@ static void cmdedit_setwidth(unsigned w, int redraw_flg)
1765 1765
1766static void win_changed(int nsig) 1766static void win_changed(int nsig)
1767{ 1767{
1768 int sv_errno = errno;
1768 unsigned width; 1769 unsigned width;
1769 get_terminal_width_height(0, &width, NULL); 1770 get_terminal_width_height(0, &width, NULL);
1770 cmdedit_setwidth(width, nsig /* - just a yes/no flag */); 1771 cmdedit_setwidth(width, nsig /* - just a yes/no flag */);
1771 if (nsig == SIGWINCH) 1772 if (nsig == SIGWINCH)
1772 signal(SIGWINCH, win_changed); /* rearm ourself */ 1773 signal(SIGWINCH, win_changed); /* rearm ourself */
1774 errno = sv_errno;
1773} 1775}
1774 1776
1775static int lineedit_read_key(char *read_key_buffer) 1777static int lineedit_read_key(char *read_key_buffer)
diff --git a/miscutils/Config.src b/miscutils/Config.src
index 012132e7b..2f7c50271 100644
--- a/miscutils/Config.src
+++ b/miscutils/Config.src
@@ -276,28 +276,28 @@ config FBSPLASH
276 276
277config FLASHCP 277config FLASHCP
278 bool "flashcp" 278 bool "flashcp"
279 default y 279 default n # doesn't build on Ubuntu 8.04
280 help 280 help
281 The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7. 281 The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
282 This utility is used to copy images into a MTD device. 282 This utility is used to copy images into a MTD device.
283 283
284config FLASH_LOCK 284config FLASH_LOCK
285 bool "flash_lock" 285 bool "flash_lock"
286 default y 286 default n # doesn't build on Ubuntu 8.04
287 help 287 help
288 The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This 288 The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
289 utility locks part or all of the flash device. 289 utility locks part or all of the flash device.
290 290
291config FLASH_UNLOCK 291config FLASH_UNLOCK
292 bool "flash_unlock" 292 bool "flash_unlock"
293 default y 293 default n # doesn't build on Ubuntu 8.04
294 help 294 help
295 The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This 295 The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
296 utility unlocks part or all of the flash device. 296 utility unlocks part or all of the flash device.
297 297
298config FLASH_ERASEALL 298config FLASH_ERASEALL
299 bool "flash_eraseall" 299 bool "flash_eraseall"
300 default y 300 default n # doesn't build on Ubuntu 8.04
301 help 301 help
302 The flash_eraseall binary from mtd-utils as of git head c4c6a59eb. 302 The flash_eraseall binary from mtd-utils as of git head c4c6a59eb.
303 This utility is used to erase the whole MTD device. 303 This utility is used to erase the whole MTD device.
@@ -311,7 +311,7 @@ config IONICE
311 311
312config INOTIFYD 312config INOTIFYD
313 bool "inotifyd" 313 bool "inotifyd"
314 default y 314 default n # doesn't build on Knoppix 5
315 help 315 help
316 Simple inotify daemon. Reports filesystem changes. Requires 316 Simple inotify daemon. Reports filesystem changes. Requires
317 kernel >= 2.6.13 317 kernel >= 2.6.13
@@ -549,7 +549,7 @@ config READAHEAD
549 549
550config RFKILL 550config RFKILL
551 bool "rfkill" 551 bool "rfkill"
552 default n 552 default n # doesn't build on Ubuntu 9.04
553 help 553 help
554 Enable/disable wireless devices. 554 Enable/disable wireless devices.
555 555
@@ -588,7 +588,7 @@ config STRINGS
588 588
589config TASKSET 589config TASKSET
590 bool "taskset" 590 bool "taskset"
591 default y 591 default n # doesn't build on some non-x86 targets (m68k)
592 help 592 help
593 Retrieve or set a processes's CPU affinity. 593 Retrieve or set a processes's CPU affinity.
594 This requires sched_{g,s}etaffinity support in your libc. 594 This requires sched_{g,s}etaffinity support in your libc.
diff --git a/modutils/depmod.c b/modutils/depmod.c
index c734f142b..694f9ea5a 100644
--- a/modutils/depmod.c
+++ b/modutils/depmod.c
@@ -28,16 +28,6 @@ typedef struct module_info {
28 struct module_info *dnext, *dprev; 28 struct module_info *dnext, *dprev;
29} module_info; 29} module_info;
30 30
31enum {
32 ARG_a = (1<<0), /* All modules, ignore mods in argv */
33 ARG_A = (1<<1), /* Only emit .ko that are newer than modules.dep file */
34 ARG_b = (1<<2), /* base directory when modules are in staging area */
35 ARG_e = (1<<3), /* with -F, print unresolved symbols */
36 ARG_F = (1<<4), /* System.map that contains the symbols */
37 ARG_n = (1<<5), /* dry-run, print to stdout only */
38 ARG_r = (1<<6) /* Compat dummy. Linux Makefile uses it */
39};
40
41static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARAM, 31static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARAM,
42 void *data, int depth UNUSED_PARAM) 32 void *data, int depth UNUSED_PARAM)
43{ 33{
@@ -58,7 +48,7 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA
58 *first = info; 48 *first = info;
59 49
60 info->dnext = info->dprev = info; 50 info->dnext = info->dprev = info;
61 info->name = xasprintf("/%s", fname); 51 info->name = xstrdup(fname + 2); /* skip "./" */
62 info->modname = xstrdup(filename2modname(fname, modname)); 52 info->modname = xstrdup(filename2modname(fname, modname));
63 for (ptr = image; ptr < image + len - 10; ptr++) { 53 for (ptr = image; ptr < image + len - 10; ptr++) {
64 if (strncmp(ptr, "depends=", 8) == 0) { 54 if (strncmp(ptr, "depends=", 8) == 0) {
@@ -134,10 +124,44 @@ static void xfreopen_write(const char *file, FILE *f)
134 bb_perror_msg_and_die("can't open '%s'", file); 124 bb_perror_msg_and_die("can't open '%s'", file);
135} 125}
136 126
127/* Usage:
128 * [-aAenv] [-C FILE or DIR] [-b BASE] [-F System.map] [VERSION] [MODFILES]...
129 * -a --all
130 * Probe all modules. Default if no MODFILES.
131 * -A --quick
132 * Check modules.dep's mtime against module files' mtimes.
133 * -b --basedir BASE
134 * Use $BASE/lib/modules/VERSION
135 * -C --config FILE or DIR
136 * Path to /etc/depmod.conf or /etc/depmod.d/
137 * -e --errsyms
138 * When combined with the -F option, this reports any symbols which
139 * which are not supplied by other modules or kernel.
140 * -F --filesyms System.map
141 * -n --dry-run
142 * Print modules.dep etc to standard output
143 * -v --verbose
144 * Print to stdout all the symbols each module depends on
145 * and the module's file name which provides that symbol.
146 * -r No-op
147 *
148 * So far we only support: [-rn] [-b BASE] [VERSION] [MODFILES]...
149 * -aAeF are accepted but ignored. -vC are not accepted.
150 */
151enum {
152 //OPT_a = (1 << 0), /* All modules, ignore mods in argv */
153 //OPT_A = (1 << 1), /* Only emit .ko that are newer than modules.dep file */
154 OPT_b = (1 << 2), /* base directory when modules are in staging area */
155 //OPT_e = (1 << 3), /* with -F, print unresolved symbols */
156 //OPT_F = (1 << 4), /* System.map that contains the symbols */
157 OPT_n = (1 << 5), /* dry-run, print to stdout only */
158 OPT_r = (1 << 6) /* Compat dummy. Linux Makefile uses it */
159};
160
137int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 161int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
138int depmod_main(int argc UNUSED_PARAM, char **argv) 162int depmod_main(int argc UNUSED_PARAM, char **argv)
139{ 163{
140 module_info *modules = NULL, *m, *dep; 164 module_info *modules, *m, *dep;
141 const char *moddir_base = "/"; 165 const char *moddir_base = "/";
142 char *moddir, *version; 166 char *moddir, *version;
143 struct utsname uts; 167 struct utsname uts;
@@ -152,36 +176,30 @@ int depmod_main(int argc UNUSED_PARAM, char **argv)
152 /* If a version is provided, then that kernel version's module directory 176 /* If a version is provided, then that kernel version's module directory
153 * is used, rather than the current kernel version (as returned by 177 * is used, rather than the current kernel version (as returned by
154 * "uname -r"). */ 178 * "uname -r"). */
155 if (*argv && sscanf(*argv, "%d.%d.%d", &tmp, &tmp, &tmp) == 3) { 179 if (*argv && sscanf(*argv, "%u.%u.%u", &tmp, &tmp, &tmp) == 3) {
156 version = *argv++; 180 version = *argv++;
157 } else { 181 } else {
158 uname(&uts); 182 uname(&uts);
159 version = uts.release; 183 version = uts.release;
160 } 184 }
161 moddir = concat_path_file(&CONFIG_DEFAULT_MODULES_DIR[1], version); 185 moddir = concat_path_file(&CONFIG_DEFAULT_MODULES_DIR[1], version);
186 xchdir(moddir);
187 if (ENABLE_FEATURE_CLEAN_UP)
188 free(moddir);
162 189
163 /* Scan modules */ 190 /* Scan modules */
191 modules = NULL;
164 if (*argv) { 192 if (*argv) {
165 char *modfile;
166 struct stat sb;
167 do { 193 do {
168 modfile = concat_path_file(moddir, *argv); 194 parse_module(*argv, /*sb (unused):*/ NULL, &modules, 0);
169 xstat(modfile, &sb); 195 } while (*++argv);
170 parse_module(modfile, &sb, &modules, 0);
171 free(modfile);
172 } while (*(++argv));
173 } else { 196 } else {
174 recursive_action(moddir, ACTION_RECURSE, 197 recursive_action(".", ACTION_RECURSE,
175 parse_module, NULL, &modules, 0); 198 parse_module, NULL, &modules, 0);
176 } 199 }
177 200
178 /* Prepare for writing out the dep files */
179 xchdir(moddir);
180 if (ENABLE_FEATURE_CLEAN_UP)
181 free(moddir);
182
183 /* Generate dependency and alias files */ 201 /* Generate dependency and alias files */
184 if (!(option_mask32 & ARG_n)) 202 if (!(option_mask32 & OPT_n))
185 xfreopen_write(CONFIG_DEFAULT_DEPMOD_FILE, stdout); 203 xfreopen_write(CONFIG_DEFAULT_DEPMOD_FILE, stdout);
186 for (m = modules; m != NULL; m = m->next) { 204 for (m = modules; m != NULL; m = m->next) {
187 printf("%s:", m->name); 205 printf("%s:", m->name);
@@ -200,7 +218,7 @@ int depmod_main(int argc UNUSED_PARAM, char **argv)
200 } 218 }
201 219
202#if ENABLE_FEATURE_MODUTILS_ALIAS 220#if ENABLE_FEATURE_MODUTILS_ALIAS
203 if (!(option_mask32 & ARG_n)) 221 if (!(option_mask32 & OPT_n))
204 xfreopen_write("modules.alias", stdout); 222 xfreopen_write("modules.alias", stdout);
205 for (m = modules; m != NULL; m = m->next) { 223 for (m = modules; m != NULL; m = m->next) {
206 const char *fname = bb_basename(m->name); 224 const char *fname = bb_basename(m->name);
@@ -218,7 +236,7 @@ int depmod_main(int argc UNUSED_PARAM, char **argv)
218 } 236 }
219#endif 237#endif
220#if ENABLE_FEATURE_MODUTILS_SYMBOLS 238#if ENABLE_FEATURE_MODUTILS_SYMBOLS
221 if (!(option_mask32 & ARG_n)) 239 if (!(option_mask32 & OPT_n))
222 xfreopen_write("modules.symbols", stdout); 240 xfreopen_write("modules.symbols", stdout);
223 for (m = modules; m != NULL; m = m->next) { 241 for (m = modules; m != NULL; m = m->next) {
224 const char *fname = bb_basename(m->name); 242 const char *fname = bb_basename(m->name);
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index b4de65b1f..0a9424293 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -483,6 +483,11 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
483 opt = getopt32(argv, INSMOD_OPTS MODPROBE_OPTS INSMOD_ARGS); 483 opt = getopt32(argv, INSMOD_OPTS MODPROBE_OPTS INSMOD_ARGS);
484 argv += optind; 484 argv += optind;
485 485
486 /* Goto modules location */
487 xchdir(CONFIG_DEFAULT_MODULES_DIR);
488 uname(&uts);
489 xchdir(uts.release);
490
486 if (opt & MODPROBE_OPT_LIST_ONLY) { 491 if (opt & MODPROBE_OPT_LIST_ONLY) {
487 char name[MODULE_NAME_LEN]; 492 char name[MODULE_NAME_LEN];
488 char *colon, *tokens[2]; 493 char *colon, *tokens[2];
@@ -524,11 +529,6 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
524 return EXIT_SUCCESS; 529 return EXIT_SUCCESS;
525 } 530 }
526 531
527 /* Goto modules location */
528 xchdir(CONFIG_DEFAULT_MODULES_DIR);
529 uname(&uts);
530 xchdir(uts.release);
531
532 /* Retrieve module names of already loaded modules */ 532 /* Retrieve module names of already loaded modules */
533 { 533 {
534 char *s; 534 char *s;
diff --git a/networking/ip.c b/networking/ip.c
index 7a0f308f0..3a99fa320 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -1,14 +1,12 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * ip.c "ip" utility frontend. 3 * "ip" utility frontend.
4 * 4 *
5 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. 5 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
6 * 6 *
7 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 7 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
8 *
9 * 8 *
10 * Changes: 9 * Changes:
11 *
12 * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses 10 * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
13 * Bernhard Reutner-Fischer rewrote to use index_in_substr_array 11 * Bernhard Reutner-Fischer rewrote to use index_in_substr_array
14 */ 12 */
@@ -24,12 +22,14 @@
24 || ENABLE_FEATURE_IP_TUNNEL \ 22 || ENABLE_FEATURE_IP_TUNNEL \
25 || ENABLE_FEATURE_IP_RULE 23 || ENABLE_FEATURE_IP_RULE
26 24
27static int NORETURN ip_print_help(char **argv UNUSED_PARAM) 25static int ip_print_help(char **argv UNUSED_PARAM)
28{ 26{
29 bb_show_usage(); 27 bb_show_usage();
30} 28}
31 29
32static int ip_do(int (*ip_func)(char **argv), char **argv) 30typedef int (*ip_func_ptr_t)(char**);
31
32static int ip_do(ip_func_ptr_t ip_func, char **argv)
33{ 33{
34 argv = ip_parse_common_args(argv + 1); 34 argv = ip_parse_common_args(argv + 1);
35 return ip_func(argv); 35 return ip_func(argv);
@@ -78,45 +78,29 @@ int ip_main(int argc UNUSED_PARAM, char **argv)
78 static const char keywords[] ALIGN1 = 78 static const char keywords[] ALIGN1 =
79 IF_FEATURE_IP_ADDRESS("address\0") 79 IF_FEATURE_IP_ADDRESS("address\0")
80 IF_FEATURE_IP_ROUTE("route\0") 80 IF_FEATURE_IP_ROUTE("route\0")
81 IF_FEATURE_IP_ROUTE("r\0")
81 IF_FEATURE_IP_LINK("link\0") 82 IF_FEATURE_IP_LINK("link\0")
82 IF_FEATURE_IP_TUNNEL("tunnel\0" "tunl\0") 83 IF_FEATURE_IP_TUNNEL("tunnel\0")
84 IF_FEATURE_IP_TUNNEL("tunl\0")
83 IF_FEATURE_IP_RULE("rule\0") 85 IF_FEATURE_IP_RULE("rule\0")
84 ; 86 ;
85 enum { 87 static const ip_func_ptr_t ip_func_ptrs[] = {
86 IF_FEATURE_IP_ADDRESS(IP_addr,) 88 ip_print_help,
87 IF_FEATURE_IP_ROUTE(IP_route,) 89 IF_FEATURE_IP_ADDRESS(do_ipaddr,)
88 IF_FEATURE_IP_LINK(IP_link,) 90 IF_FEATURE_IP_ROUTE(do_iproute,)
89 IF_FEATURE_IP_TUNNEL(IP_tunnel, IP_tunl,) 91 IF_FEATURE_IP_ROUTE(do_iproute,)
90 IF_FEATURE_IP_RULE(IP_rule,) 92 IF_FEATURE_IP_LINK(do_iplink,)
91 IP_none 93 IF_FEATURE_IP_TUNNEL(do_iptunnel,)
94 IF_FEATURE_IP_TUNNEL(do_iptunnel,)
95 IF_FEATURE_IP_RULE(do_iprule,)
92 }; 96 };
93 int (*ip_func)(char**) = ip_print_help; 97 ip_func_ptr_t ip_func;
98 int key;
94 99
95 argv = ip_parse_common_args(argv + 1); 100 argv = ip_parse_common_args(argv + 1);
96 if (*argv) { 101 key = *argv ? index_in_substrings(keywords, *argv++) : -1;
97 int key = index_in_substrings(keywords, *argv); 102 ip_func = ip_func_ptrs[key + 1];
98 argv++; 103
99#if ENABLE_FEATURE_IP_ADDRESS
100 if (key == IP_addr)
101 ip_func = do_ipaddr;
102#endif
103#if ENABLE_FEATURE_IP_ROUTE
104 if (key == IP_route)
105 ip_func = do_iproute;
106#endif
107#if ENABLE_FEATURE_IP_LINK
108 if (key == IP_link)
109 ip_func = do_iplink;
110#endif
111#if ENABLE_FEATURE_IP_TUNNEL
112 if (key == IP_tunnel || key == IP_tunl)
113 ip_func = do_iptunnel;
114#endif
115#if ENABLE_FEATURE_IP_RULE
116 if (key == IP_rule)
117 ip_func = do_iprule;
118#endif
119 }
120 return ip_func(argv); 104 return ip_func(argv);
121} 105}
122 106
diff --git a/networking/nc.c b/networking/nc.c
index 0dacaf117..c77137480 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -34,7 +34,7 @@
34//config: 34//config:
35//config:config NC_110_COMPAT 35//config:config NC_110_COMPAT
36//config: bool "Netcat 1.10 compatibility (+2.5k)" 36//config: bool "Netcat 1.10 compatibility (+2.5k)"
37//config: default y 37//config: default n # off specially for Rob
38//config: depends on NC 38//config: depends on NC
39//config: help 39//config: help
40//config: This option makes nc closely follow original nc-1.10. 40//config: This option makes nc closely follow original nc-1.10.
diff --git a/networking/wget.c b/networking/wget.c
index f55b68a38..1f35f8b03 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -50,7 +50,7 @@ static void progress_meter(int flag)
50 } 50 }
51 51
52 bb_progress_update(&G.pmt, G.curfile, G.beg_range, G.transferred, 52 bb_progress_update(&G.pmt, G.curfile, G.beg_range, G.transferred,
53 G.chunked ? 0 : G.content_len + G.beg_range); 53 G.chunked ? 0 : G.beg_range + G.transferred + G.content_len);
54 54
55 if (flag == 0) { 55 if (flag == 0) {
56 /* last call to progress_meter */ 56 /* last call to progress_meter */
diff --git a/procps/top.c b/procps/top.c
index 04dd82633..ec8437442 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -686,10 +686,10 @@ static int topmem_sort(char *a, char *b)
686 n = offsetof(topmem_status_t, vsz) + (sort_field * sizeof(mem_t)); 686 n = offsetof(topmem_status_t, vsz) + (sort_field * sizeof(mem_t));
687 l = *(mem_t*)(a + n); 687 l = *(mem_t*)(a + n);
688 r = *(mem_t*)(b + n); 688 r = *(mem_t*)(b + n);
689// if (l == r) { 689 if (l == r) {
690// l = a->mapped_rw; 690 l = ((topmem_status_t*)a)->dirty;
691// r = b->mapped_rw; 691 r = ((topmem_status_t*)b)->dirty;
692// } 692 }
693 /* We want to avoid unsigned->signed and truncation errors */ 693 /* We want to avoid unsigned->signed and truncation errors */
694 /* l>r: -1, l=r: 0, l<r: 1 */ 694 /* l>r: -1, l=r: 0, l<r: 1 */
695 n = (l > r) ? -1 : (l != r); 695 n = (l > r) ? -1 : (l != r);
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index f343818b1..5685b5bcc 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -13,8 +13,13 @@ __build:
13include scripts/Kbuild.include 13include scripts/Kbuild.include
14 14
15# The filename Kbuild has precedence over Makefile 15# The filename Kbuild has precedence over Makefile
16# bbox: we also try to include Kbuild file in obj tree first
16kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) 17kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
17include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile) 18include $(if $(wildcard $(src)/Kbuild), $(src)/Kbuild, \
19 $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, \
20 $(kbuild-dir)/Makefile \
21 ) \
22 )
18 23
19include scripts/Makefile.lib 24include scripts/Makefile.lib
20 25
diff --git a/scripts/gen_build_files.sh b/scripts/gen_build_files.sh
index a98f509ce..18c172d5a 100755
--- a/scripts/gen_build_files.sh
+++ b/scripts/gen_build_files.sh
@@ -4,6 +4,8 @@ test $# -ge 2 || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
4 4
5# cd to objtree 5# cd to objtree
6cd -- "$2" || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; } 6cd -- "$2" || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
7# In separate objtree build, include/ might not exist yet
8mkdir include 2>/dev/null
7 9
8srctree="$1" 10srctree="$1"
9 11
@@ -46,11 +48,13 @@ if test x"$new" != x"$old"; then
46fi 48fi
47 49
48# (Re)generate */Kbuild and */Config.in 50# (Re)generate */Kbuild and */Config.in
49find -type d | while read -r d; do 51{ cd -- "$srctree" && find -type d; } | while read -r d; do
50 d="${d#./}" 52 d="${d#./}"
53
51 src="$srctree/$d/Kbuild.src" 54 src="$srctree/$d/Kbuild.src"
52 dst="$d/Kbuild" 55 dst="$d/Kbuild"
53 if test -f "$src"; then 56 if test -f "$src"; then
57 mkdir -p -- "$d" 2>/dev/null
54 #echo " CHK $dst" 58 #echo " CHK $dst"
55 59
56 s=`sed -n 's@^//kbuild:@@p' -- "$srctree/$d"/*.c` 60 s=`sed -n 's@^//kbuild:@@p' -- "$srctree/$d"/*.c`
@@ -70,6 +74,7 @@ find -type d | while read -r d; do
70 src="$srctree/$d/Config.src" 74 src="$srctree/$d/Config.src"
71 dst="$d/Config.in" 75 dst="$d/Config.in"
72 if test -f "$src"; then 76 if test -f "$src"; then
77 mkdir -p -- "$d" 2>/dev/null
73 #echo " CHK $dst" 78 #echo " CHK $dst"
74 79
75 s=`sed -n 's@^//config:@@p' -- "$srctree/$d"/*.c` 80 s=`sed -n 's@^//config:@@p' -- "$srctree/$d"/*.c`
diff --git a/scripts/test_make_O b/scripts/test_make_O
new file mode 100755
index 000000000..a0ee6a868
--- /dev/null
+++ b/scripts/test_make_O
@@ -0,0 +1,11 @@
1#!/bin/sh
2
3b=`basename $PWD`
4test "${b#busybox}" != "$b" || { echo "Must be run in busybox tree"; exit 1; }
5
6rm -rf ../testdir_make_O.$$
7mkdir ../testdir_make_O.$$
8odir=`cd ../testdir_make_O.$$ && pwd`
9test -d "$odir" || exit 1
10
11make O="$odir" $MAKEOPTS "$@" defconfig busybox 2>&1 | tee test_make_O.log
diff --git a/testsuite/diff.tests b/testsuite/diff.tests
index 06d5a4fd7..27a4b33a7 100755
--- a/testsuite/diff.tests
+++ b/testsuite/diff.tests
@@ -4,7 +4,7 @@
4 4
5. ./testing.sh 5. ./testing.sh
6 6
7# testing "test name" "options" "expected result" "file input" "stdin" 7# testing "test name" "commands" "expected result" "file input" "stdin"
8 8
9# diff outputs date/time in the header, which should not be analysed 9# diff outputs date/time in the header, which should not be analysed
10# NB: sed has tab character in s command! 10# NB: sed has tab character in s command!
@@ -100,9 +100,11 @@ testing "diff always takes context from old file" \
100 "abc\na c\ndef\n" \ 100 "abc\na c\ndef\n" \
101 "a c\n" 101 "a c\n"
102 102
103# testing "test name" "options" "expected result" "file input" "stdin" 103# testing "test name" "commands" "expected result" "file input" "stdin"
104 104
105# clean up
105rm -rf diff1 diff2 106rm -rf diff1 diff2
107
106mkdir diff1 diff2 diff2/subdir 108mkdir diff1 diff2 diff2/subdir
107echo qwe >diff1/- 109echo qwe >diff1/-
108echo asd >diff2/subdir/- 110echo asd >diff2/subdir/-
@@ -187,4 +189,29 @@ SKIP=
187# clean up 189# clean up
188rm -rf diff1 diff2 190rm -rf diff1 diff2
189 191
192# NOT using directory structure from prev test...
193mkdir diff1 diff2
194echo qwe >diff1/-
195echo rty >diff2/-
196optional FEATURE_DIFF_DIR
197testing "diff diff1 diff2/" \
198 "diff -ur diff1 diff2/ | $TRIM_TAB; diff -ur .///diff1 diff2//// | $TRIM_TAB" \
199"\
200--- diff1/-
201+++ diff2/-
202@@ -1 +1 @@
203-qwe
204+rty
205--- .///diff1/-
206+++ diff2////-
207@@ -1 +1 @@
208-qwe
209+rty
210" \
211 "" ""
212SKIP=
213
214# clean up
215rm -rf diff1 diff2
216
190exit $FAILCOUNT 217exit $FAILCOUNT
diff --git a/util-linux/Config.src b/util-linux/Config.src
index 3c3e05ec4..91d1fc2ce 100644
--- a/util-linux/Config.src
+++ b/util-linux/Config.src
@@ -470,221 +470,6 @@ config FEATURE_USE_TERMIOS
470 will be unable to determine the current screen size, and will be 470 will be unable to determine the current screen size, and will be
471 unable to move the cursor. 471 unable to move the cursor.
472 472
473config VOLUMEID
474 bool #No description makes it a hidden option
475 default n
476
477config FEATURE_VOLUMEID_EXT
478 bool "Ext filesystem"
479 default y
480 depends on VOLUMEID
481 help
482 TODO
483
484config FEATURE_VOLUMEID_BTRFS
485 bool "btrfs filesystem"
486 default y
487 depends on VOLUMEID
488 help
489 TODO
490
491config FEATURE_VOLUMEID_REISERFS
492 bool "Reiser filesystem"
493 default y
494 depends on VOLUMEID
495 help
496 TODO
497
498config FEATURE_VOLUMEID_FAT
499 bool "fat filesystem"
500 default y
501 depends on VOLUMEID
502 help
503 TODO
504
505config FEATURE_VOLUMEID_HFS
506 bool "hfs filesystem"
507 default y
508 depends on VOLUMEID
509 help
510 TODO
511
512config FEATURE_VOLUMEID_JFS
513 bool "jfs filesystem"
514 default y
515 depends on VOLUMEID
516 help
517 TODO
518
519### config FEATURE_VOLUMEID_UFS
520### bool "ufs filesystem"
521### default y
522### depends on VOLUMEID
523### help
524### TODO
525
526config FEATURE_VOLUMEID_XFS
527 bool "xfs filesystem"
528 default y
529 depends on VOLUMEID
530 help
531 TODO
532
533config FEATURE_VOLUMEID_NTFS
534 bool "ntfs filesystem"
535 default y
536 depends on VOLUMEID
537 help
538 TODO
539
540config FEATURE_VOLUMEID_ISO9660
541 bool "iso9660 filesystem"
542 default y
543 depends on VOLUMEID
544 help
545 TODO
546
547config FEATURE_VOLUMEID_UDF
548 bool "udf filesystem"
549 default y
550 depends on VOLUMEID
551 help
552 TODO
553
554config FEATURE_VOLUMEID_LUKS
555 bool "luks filesystem"
556 default y
557 depends on VOLUMEID
558 help
559 TODO
560
561config FEATURE_VOLUMEID_LINUXSWAP
562 bool "linux swap filesystem"
563 default y
564 depends on VOLUMEID
565 help
566 TODO
567
568### config FEATURE_VOLUMEID_LVM
569### bool "lvm"
570### default y
571### depends on VOLUMEID
572### help
573### TODO
574
575config FEATURE_VOLUMEID_CRAMFS
576 bool "cramfs filesystem"
577 default y
578 depends on VOLUMEID
579 help
580 TODO
581
582### config FEATURE_VOLUMEID_HPFS
583### bool "hpfs filesystem"
584### default y
585### depends on VOLUMEID
586### help
587### TODO
588
589config FEATURE_VOLUMEID_ROMFS
590 bool "romfs filesystem"
591 default y
592 depends on VOLUMEID
593 help
594 TODO
595
596config FEATURE_VOLUMEID_SYSV
597 bool "sysv filesystem"
598 default y
599 depends on VOLUMEID
600 help
601 TODO
602
603### config FEATURE_VOLUMEID_MINIX
604### bool "minix filesystem"
605### default y
606### depends on VOLUMEID
607### help
608### TODO
609
610### These only detect partition tables - not used (yet?)
611### config FEATURE_VOLUMEID_MAC
612### bool "mac filesystem"
613### default y
614### depends on VOLUMEID
615### help
616### TODO
617###
618### config FEATURE_VOLUMEID_MSDOS
619### bool "msdos filesystem"
620### default y
621### depends on VOLUMEID
622### help
623### TODO
624
625config FEATURE_VOLUMEID_OCFS2
626 bool "ocfs2 filesystem"
627 default y
628 depends on VOLUMEID
629 help
630 TODO
631
632### config FEATURE_VOLUMEID_HIGHPOINTRAID
633### bool "highpoint raid"
634### default y
635### depends on VOLUMEID
636### help
637### TODO
638
639### config FEATURE_VOLUMEID_ISWRAID
640### bool "intel raid"
641### default y
642### depends on VOLUMEID
643### help
644### TODO
645
646### config FEATURE_VOLUMEID_LSIRAID
647### bool "lsi raid"
648### default y
649### depends on VOLUMEID
650### help
651### TODO
652
653### config FEATURE_VOLUMEID_VIARAID
654### bool "via raid"
655### default y
656### depends on VOLUMEID
657### help
658### TODO
659
660### config FEATURE_VOLUMEID_SILICONRAID
661### bool "silicon raid"
662### default y
663### depends on VOLUMEID
664### help
665### TODO
666
667### config FEATURE_VOLUMEID_NVIDIARAID
668### bool "nvidia raid"
669### default y
670### depends on VOLUMEID
671### help
672### TODO
673
674### config FEATURE_VOLUMEID_PROMISERAID
675### bool "promise raid"
676### default y
677### depends on VOLUMEID
678### help
679### TODO
680
681config FEATURE_VOLUMEID_LINUXRAID
682 bool "linuxraid"
683 default y
684 depends on VOLUMEID
685 help
686 TODO
687
688config MOUNT 473config MOUNT
689 bool "mount" 474 bool "mount"
690 default y 475 default y
@@ -937,4 +722,224 @@ config FEATURE_MTAB_SUPPORT
937 About the only reason to use this is if you've removed /proc from 722 About the only reason to use this is if you've removed /proc from
938 your kernel. 723 your kernel.
939 724
725config VOLUMEID
726 bool #No description makes it a hidden option
727 default n
728
729menu "Filesystem/Volume identification"
730 depends on VOLUMEID
731
732config FEATURE_VOLUMEID_EXT
733 bool "Ext filesystem"
734 default y
735 depends on VOLUMEID
736 help
737 TODO
738
739config FEATURE_VOLUMEID_BTRFS
740 bool "btrfs filesystem"
741 default y
742 depends on VOLUMEID
743 help
744 TODO
745
746config FEATURE_VOLUMEID_REISERFS
747 bool "Reiser filesystem"
748 default y
749 depends on VOLUMEID
750 help
751 TODO
752
753config FEATURE_VOLUMEID_FAT
754 bool "fat filesystem"
755 default y
756 depends on VOLUMEID
757 help
758 TODO
759
760config FEATURE_VOLUMEID_HFS
761 bool "hfs filesystem"
762 default y
763 depends on VOLUMEID
764 help
765 TODO
766
767config FEATURE_VOLUMEID_JFS
768 bool "jfs filesystem"
769 default y
770 depends on VOLUMEID
771 help
772 TODO
773
774### config FEATURE_VOLUMEID_UFS
775### bool "ufs filesystem"
776### default y
777### depends on VOLUMEID
778### help
779### TODO
780
781config FEATURE_VOLUMEID_XFS
782 bool "xfs filesystem"
783 default y
784 depends on VOLUMEID
785 help
786 TODO
787
788config FEATURE_VOLUMEID_NTFS
789 bool "ntfs filesystem"
790 default y
791 depends on VOLUMEID
792 help
793 TODO
794
795config FEATURE_VOLUMEID_ISO9660
796 bool "iso9660 filesystem"
797 default y
798 depends on VOLUMEID
799 help
800 TODO
801
802config FEATURE_VOLUMEID_UDF
803 bool "udf filesystem"
804 default y
805 depends on VOLUMEID
806 help
807 TODO
808
809config FEATURE_VOLUMEID_LUKS
810 bool "luks filesystem"
811 default y
812 depends on VOLUMEID
813 help
814 TODO
815
816config FEATURE_VOLUMEID_LINUXSWAP
817 bool "linux swap filesystem"
818 default y
819 depends on VOLUMEID
820 help
821 TODO
822
823### config FEATURE_VOLUMEID_LVM
824### bool "lvm"
825### default y
826### depends on VOLUMEID
827### help
828### TODO
829
830config FEATURE_VOLUMEID_CRAMFS
831 bool "cramfs filesystem"
832 default y
833 depends on VOLUMEID
834 help
835 TODO
836
837### config FEATURE_VOLUMEID_HPFS
838### bool "hpfs filesystem"
839### default y
840### depends on VOLUMEID
841### help
842### TODO
843
844config FEATURE_VOLUMEID_ROMFS
845 bool "romfs filesystem"
846 default y
847 depends on VOLUMEID
848 help
849 TODO
850
851config FEATURE_VOLUMEID_SYSV
852 bool "sysv filesystem"
853 default y
854 depends on VOLUMEID
855 help
856 TODO
857
858### config FEATURE_VOLUMEID_MINIX
859### bool "minix filesystem"
860### default y
861### depends on VOLUMEID
862### help
863### TODO
864
865### These only detect partition tables - not used (yet?)
866### config FEATURE_VOLUMEID_MAC
867### bool "mac filesystem"
868### default y
869### depends on VOLUMEID
870### help
871### TODO
872###
873### config FEATURE_VOLUMEID_MSDOS
874### bool "msdos filesystem"
875### default y
876### depends on VOLUMEID
877### help
878### TODO
879
880config FEATURE_VOLUMEID_OCFS2
881 bool "ocfs2 filesystem"
882 default y
883 depends on VOLUMEID
884 help
885 TODO
886
887### config FEATURE_VOLUMEID_HIGHPOINTRAID
888### bool "highpoint raid"
889### default y
890### depends on VOLUMEID
891### help
892### TODO
893
894### config FEATURE_VOLUMEID_ISWRAID
895### bool "intel raid"
896### default y
897### depends on VOLUMEID
898### help
899### TODO
900
901### config FEATURE_VOLUMEID_LSIRAID
902### bool "lsi raid"
903### default y
904### depends on VOLUMEID
905### help
906### TODO
907
908### config FEATURE_VOLUMEID_VIARAID
909### bool "via raid"
910### default y
911### depends on VOLUMEID
912### help
913### TODO
914
915### config FEATURE_VOLUMEID_SILICONRAID
916### bool "silicon raid"
917### default y
918### depends on VOLUMEID
919### help
920### TODO
921
922### config FEATURE_VOLUMEID_NVIDIARAID
923### bool "nvidia raid"
924### default y
925### depends on VOLUMEID
926### help
927### TODO
928
929### config FEATURE_VOLUMEID_PROMISERAID
930### bool "promise raid"
931### default y
932### depends on VOLUMEID
933### help
934### TODO
935
936config FEATURE_VOLUMEID_LINUXRAID
937 bool "linuxraid"
938 default y
939 depends on VOLUMEID
940 help
941 TODO
942
943endmenu
944
940endmenu 945endmenu
diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 342930964..11a9f624a 100644
--- a/util-linux/acpid.c
+++ b/util-linux/acpid.c
@@ -9,9 +9,25 @@
9#include "libbb.h" 9#include "libbb.h"
10 10
11#include <linux/input.h> 11#include <linux/input.h>
12#ifndef EV_SW
13# define EV_SW 0x05
14#endif
15#ifndef EV_KEY
16# define EV_KEY 0x01
17#endif
18#ifndef SW_LID
19# define SW_LID 0x00
20#endif
12#ifndef SW_RFKILL_ALL 21#ifndef SW_RFKILL_ALL
13# define SW_RFKILL_ALL 3 22# define SW_RFKILL_ALL 0x03
14#endif 23#endif
24#ifndef KEY_POWER
25# define KEY_POWER 116 /* SC System Power Down */
26#endif
27#ifndef KEY_SLEEP
28# define KEY_SLEEP 142 /* SC System Sleep */
29#endif
30
15 31
16/* 32/*
17 * acpid listens to ACPI events coming either in textual form 33 * acpid listens to ACPI events coming either in textual form
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 7227a829e..aa718c787 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -2805,7 +2805,7 @@ list_devs_in_proc_partititons(void)
2805 &ma, &mi, &sz, ptname) != 4) 2805 &ma, &mi, &sz, ptname) != 4)
2806 continue; 2806 continue;
2807 for (s = ptname; *s; s++) 2807 for (s = ptname; *s; s++)
2808 continue; 2808 continue;
2809 /* note: excluding '0': e.g. mmcblk0 is not a partition name! */ 2809 /* note: excluding '0': e.g. mmcblk0 is not a partition name! */
2810 if (s[-1] >= '1' && s[-1] <= '9') 2810 if (s[-1] >= '1' && s[-1] <= '9')
2811 continue; 2811 continue;
diff --git a/util-linux/more.c b/util-linux/more.c
index 55694e434..9216b6137 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -31,7 +31,7 @@ struct globals {
31 31
32#define setTermSettings(fd, argp) do { \ 32#define setTermSettings(fd, argp) do { \
33 if (ENABLE_FEATURE_USE_TERMIOS) tcsetattr(fd, TCSANOW, argp); \ 33 if (ENABLE_FEATURE_USE_TERMIOS) tcsetattr(fd, TCSANOW, argp); \
34 } while(0) 34 } while (0)
35#define getTermSettings(fd, argp) tcgetattr(fd, argp) 35#define getTermSettings(fd, argp) tcgetattr(fd, argp)
36 36
37static void gotsig(int sig UNUSED_PARAM) 37static void gotsig(int sig UNUSED_PARAM)
@@ -46,7 +46,7 @@ static void gotsig(int sig UNUSED_PARAM)
46int more_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 46int more_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
47int more_main(int argc UNUSED_PARAM, char **argv) 47int more_main(int argc UNUSED_PARAM, char **argv)
48{ 48{
49 int c = c; /* for gcc */ 49 int c = c; /* for compiler */
50 int lines; 50 int lines;
51 int input = 0; 51 int input = 0;
52 int spaces = 0; 52 int spaces = 0;