@@ -61,32 +61,73 @@ config SHA3_SMALL
61
61
64-bit x86: +270 bytes of code, 45% faster
62
62
32-bit x86: +450 bytes of code, 75% faster
63
63
64
- config FEATURE_FAST_TOP
65
- bool "Faster /proc scanning code (+100 bytes) "
66
- default n # all "fast or small" options default to small
64
+ config FEATURE_NON_POSIX_CP
65
+ bool "Non-POSIX, but safer, copying to special nodes "
66
+ default y
67
67
help
68
- This option makes top and ps ~20% faster (or 20% less CPU hungry),
69
- but code size is slightly bigger.
68
+ With this option, "cp file symlink" will delete symlink
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
71
- config FEATURE_ETC_NETWORKS
72
- bool "Support / etc/networks "
74
+ config FEATURE_VERBOSE_CP_MESSAGE
75
+ bool "Give more precise messages when copy fails (cp, mv etc) "
73
76
default n
74
77
help
75
- Enable support for network names in /etc/networks. This is
76
- a rarely used feature which allows you to use names
77
- instead of IP/mask pairs in route command.
78
+ Error messages with this feature enabled:
78
79
79
- config FEATURE_ETC_SERVICES
80
- bool "Consult /etc/services even for well-known ports"
81
- default n
80
+ $ cp file /does_not_exist/file
81
+ cp: cannot create '/does_not_exist/file': Path does not exist
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
+
92
+ config 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
+
104
+ config 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
+
114
+ config 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
+
124
+ config IOCTL_HEX2STR_ERROR
125
+ bool "Use ioctl names rather than hex values in error messages"
126
+ default y
82
127
help
83
- Look up e.g. "telnet" and "http" in /etc/services file
84
- instead of assuming ports 23 and 80.
85
- This is almost never necessary (everybody uses standard ports),
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.
128
+ Use ioctl names rather than hex values in error messages
129
+ (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
130
+ saves about 1400 bytes.
90
131
91
132
config FEATURE_EDITING
92
133
bool "Command line editing"
@@ -302,107 +343,3 @@ config UNICODE_PRESERVE_BROKEN
302
343
For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
303
344
at shell prompt will list file named 0xff (single char name
304
345
with char value 255), not file named '?'.
305
-
306
- config 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
-
316
- config 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
-
334
- config 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
-
346
- config 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
-
356
- config 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
-
375
- config 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
-
385
- config 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
-
393
- config FEATURE_HWIB
394
- bool "Support infiniband HW"
395
- default y
396
- help
397
- Support for printing infiniband addresses in network applets.
398
-
399
- config 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.
0 commit comments