aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-10-12 13:23:29 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2021-10-12 13:23:29 +0200
commit94c78aa0b91f2150bd038866addf3d0ee69474a8 (patch)
treec114f2e6a36cf0806a24aaa620157f5a480e5d4f
parent7c3e96d4b3d419d76f97e17d42a4401ee685b7ec (diff)
downloadbusybox-w32-94c78aa0b91f2150bd038866addf3d0ee69474a8.tar.gz
busybox-w32-94c78aa0b91f2150bd038866addf3d0ee69474a8.tar.bz2
busybox-w32-94c78aa0b91f2150bd038866addf3d0ee69474a8.zip
config system: move some options closer to relevalnt tool subdirectories
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/Config.src19
-rw-r--r--coreutils/df.c20
-rw-r--r--libbb/Config.src185
-rw-r--r--mailutils/Config.src4
-rw-r--r--networking/Config.src26
-rw-r--r--procps/Config.src9
6 files changed, 132 insertions, 131 deletions
diff --git a/coreutils/Config.src b/coreutils/Config.src
index 1bded03a6..6c9e47551 100644
--- a/coreutils/Config.src
+++ b/coreutils/Config.src
@@ -5,10 +5,6 @@
5 5
6menu "Coreutils" 6menu "Coreutils"
7 7
8INSERT
9
10comment "Common options"
11
12config FEATURE_VERBOSE 8config FEATURE_VERBOSE
13 bool "Support verbose options (usually -v) for various applets" 9 bool "Support verbose options (usually -v) for various applets"
14 default y 10 default y
@@ -17,6 +13,19 @@ config FEATURE_VERBOSE
17 Also enables long option (--verbose) if it exists. 13 Also enables long option (--verbose) if it exists.
18 Without this option, -v is accepted but ignored. 14 Without this option, -v is accepted but ignored.
19 15
16comment "Common options for date and touch"
17
18config FEATURE_TIMEZONE
19 bool "Allow timezone in dates"
20 default y
21 depends on DESKTOP
22 help
23 Permit the use of timezones when parsing user-provided data
24 strings, e.g. '1996-04-09 12:45:00 -0500'.
25
26 This requires support for the '%z' extension to strptime() which
27 may not be available in all implementations.
28
20comment "Common options for cp and mv" 29comment "Common options for cp and mv"
21 depends on CP || MV 30 depends on CP || MV
22 31
@@ -37,4 +46,6 @@ config FEATURE_HUMAN_READABLE
37 help 46 help
38 Allow df, du, and ls to have human readable output. 47 Allow df, du, and ls to have human readable output.
39 48
49INSERT
50
40endmenu 51endmenu
diff --git a/coreutils/df.c b/coreutils/df.c
index 9f8b3a71e..176aa079f 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -32,6 +32,26 @@
32//config: -a Show all filesystems 32//config: -a Show all filesystems
33//config: -i Inodes 33//config: -i Inodes
34//config: -B <SIZE> Blocksize 34//config: -B <SIZE> Blocksize
35//config:
36//config:config FEATURE_SKIP_ROOTFS
37//config: bool "Skip rootfs in mount table"
38//config: default y
39//config: depends on DF
40//config: help
41//config: Ignore rootfs entry in mount table.
42//config:
43//config: In Linux, kernel has a special filesystem, rootfs, which is initially
44//config: mounted on /. It contains initramfs data, if kernel is configured
45//config: to have one. Usually, another file system is mounted over / early
46//config: in boot process, and therefore most tools which manipulate
47//config: mount table, such as df, will skip rootfs entry.
48//config:
49//config: However, some systems do not mount anything on /.
50//config: If you need to configure busybox for one of these systems,
51//config: you may find it useful to turn this option off to make df show
52//config: initramfs statistics.
53//config:
54//config: Otherwise, choose Y.
35 55
36//applet:IF_DF(APPLET_NOEXEC(df, df, BB_DIR_BIN, BB_SUID_DROP, df)) 56//applet:IF_DF(APPLET_NOEXEC(df, df, BB_DIR_BIN, BB_SUID_DROP, df))
37 57
diff --git a/libbb/Config.src b/libbb/Config.src
index 58c5fad50..24b31fad9 100644
--- a/libbb/Config.src
+++ b/libbb/Config.src
@@ -61,32 +61,73 @@ config SHA3_SMALL
61 64-bit x86: +270 bytes of code, 45% faster 61 64-bit x86: +270 bytes of code, 45% faster
62 32-bit x86: +450 bytes of code, 75% faster 62 32-bit x86: +450 bytes of code, 75% faster
63 63
64config FEATURE_FAST_TOP 64config FEATURE_NON_POSIX_CP
65 bool "Faster /proc scanning code (+100 bytes)" 65 bool "Non-POSIX, but safer, copying to special nodes"
66 default n # all "fast or small" options default to small 66 default y
67 help 67 help
68 This option makes top and ps ~20% faster (or 20% less CPU hungry), 68 With this option, "cp file symlink" will delete symlink
69 but code size is slightly bigger. 69 and create a regular file. This does not conform to POSIX,
70 but prevents a symlink attack.
71 Similarly, "cp file device" will not send file's data
72 to the device. (To do that, use "cat file >device")
70 73
71config FEATURE_ETC_NETWORKS 74config FEATURE_VERBOSE_CP_MESSAGE
72 bool "Support /etc/networks" 75 bool "Give more precise messages when copy fails (cp, mv etc)"
73 default n 76 default n
74 help 77 help
75 Enable support for network names in /etc/networks. This is 78 Error messages with this feature enabled:
76 a rarely used feature which allows you to use names
77 instead of IP/mask pairs in route command.
78 79
79config FEATURE_ETC_SERVICES 80 $ cp file /does_not_exist/file
80 bool "Consult /etc/services even for well-known ports" 81 cp: cannot create '/does_not_exist/file': Path does not exist
81 default n 82 $ cp file /vmlinuz/file
83 cp: cannot stat '/vmlinuz/file': Path has non-directory component
84
85 If this feature is not enabled, they will be, respectively:
86
87 cp: cannot create '/does_not_exist/file': No such file or directory
88 cp: cannot stat '/vmlinuz/file': Not a directory
89
90 This will cost you ~60 bytes.
91
92config FEATURE_USE_SENDFILE
93 bool "Use sendfile system call"
94 default y
95 help
96 When enabled, busybox will use the kernel sendfile() function
97 instead of read/write loops to copy data between file descriptors
98 (for example, cp command does this a lot).
99 If sendfile() doesn't work, copying code falls back to read/write
100 loop. sendfile() was originally implemented for faster I/O
101 from files to sockets, but since Linux 2.6.33 it was extended
102 to work for many more file types.
103
104config FEATURE_COPYBUF_KB
105 int "Copy buffer size, in kilobytes"
106 range 1 1024
107 default 4
108 help
109 Size of buffer used by cp, mv, install, wget etc.
110 Buffers which are 4 kb or less will be allocated on stack.
111 Bigger buffers will be allocated with mmap, with fallback to 4 kb
112 stack buffer if mmap fails.
113
114config MONOTONIC_SYSCALL
115 bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
116 default y
117 help
118 Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
119 time intervals (time, ping, traceroute etc need this).
120 Probably requires Linux 2.6+. If not selected, gettimeofday
121 will be used instead (which gives wrong results if date/time
122 is reset).
123
124config IOCTL_HEX2STR_ERROR
125 bool "Use ioctl names rather than hex values in error messages"
126 default y
82 help 127 help
83 Look up e.g. "telnet" and "http" in /etc/services file 128 Use ioctl names rather than hex values in error messages
84 instead of assuming ports 23 and 80. 129 (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
85 This is almost never necessary (everybody uses standard ports), 130 saves about 1400 bytes.
86 and it makes sense to avoid reading this file.
87 If you disable this option, in the cases where port is explicitly
88 specified as a service name (e.g. "telnet HOST PORTNAME"),
89 it will still be looked up in /etc/services.
90 131
91config FEATURE_EDITING 132config FEATURE_EDITING
92 bool "Command line editing" 133 bool "Command line editing"
@@ -302,107 +343,3 @@ config UNICODE_PRESERVE_BROKEN
302 For example, this means that entering 'l', 's', ' ', 0xff, [Enter] 343 For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
303 at shell prompt will list file named 0xff (single char name 344 at shell prompt will list file named 0xff (single char name
304 with char value 255), not file named '?'. 345 with char value 255), not file named '?'.
305
306config FEATURE_NON_POSIX_CP
307 bool "Non-POSIX, but safer, copying to special nodes"
308 default y
309 help
310 With this option, "cp file symlink" will delete symlink
311 and create a regular file. This does not conform to POSIX,
312 but prevents a symlink attack.
313 Similarly, "cp file device" will not send file's data
314 to the device. (To do that, use "cat file >device")
315
316config FEATURE_VERBOSE_CP_MESSAGE
317 bool "Give more precise messages when copy fails (cp, mv etc)"
318 default n
319 help
320 Error messages with this feature enabled:
321
322 $ cp file /does_not_exist/file
323 cp: cannot create '/does_not_exist/file': Path does not exist
324 $ cp file /vmlinuz/file
325 cp: cannot stat '/vmlinuz/file': Path has non-directory component
326
327 If this feature is not enabled, they will be, respectively:
328
329 cp: cannot create '/does_not_exist/file': No such file or directory
330 cp: cannot stat '/vmlinuz/file': Not a directory
331
332 This will cost you ~60 bytes.
333
334config FEATURE_USE_SENDFILE
335 bool "Use sendfile system call"
336 default y
337 help
338 When enabled, busybox will use the kernel sendfile() function
339 instead of read/write loops to copy data between file descriptors
340 (for example, cp command does this a lot).
341 If sendfile() doesn't work, copying code falls back to read/write
342 loop. sendfile() was originally implemented for faster I/O
343 from files to sockets, but since Linux 2.6.33 it was extended
344 to work for many more file types.
345
346config FEATURE_COPYBUF_KB
347 int "Copy buffer size, in kilobytes"
348 range 1 1024
349 default 4
350 help
351 Size of buffer used by cp, mv, install, wget etc.
352 Buffers which are 4 kb or less will be allocated on stack.
353 Bigger buffers will be allocated with mmap, with fallback to 4 kb
354 stack buffer if mmap fails.
355
356config FEATURE_SKIP_ROOTFS
357 bool "Skip rootfs in mount table"
358 default y
359 help
360 Ignore rootfs entry in mount table.
361
362 In Linux, kernel has a special filesystem, rootfs, which is initially
363 mounted on /. It contains initramfs data, if kernel is configured
364 to have one. Usually, another file system is mounted over / early
365 in boot process, and therefore most tools which manipulate
366 mount table, such as df, will skip rootfs entry.
367
368 However, some systems do not mount anything on /.
369 If you need to configure busybox for one of these systems,
370 you may find it useful to turn this option off to make df show
371 initramfs statistics.
372
373 Otherwise, choose Y.
374
375config MONOTONIC_SYSCALL
376 bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
377 default y
378 help
379 Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
380 time intervals (time, ping, traceroute etc need this).
381 Probably requires Linux 2.6+. If not selected, gettimeofday
382 will be used instead (which gives wrong results if date/time
383 is reset).
384
385config IOCTL_HEX2STR_ERROR
386 bool "Use ioctl names rather than hex values in error messages"
387 default y
388 help
389 Use ioctl names rather than hex values in error messages
390 (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
391 saves about 1400 bytes.
392
393config FEATURE_HWIB
394 bool "Support infiniband HW"
395 default y
396 help
397 Support for printing infiniband addresses in network applets.
398
399config FEATURE_TIMEZONE
400 bool "Allow timezone in dates"
401 default y
402 depends on DESKTOP
403 help
404 Permit the use of timezones when parsing user-provided data
405 strings, e.g. '1996-04-09 12:45:00 -0500'.
406
407 This requires support for the '%z' extension to strptime() which
408 may not be available in all implementations.
diff --git a/mailutils/Config.src b/mailutils/Config.src
index 6d47163e4..b3a3e506d 100644
--- a/mailutils/Config.src
+++ b/mailutils/Config.src
@@ -1,7 +1,5 @@
1menu "Mail Utilities" 1menu "Mail Utilities"
2 2
3INSERT
4
5config FEATURE_MIME_CHARSET 3config FEATURE_MIME_CHARSET
6 string "Default charset" 4 string "Default charset"
7 default "us-ascii" 5 default "us-ascii"
@@ -9,4 +7,6 @@ config FEATURE_MIME_CHARSET
9 help 7 help
10 Default charset of the message. 8 Default charset of the message.
11 9
10INSERT
11
12endmenu 12endmenu
diff --git a/networking/Config.src b/networking/Config.src
index 04d644bc9..0942645c3 100644
--- a/networking/Config.src
+++ b/networking/Config.src
@@ -46,6 +46,32 @@ config VERBOSE_RESOLUTION_ERRORS
46 "can't resolve 'hostname.com'" and want to know more. 46 "can't resolve 'hostname.com'" and want to know more.
47 This may increase size of your executable a bit. 47 This may increase size of your executable a bit.
48 48
49config FEATURE_ETC_NETWORKS
50 bool "Support /etc/networks"
51 default n
52 help
53 Enable support for network names in /etc/networks. This is
54 a rarely used feature which allows you to use names
55 instead of IP/mask pairs in route command.
56
57config FEATURE_ETC_SERVICES
58 bool "Consult /etc/services even for well-known ports"
59 default n
60 help
61 Look up e.g. "telnet" and "http" in /etc/services file
62 instead of assuming ports 23 and 80.
63 This is almost never necessary (everybody uses standard ports),
64 and it makes sense to avoid reading this file.
65 If you disable this option, in the cases where port is explicitly
66 specified as a service name (e.g. "telnet HOST PORTNAME"),
67 it will still be looked up in /etc/services.
68
69config FEATURE_HWIB
70 bool "Support infiniband HW"
71 default y
72 help
73 Support for printing infiniband addresses in network applets.
74
49config FEATURE_TLS_SHA1 75config FEATURE_TLS_SHA1
50 bool "In TLS code, support ciphers which use deprecated SHA1" 76 bool "In TLS code, support ciphers which use deprecated SHA1"
51 depends on TLS 77 depends on TLS
diff --git a/procps/Config.src b/procps/Config.src
index 2b1b8ab11..7fcce98c5 100644
--- a/procps/Config.src
+++ b/procps/Config.src
@@ -5,7 +5,12 @@
5 5
6menu "Process Utilities" 6menu "Process Utilities"
7 7
8INSERT 8config FEATURE_FAST_TOP
9 bool "Faster /proc scanning code (+100 bytes)"
10 default n # all "fast or small" options default to small
11 help
12 This option makes top and ps ~20% faster (or 20% less CPU hungry),
13 but code size is slightly bigger.
9 14
10config FEATURE_SHOW_THREADS 15config FEATURE_SHOW_THREADS
11 bool "Support thread display in ps/pstree/top" 16 bool "Support thread display in ps/pstree/top"
@@ -15,4 +20,6 @@ config FEATURE_SHOW_THREADS
15 Enables the ps -T option, showing of threads in pstree, 20 Enables the ps -T option, showing of threads in pstree,
16 and 'h' command in top. 21 and 'h' command in top.
17 22
23INSERT
24
18endmenu 25endmenu