diff options
author | Ron Yorston <rmy@pobox.com> | 2016-11-29 11:26:45 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-11-29 11:26:45 +0000 |
commit | bb8d79eadbba1942dbdb9f9cee5c47833afe269f (patch) | |
tree | b8c517e9ca895d60d7227aef7177b6291df5e2cd /miscutils | |
parent | 9fa1e4990e655a85025c9d270a1606983e375e47 (diff) | |
parent | 7d877fc9312a742b06125927bb1d34bd35398c6c (diff) | |
download | busybox-w32-bb8d79eadbba1942dbdb9f9cee5c47833afe269f.tar.gz busybox-w32-bb8d79eadbba1942dbdb9f9cee5c47833afe269f.tar.bz2 busybox-w32-bb8d79eadbba1942dbdb9f9cee5c47833afe269f.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'miscutils')
38 files changed, 653 insertions, 578 deletions
diff --git a/miscutils/Config.src b/miscutils/Config.src index 06f1c52ba..7325fb8fa 100644 --- a/miscutils/Config.src +++ b/miscutils/Config.src | |||
@@ -7,528 +7,4 @@ menu "Miscellaneous Utilities" | |||
7 | 7 | ||
8 | INSERT | 8 | INSERT |
9 | 9 | ||
10 | config ADJTIMEX | ||
11 | bool "adjtimex" | ||
12 | default y | ||
13 | select PLATFORM_LINUX | ||
14 | help | ||
15 | Adjtimex reads and optionally sets adjustment parameters for | ||
16 | the Linux clock adjustment algorithm. | ||
17 | |||
18 | config BBCONFIG | ||
19 | bool "bbconfig" | ||
20 | default n | ||
21 | help | ||
22 | The bbconfig applet will print the config file with which | ||
23 | busybox was built. | ||
24 | |||
25 | config FEATURE_COMPRESS_BBCONFIG | ||
26 | bool "Compress bbconfig data" | ||
27 | default y | ||
28 | depends on BBCONFIG | ||
29 | help | ||
30 | Store bbconfig data in compressed form, uncompress them on-the-fly | ||
31 | before output. | ||
32 | |||
33 | If you have a really tiny busybox with few applets enabled (and | ||
34 | bunzip2 isn't one of them), the overhead of the decompressor might | ||
35 | be noticeable. Also, if you run executables directly from ROM | ||
36 | and have very little memory, this might not be a win. Otherwise, | ||
37 | you probably want this. | ||
38 | |||
39 | config BEEP | ||
40 | bool "beep" | ||
41 | default y | ||
42 | select PLATFORM_LINUX | ||
43 | help | ||
44 | The beep applets beeps in a given freq/Hz. | ||
45 | |||
46 | config FEATURE_BEEP_FREQ | ||
47 | int "default frequency" | ||
48 | range 0 2147483647 | ||
49 | default 4000 | ||
50 | depends on BEEP | ||
51 | help | ||
52 | Frequency for default beep. | ||
53 | |||
54 | config FEATURE_BEEP_LENGTH_MS | ||
55 | int "default length" | ||
56 | range 0 2147483647 | ||
57 | default 30 | ||
58 | depends on BEEP | ||
59 | help | ||
60 | Length in ms for default beep. | ||
61 | |||
62 | config CHAT | ||
63 | bool "chat" | ||
64 | default y | ||
65 | help | ||
66 | Simple chat utility. | ||
67 | |||
68 | config FEATURE_CHAT_NOFAIL | ||
69 | bool "Enable NOFAIL expect strings" | ||
70 | depends on CHAT | ||
71 | default y | ||
72 | help | ||
73 | When enabled expect strings which are started with a dash trigger | ||
74 | no-fail mode. That is when expectation is not met within timeout | ||
75 | the script is not terminated but sends next SEND string and waits | ||
76 | for next EXPECT string. This allows to compose far more flexible | ||
77 | scripts. | ||
78 | |||
79 | config FEATURE_CHAT_TTY_HIFI | ||
80 | bool "Force STDIN to be a TTY" | ||
81 | depends on CHAT | ||
82 | default n | ||
83 | help | ||
84 | Original chat always treats STDIN as a TTY device and sets for it | ||
85 | so-called raw mode. This option turns on such behaviour. | ||
86 | |||
87 | config FEATURE_CHAT_IMPLICIT_CR | ||
88 | bool "Enable implicit Carriage Return" | ||
89 | depends on CHAT | ||
90 | default y | ||
91 | help | ||
92 | When enabled make chat to terminate all SEND strings with a "\r" | ||
93 | unless "\c" is met anywhere in the string. | ||
94 | |||
95 | config FEATURE_CHAT_SWALLOW_OPTS | ||
96 | bool "Swallow options" | ||
97 | depends on CHAT | ||
98 | default y | ||
99 | help | ||
100 | Busybox chat require no options. To make it not fail when used | ||
101 | in place of original chat (which has a bunch of options) turn | ||
102 | this on. | ||
103 | |||
104 | config FEATURE_CHAT_SEND_ESCAPES | ||
105 | bool "Support weird SEND escapes" | ||
106 | depends on CHAT | ||
107 | default y | ||
108 | help | ||
109 | Original chat uses some escape sequences in SEND arguments which | ||
110 | are not sent to device but rather performs special actions. | ||
111 | E.g. "\K" means to send a break sequence to device. | ||
112 | "\d" delays execution for a second, "\p" -- for a 1/100 of second. | ||
113 | Before turning this option on think twice: do you really need them? | ||
114 | |||
115 | config FEATURE_CHAT_VAR_ABORT_LEN | ||
116 | bool "Support variable-length ABORT conditions" | ||
117 | depends on CHAT | ||
118 | default y | ||
119 | help | ||
120 | Original chat uses fixed 50-bytes length ABORT conditions. Say N here. | ||
121 | |||
122 | config FEATURE_CHAT_CLR_ABORT | ||
123 | bool "Support revoking of ABORT conditions" | ||
124 | depends on CHAT | ||
125 | default y | ||
126 | help | ||
127 | Support CLR_ABORT directive. | ||
128 | |||
129 | config CHRT | ||
130 | bool "chrt" | ||
131 | default y | ||
132 | help | ||
133 | manipulate real-time attributes of a process. | ||
134 | This requires sched_{g,s}etparam support in your libc. | ||
135 | |||
136 | config CRONTAB | ||
137 | bool "crontab" | ||
138 | default y | ||
139 | help | ||
140 | Crontab manipulates the crontab for a particular user. Only | ||
141 | the superuser may specify a different user and/or crontab directory. | ||
142 | Note that Busybox binary must be setuid root for this applet to | ||
143 | work properly. | ||
144 | |||
145 | config DC | ||
146 | bool "dc" | ||
147 | default y | ||
148 | help | ||
149 | Dc is a reverse-polish desk calculator which supports unlimited | ||
150 | precision arithmetic. | ||
151 | |||
152 | config FEATURE_DC_LIBM | ||
153 | bool "Enable power and exp functions (requires libm)" | ||
154 | default y | ||
155 | depends on DC | ||
156 | help | ||
157 | Enable power and exp functions. | ||
158 | NOTE: This will require libm to be present for linking. | ||
159 | |||
160 | config DEVFSD | ||
161 | bool "devfsd (obsolete)" | ||
162 | default n | ||
163 | select PLATFORM_LINUX | ||
164 | select FEATURE_SYSLOG | ||
165 | help | ||
166 | This is deprecated and should NOT be used anymore. | ||
167 | Use linux >= 2.6 (optionally with hotplug) and mdev instead! | ||
168 | See docs/mdev.txt for detailed instructions on how to use mdev | ||
169 | instead. | ||
170 | |||
171 | Provides compatibility with old device names on a devfs systems. | ||
172 | You should set it to true if you have devfs enabled. | ||
173 | The following keywords in devsfd.conf are supported: | ||
174 | "CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE", | ||
175 | "PERMISSIONS", "EXECUTE", "COPY", "IGNORE", | ||
176 | "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT". | ||
177 | |||
178 | But only if they are written UPPERCASE!!!!!!!! | ||
179 | |||
180 | config DEVFSD_MODLOAD | ||
181 | bool "Adds support for MODLOAD keyword in devsfd.conf" | ||
182 | default y | ||
183 | depends on DEVFSD | ||
184 | help | ||
185 | This actually doesn't work with busybox modutils but needs | ||
186 | the external modutils. | ||
187 | |||
188 | config DEVFSD_FG_NP | ||
189 | bool "Enables the -fg and -np options" | ||
190 | default y | ||
191 | depends on DEVFSD | ||
192 | help | ||
193 | -fg Run the daemon in the foreground. | ||
194 | -np Exit after parsing the configuration file. | ||
195 | Do not poll for events. | ||
196 | |||
197 | config DEVFSD_VERBOSE | ||
198 | bool "Increases logging (and size)" | ||
199 | default y | ||
200 | depends on DEVFSD | ||
201 | help | ||
202 | Increases logging to stderr or syslog. | ||
203 | |||
204 | config FEATURE_DEVFS | ||
205 | bool "Use devfs names for all devices (obsolete)" | ||
206 | default n | ||
207 | select PLATFORM_LINUX | ||
208 | help | ||
209 | This is obsolete and should NOT be used anymore. | ||
210 | Use linux >= 2.6 (optionally with hotplug) and mdev instead! | ||
211 | |||
212 | For legacy systems -- if there is no way around devfsd -- this | ||
213 | tells busybox to look for names like /dev/loop/0 instead of | ||
214 | /dev/loop0. If your /dev directory has normal names instead of | ||
215 | devfs names, you don't want this. | ||
216 | |||
217 | config DEVMEM | ||
218 | bool "devmem" | ||
219 | default y | ||
220 | help | ||
221 | devmem is a small program that reads and writes from physical | ||
222 | memory using /dev/mem. | ||
223 | |||
224 | config EJECT | ||
225 | bool "eject" | ||
226 | default y | ||
227 | select PLATFORM_LINUX | ||
228 | help | ||
229 | Used to eject cdroms. (defaults to /dev/cdrom) | ||
230 | |||
231 | config FEATURE_EJECT_SCSI | ||
232 | bool "SCSI support" | ||
233 | default y | ||
234 | depends on EJECT | ||
235 | help | ||
236 | Add the -s option to eject, this allows to eject SCSI-Devices and | ||
237 | usb-storage devices. | ||
238 | |||
239 | config FBSPLASH | ||
240 | bool "fbsplash" | ||
241 | default y | ||
242 | select PLATFORM_LINUX | ||
243 | help | ||
244 | Shows splash image and progress bar on framebuffer device. | ||
245 | Can be used during boot phase of an embedded device. ~2kb. | ||
246 | Usage: | ||
247 | - use kernel option 'vga=xxx' or otherwise enable fb device. | ||
248 | - put somewhere fbsplash.cfg file and an image in .ppm format. | ||
249 | - $ setsid fbsplash [params] & | ||
250 | -c: hide cursor | ||
251 | -d /dev/fbN: framebuffer device (if not /dev/fb0) | ||
252 | -s path_to_image_file (can be "-" for stdin) | ||
253 | -i path_to_cfg_file (can be "-" for stdin) | ||
254 | -f path_to_fifo (can be "-" for stdin) | ||
255 | - if you want to run it only in presence of kernel parameter: | ||
256 | grep -q "fbsplash=on" </proc/cmdline && setsid fbsplash [params] & | ||
257 | - commands for fifo: | ||
258 | "NN" (ASCII decimal number) - percentage to show on progress bar | ||
259 | "exit" - well you guessed it | ||
260 | |||
261 | config FLASHCP | ||
262 | bool "flashcp" | ||
263 | default n # doesn't build on Ubuntu 8.04 | ||
264 | help | ||
265 | The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7. | ||
266 | This utility is used to copy images into a MTD device. | ||
267 | |||
268 | config FLASH_LOCK | ||
269 | bool "flash_lock" | ||
270 | default n # doesn't build on Ubuntu 8.04 | ||
271 | help | ||
272 | The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This | ||
273 | utility locks part or all of the flash device. | ||
274 | |||
275 | config FLASH_UNLOCK | ||
276 | bool "flash_unlock" | ||
277 | default n # doesn't build on Ubuntu 8.04 | ||
278 | help | ||
279 | The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This | ||
280 | utility unlocks part or all of the flash device. | ||
281 | |||
282 | config FLASH_ERASEALL | ||
283 | bool "flash_eraseall" | ||
284 | default n # doesn't build on Ubuntu 8.04 | ||
285 | help | ||
286 | The flash_eraseall binary from mtd-utils as of git head c4c6a59eb. | ||
287 | This utility is used to erase the whole MTD device. | ||
288 | |||
289 | config IONICE | ||
290 | bool "ionice" | ||
291 | default y | ||
292 | select PLATFORM_LINUX | ||
293 | help | ||
294 | Set/set program io scheduling class and priority | ||
295 | Requires kernel >= 2.6.13 | ||
296 | |||
297 | config INOTIFYD | ||
298 | bool "inotifyd" | ||
299 | default n # doesn't build on Knoppix 5 | ||
300 | help | ||
301 | Simple inotify daemon. Reports filesystem changes. Requires | ||
302 | kernel >= 2.6.13 | ||
303 | |||
304 | config LAST | ||
305 | bool "last" | ||
306 | default y | ||
307 | depends on FEATURE_WTMP | ||
308 | help | ||
309 | 'last' displays a list of the last users that logged into the system. | ||
310 | |||
311 | config FEATURE_LAST_FANCY | ||
312 | bool "Turn on output of extra information" | ||
313 | default y | ||
314 | depends on LAST | ||
315 | help | ||
316 | 'last' displays detailed information about the last users that | ||
317 | logged into the system (mimics sysvinit last). +900 bytes. | ||
318 | |||
319 | config HDPARM | ||
320 | bool "hdparm" | ||
321 | default y | ||
322 | select PLATFORM_LINUX | ||
323 | help | ||
324 | Get/Set hard drive parameters. Primarily intended for ATA | ||
325 | drives. Adds about 13k (or around 30k if you enable the | ||
326 | FEATURE_HDPARM_GET_IDENTITY option).... | ||
327 | |||
328 | config FEATURE_HDPARM_GET_IDENTITY | ||
329 | bool "Support obtaining detailed information directly from drives" | ||
330 | default y | ||
331 | depends on HDPARM | ||
332 | help | ||
333 | Enables the -I and -i options to obtain detailed information | ||
334 | directly from drives about their capabilities and supported ATA | ||
335 | feature set. If no device name is specified, hdparm will read | ||
336 | identify data from stdin. Enabling this option will add about 16k... | ||
337 | |||
338 | config FEATURE_HDPARM_HDIO_SCAN_HWIF | ||
339 | bool "Register an IDE interface (DANGEROUS)" | ||
340 | default y | ||
341 | depends on HDPARM | ||
342 | help | ||
343 | Enables the 'hdparm -R' option to register an IDE interface. | ||
344 | This is dangerous stuff, so you should probably say N. | ||
345 | |||
346 | config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF | ||
347 | bool "Un-register an IDE interface (DANGEROUS)" | ||
348 | default y | ||
349 | depends on HDPARM | ||
350 | help | ||
351 | Enables the 'hdparm -U' option to un-register an IDE interface. | ||
352 | This is dangerous stuff, so you should probably say N. | ||
353 | |||
354 | config FEATURE_HDPARM_HDIO_DRIVE_RESET | ||
355 | bool "Perform device reset (DANGEROUS)" | ||
356 | default y | ||
357 | depends on HDPARM | ||
358 | help | ||
359 | Enables the 'hdparm -w' option to perform a device reset. | ||
360 | This is dangerous stuff, so you should probably say N. | ||
361 | |||
362 | config FEATURE_HDPARM_HDIO_TRISTATE_HWIF | ||
363 | bool "Tristate device for hotswap (DANGEROUS)" | ||
364 | default y | ||
365 | depends on HDPARM | ||
366 | help | ||
367 | Enables the 'hdparm -x' option to tristate device for hotswap, | ||
368 | and the '-b' option to get/set bus state. This is dangerous | ||
369 | stuff, so you should probably say N. | ||
370 | |||
371 | config FEATURE_HDPARM_HDIO_GETSET_DMA | ||
372 | bool "Get/set using_dma flag" | ||
373 | default y | ||
374 | depends on HDPARM | ||
375 | help | ||
376 | Enables the 'hdparm -d' option to get/set using_dma flag. | ||
377 | |||
378 | config MAKEDEVS | ||
379 | bool "makedevs" | ||
380 | default y | ||
381 | help | ||
382 | 'makedevs' is a utility used to create a batch of devices with | ||
383 | one command. | ||
384 | |||
385 | There are two choices for command line behaviour, the interface | ||
386 | as used by LEAF/Linux Router Project, or a device table file. | ||
387 | |||
388 | 'leaf' is traditionally what busybox follows, it allows multiple | ||
389 | devices of a particluar type to be created per command. | ||
390 | e.g. /dev/hda[0-9] | ||
391 | Device properties are passed as command line arguments. | ||
392 | |||
393 | 'table' reads device properties from a file or stdin, allowing | ||
394 | a batch of unrelated devices to be made with one command. | ||
395 | User/group names are allowed as an alternative to uid/gid. | ||
396 | |||
397 | choice | ||
398 | prompt "Choose makedevs behaviour" | ||
399 | depends on MAKEDEVS | ||
400 | default FEATURE_MAKEDEVS_TABLE | ||
401 | |||
402 | config FEATURE_MAKEDEVS_LEAF | ||
403 | bool "leaf" | ||
404 | |||
405 | config FEATURE_MAKEDEVS_TABLE | ||
406 | bool "table" | ||
407 | |||
408 | endchoice | ||
409 | |||
410 | config MAN | ||
411 | bool "man" | ||
412 | default y | ||
413 | help | ||
414 | Format and display manual pages. | ||
415 | |||
416 | config MICROCOM | ||
417 | bool "microcom" | ||
418 | default y | ||
419 | help | ||
420 | The poor man's minicom utility for chatting with serial port devices. | ||
421 | |||
422 | config MOUNTPOINT | ||
423 | bool "mountpoint" | ||
424 | default y | ||
425 | help | ||
426 | mountpoint checks if the directory is a mountpoint. | ||
427 | |||
428 | config MT | ||
429 | bool "mt" | ||
430 | default y | ||
431 | help | ||
432 | mt is used to control tape devices. You can use the mt utility | ||
433 | to advance or rewind a tape past a specified number of archive | ||
434 | files on the tape. | ||
435 | |||
436 | config RAIDAUTORUN | ||
437 | bool "raidautorun" | ||
438 | default y | ||
439 | select PLATFORM_LINUX | ||
440 | help | ||
441 | raidautorun tells the kernel md driver to | ||
442 | search and start RAID arrays. | ||
443 | |||
444 | config READAHEAD | ||
445 | bool "readahead" | ||
446 | default y | ||
447 | depends on LFS | ||
448 | select PLATFORM_LINUX | ||
449 | help | ||
450 | Preload the files listed on the command line into RAM cache so that | ||
451 | subsequent reads on these files will not block on disk I/O. | ||
452 | |||
453 | This applet just calls the readahead(2) system call on each file. | ||
454 | It is mainly useful in system startup scripts to preload files | ||
455 | or executables before they are used. When used at the right time | ||
456 | (in particular when a CPU bound process is running) it can | ||
457 | significantly speed up system startup. | ||
458 | |||
459 | As readahead(2) blocks until each file has been read, it is best to | ||
460 | run this applet as a background job. | ||
461 | |||
462 | config RUNLEVEL | ||
463 | bool "runlevel" | ||
464 | default y | ||
465 | depends on FEATURE_UTMP | ||
466 | help | ||
467 | find the current and previous system runlevel. | ||
468 | |||
469 | This applet uses utmp but does not rely on busybox supporing | ||
470 | utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. | ||
471 | |||
472 | config RX | ||
473 | bool "rx" | ||
474 | default y | ||
475 | select PLATFORM_LINUX | ||
476 | help | ||
477 | Receive files using the Xmodem protocol. | ||
478 | |||
479 | config SETSID | ||
480 | bool "setsid" | ||
481 | default y | ||
482 | help | ||
483 | setsid runs a program in a new session | ||
484 | |||
485 | config STRINGS | ||
486 | bool "strings" | ||
487 | default y | ||
488 | help | ||
489 | strings prints the printable character sequences for each file | ||
490 | specified. | ||
491 | |||
492 | config TIME | ||
493 | bool "time" | ||
494 | default y | ||
495 | help | ||
496 | The time command runs the specified program with the given arguments. | ||
497 | When the command finishes, time writes a message to standard output | ||
498 | giving timing statistics about this program run. | ||
499 | |||
500 | config TIMEOUT | ||
501 | bool "timeout" | ||
502 | default y | ||
503 | help | ||
504 | Runs a program and watches it. If it does not terminate in | ||
505 | specified number of seconds, it is sent a signal. | ||
506 | |||
507 | config TTYSIZE | ||
508 | bool "ttysize" | ||
509 | default y | ||
510 | help | ||
511 | A replacement for "stty size". Unlike stty, can report only width, | ||
512 | only height, or both, in any order. It also does not complain on | ||
513 | error, but returns default 80x24. | ||
514 | Usage in shell scripts: width=`ttysize w`. | ||
515 | |||
516 | config VOLNAME | ||
517 | bool "volname" | ||
518 | default y | ||
519 | help | ||
520 | Prints a CD-ROM volume name. | ||
521 | |||
522 | config WATCHDOG | ||
523 | bool "watchdog" | ||
524 | default y | ||
525 | select PLATFORM_LINUX | ||
526 | help | ||
527 | The watchdog utility is used with hardware or software watchdog | ||
528 | device drivers. It opens the specified watchdog device special file | ||
529 | and periodically writes a magic character to the device. If the | ||
530 | watchdog applet ever fails to write the magic character within a | ||
531 | certain amount of time, the watchdog device assumes the system has | ||
532 | hung, and will cause the hardware to reboot. | ||
533 | |||
534 | endmenu | 10 | endmenu |
diff --git a/miscutils/Kbuild.src b/miscutils/Kbuild.src index 503f54904..6b4fb7470 100644 --- a/miscutils/Kbuild.src +++ b/miscutils/Kbuild.src | |||
@@ -7,45 +7,3 @@ | |||
7 | lib-y:= | 7 | lib-y:= |
8 | 8 | ||
9 | INSERT | 9 | INSERT |
10 | lib-$(CONFIG_ADJTIMEX) += adjtimex.o | ||
11 | lib-$(CONFIG_BBCONFIG) += bbconfig.o | ||
12 | lib-$(CONFIG_BEEP) += beep.o | ||
13 | lib-$(CONFIG_CHAT) += chat.o | ||
14 | lib-$(CONFIG_CHRT) += chrt.o | ||
15 | lib-$(CONFIG_CRONTAB) += crontab.o | ||
16 | lib-$(CONFIG_DC) += dc.o | ||
17 | lib-$(CONFIG_DEVFSD) += devfsd.o | ||
18 | lib-$(CONFIG_DEVMEM) += devmem.o | ||
19 | lib-$(CONFIG_EJECT) += eject.o | ||
20 | lib-$(CONFIG_FBSPLASH) += fbsplash.o | ||
21 | lib-$(CONFIG_FLASHCP) += flashcp.o | ||
22 | lib-$(CONFIG_FLASH_ERASEALL) += flash_eraseall.o | ||
23 | lib-$(CONFIG_FLASH_LOCK) += flash_lock_unlock.o | ||
24 | lib-$(CONFIG_FLASH_UNLOCK) += flash_lock_unlock.o | ||
25 | lib-$(CONFIG_IONICE) += ionice.o | ||
26 | lib-$(CONFIG_HDPARM) += hdparm.o | ||
27 | lib-$(CONFIG_INOTIFYD) += inotifyd.o | ||
28 | |||
29 | ifeq ($(CONFIG_FEATURE_LAST_FANCY),y) | ||
30 | lib-$(CONFIG_FEATURE_LAST_FANCY) += last_fancy.o | ||
31 | else | ||
32 | lib-$(CONFIG_LAST) += last.o | ||
33 | endif | ||
34 | |||
35 | lib-$(CONFIG_LESS) += less.o | ||
36 | lib-$(CONFIG_MAKEDEVS) += makedevs.o | ||
37 | lib-$(CONFIG_MAN) += man.o | ||
38 | lib-$(CONFIG_MICROCOM) += microcom.o | ||
39 | lib-$(CONFIG_MOUNTPOINT) += mountpoint.o | ||
40 | lib-$(CONFIG_MT) += mt.o | ||
41 | lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o | ||
42 | lib-$(CONFIG_READAHEAD) += readahead.o | ||
43 | lib-$(CONFIG_RUNLEVEL) += runlevel.o | ||
44 | lib-$(CONFIG_RX) += rx.o | ||
45 | lib-$(CONFIG_SETSID) += setsid.o | ||
46 | lib-$(CONFIG_STRINGS) += strings.o | ||
47 | lib-$(CONFIG_TIME) += time.o | ||
48 | lib-$(CONFIG_TIMEOUT) += timeout.o | ||
49 | lib-$(CONFIG_TTYSIZE) += ttysize.o | ||
50 | lib-$(CONFIG_VOLNAME) += volname.o | ||
51 | lib-$(CONFIG_WATCHDOG) += watchdog.o | ||
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 058aa9a5c..6355cc1ef 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c | |||
@@ -10,6 +10,17 @@ | |||
10 | * | 10 | * |
11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 11 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
12 | */ | 12 | */ |
13 | //config:config ADJTIMEX | ||
14 | //config: bool "adjtimex" | ||
15 | //config: default y | ||
16 | //config: select PLATFORM_LINUX | ||
17 | //config: help | ||
18 | //config: Adjtimex reads and optionally sets adjustment parameters for | ||
19 | //config: the Linux clock adjustment algorithm. | ||
20 | |||
21 | //applet:IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP)) | ||
22 | |||
23 | //kbuild:lib-$(CONFIG_ADJTIMEX) += adjtimex.o | ||
13 | 24 | ||
14 | //usage:#define adjtimex_trivial_usage | 25 | //usage:#define adjtimex_trivial_usage |
15 | //usage: "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]" | 26 | //usage: "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]" |
diff --git a/miscutils/bbconfig.c b/miscutils/bbconfig.c index b252779f5..5320c6966 100644 --- a/miscutils/bbconfig.c +++ b/miscutils/bbconfig.c | |||
@@ -1,6 +1,30 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* This file was released into the public domain by Paul Fox. | 2 | /* This file was released into the public domain by Paul Fox. |
3 | */ | 3 | */ |
4 | //config:config BBCONFIG | ||
5 | //config: bool "bbconfig" | ||
6 | //config: default n | ||
7 | //config: help | ||
8 | //config: The bbconfig applet will print the config file with which | ||
9 | //config: busybox was built. | ||
10 | //config: | ||
11 | //config:config FEATURE_COMPRESS_BBCONFIG | ||
12 | //config: bool "Compress bbconfig data" | ||
13 | //config: default y | ||
14 | //config: depends on BBCONFIG | ||
15 | //config: help | ||
16 | //config: Store bbconfig data in compressed form, uncompress them on-the-fly | ||
17 | //config: before output. | ||
18 | //config: | ||
19 | //config: If you have a really tiny busybox with few applets enabled (and | ||
20 | //config: bunzip2 isn't one of them), the overhead of the decompressor might | ||
21 | //config: be noticeable. Also, if you run executables directly from ROM | ||
22 | //config: and have very little memory, this might not be a win. Otherwise, | ||
23 | //config: you probably want this. | ||
24 | |||
25 | //applet:IF_BBCONFIG(APPLET(bbconfig, BB_DIR_BIN, BB_SUID_DROP)) | ||
26 | |||
27 | //kbuild:lib-$(CONFIG_BBCONFIG) += bbconfig.o | ||
4 | 28 | ||
5 | //usage:#define bbconfig_trivial_usage | 29 | //usage:#define bbconfig_trivial_usage |
6 | //usage: "" | 30 | //usage: "" |
diff --git a/miscutils/beep.c b/miscutils/beep.c index 18b160cc4..14802b543 100644 --- a/miscutils/beep.c +++ b/miscutils/beep.c | |||
@@ -7,6 +7,32 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | //config:config BEEP | ||
11 | //config: bool "beep" | ||
12 | //config: default y | ||
13 | //config: select PLATFORM_LINUX | ||
14 | //config: help | ||
15 | //config: The beep applets beeps in a given freq/Hz. | ||
16 | //config: | ||
17 | //config:config FEATURE_BEEP_FREQ | ||
18 | //config: int "default frequency" | ||
19 | //config: range 0 2147483647 | ||
20 | //config: default 4000 | ||
21 | //config: depends on BEEP | ||
22 | //config: help | ||
23 | //config: Frequency for default beep. | ||
24 | //config: | ||
25 | //config:config FEATURE_BEEP_LENGTH_MS | ||
26 | //config: int "default length" | ||
27 | //config: range 0 2147483647 | ||
28 | //config: default 30 | ||
29 | //config: depends on BEEP | ||
30 | //config: help | ||
31 | //config: Length in ms for default beep. | ||
32 | |||
33 | //applet:IF_BEEP(APPLET(beep, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
34 | |||
35 | //kbuild:lib-$(CONFIG_BEEP) += beep.o | ||
10 | 36 | ||
11 | //usage:#define beep_trivial_usage | 37 | //usage:#define beep_trivial_usage |
12 | //usage: "-f FREQ -l LEN -d DELAY -r COUNT -n" | 38 | //usage: "-f FREQ -l LEN -d DELAY -r COUNT -n" |
diff --git a/miscutils/chat.c b/miscutils/chat.c index 6b429f2a6..dc85f82fb 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c | |||
@@ -7,6 +7,76 @@ | |||
7 | * | 7 | * |
8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | //config:config CHAT | ||
11 | //config: bool "chat" | ||
12 | //config: default y | ||
13 | //config: help | ||
14 | //config: Simple chat utility. | ||
15 | //config: | ||
16 | //config:config FEATURE_CHAT_NOFAIL | ||
17 | //config: bool "Enable NOFAIL expect strings" | ||
18 | //config: depends on CHAT | ||
19 | //config: default y | ||
20 | //config: help | ||
21 | //config: When enabled expect strings which are started with a dash trigger | ||
22 | //config: no-fail mode. That is when expectation is not met within timeout | ||
23 | //config: the script is not terminated but sends next SEND string and waits | ||
24 | //config: for next EXPECT string. This allows to compose far more flexible | ||
25 | //config: scripts. | ||
26 | //config: | ||
27 | //config:config FEATURE_CHAT_TTY_HIFI | ||
28 | //config: bool "Force STDIN to be a TTY" | ||
29 | //config: depends on CHAT | ||
30 | //config: default n | ||
31 | //config: help | ||
32 | //config: Original chat always treats STDIN as a TTY device and sets for it | ||
33 | //config: so-called raw mode. This option turns on such behaviour. | ||
34 | //config: | ||
35 | //config:config FEATURE_CHAT_IMPLICIT_CR | ||
36 | //config: bool "Enable implicit Carriage Return" | ||
37 | //config: depends on CHAT | ||
38 | //config: default y | ||
39 | //config: help | ||
40 | //config: When enabled make chat to terminate all SEND strings with a "\r" | ||
41 | //config: unless "\c" is met anywhere in the string. | ||
42 | //config: | ||
43 | //config:config FEATURE_CHAT_SWALLOW_OPTS | ||
44 | //config: bool "Swallow options" | ||
45 | //config: depends on CHAT | ||
46 | //config: default y | ||
47 | //config: help | ||
48 | //config: Busybox chat require no options. To make it not fail when used | ||
49 | //config: in place of original chat (which has a bunch of options) turn | ||
50 | //config: this on. | ||
51 | //config: | ||
52 | //config:config FEATURE_CHAT_SEND_ESCAPES | ||
53 | //config: bool "Support weird SEND escapes" | ||
54 | //config: depends on CHAT | ||
55 | //config: default y | ||
56 | //config: help | ||
57 | //config: Original chat uses some escape sequences in SEND arguments which | ||
58 | //config: are not sent to device but rather performs special actions. | ||
59 | //config: E.g. "\K" means to send a break sequence to device. | ||
60 | //config: "\d" delays execution for a second, "\p" -- for a 1/100 of second. | ||
61 | //config: Before turning this option on think twice: do you really need them? | ||
62 | //config: | ||
63 | //config:config FEATURE_CHAT_VAR_ABORT_LEN | ||
64 | //config: bool "Support variable-length ABORT conditions" | ||
65 | //config: depends on CHAT | ||
66 | //config: default y | ||
67 | //config: help | ||
68 | //config: Original chat uses fixed 50-bytes length ABORT conditions. Say N here. | ||
69 | //config: | ||
70 | //config:config FEATURE_CHAT_CLR_ABORT | ||
71 | //config: bool "Support revoking of ABORT conditions" | ||
72 | //config: depends on CHAT | ||
73 | //config: default y | ||
74 | //config: help | ||
75 | //config: Support CLR_ABORT directive. | ||
76 | |||
77 | //applet:IF_CHAT(APPLET(chat, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
78 | |||
79 | //kbuild:lib-$(CONFIG_CHAT) += chat.o | ||
10 | 80 | ||
11 | //usage:#define chat_trivial_usage | 81 | //usage:#define chat_trivial_usage |
12 | //usage: "EXPECT [SEND [EXPECT [SEND...]]]" | 82 | //usage: "EXPECT [SEND [EXPECT [SEND...]]]" |
diff --git a/miscutils/chrt.c b/miscutils/chrt.c index f2f559fd7..1604a6890 100644 --- a/miscutils/chrt.c +++ b/miscutils/chrt.c | |||
@@ -5,6 +5,16 @@ | |||
5 | * | 5 | * |
6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
7 | */ | 7 | */ |
8 | //config:config CHRT | ||
9 | //config: bool "chrt" | ||
10 | //config: default y | ||
11 | //config: help | ||
12 | //config: manipulate real-time attributes of a process. | ||
13 | //config: This requires sched_{g,s}etparam support in your libc. | ||
14 | |||
15 | //applet:IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
16 | |||
17 | //kbuild:lib-$(CONFIG_CHRT) += chrt.o | ||
8 | 18 | ||
9 | //usage:#define chrt_trivial_usage | 19 | //usage:#define chrt_trivial_usage |
10 | //usage: "[-prfom] [PRIO] [PID | PROG ARGS]" | 20 | //usage: "[-prfom] [PRIO] [PID | PROG ARGS]" |
diff --git a/miscutils/conspy.c b/miscutils/conspy.c index e80158e39..d9d09d482 100644 --- a/miscutils/conspy.c +++ b/miscutils/conspy.c | |||
@@ -9,11 +9,6 @@ | |||
9 | * | 9 | * |
10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
11 | */ | 11 | */ |
12 | |||
13 | //applet:IF_CONSPY(APPLET(conspy, BB_DIR_BIN, BB_SUID_DROP)) | ||
14 | |||
15 | //kbuild:lib-$(CONFIG_CONSPY) += conspy.o | ||
16 | |||
17 | //config:config CONSPY | 12 | //config:config CONSPY |
18 | //config: bool "conspy" | 13 | //config: bool "conspy" |
19 | //config: default y | 14 | //config: default y |
@@ -24,6 +19,10 @@ | |||
24 | //config: or conspy -nd NUM screenshot of console num | 19 | //config: or conspy -nd NUM screenshot of console num |
25 | //config: or conspy -cs NUM poor man's GNU screen like | 20 | //config: or conspy -cs NUM poor man's GNU screen like |
26 | 21 | ||
22 | //applet:IF_CONSPY(APPLET(conspy, BB_DIR_BIN, BB_SUID_DROP)) | ||
23 | |||
24 | //kbuild:lib-$(CONFIG_CONSPY) += conspy.o | ||
25 | |||
27 | //usage:#define conspy_trivial_usage | 26 | //usage:#define conspy_trivial_usage |
28 | //usage: "[-vcsndfFQ] [-x COL] [-y LINE] [CONSOLE_NO]" | 27 | //usage: "[-vcsndfFQ] [-x COL] [-y LINE] [CONSOLE_NO]" |
29 | //usage:#define conspy_full_usage "\n\n" | 28 | //usage:#define conspy_full_usage "\n\n" |
diff --git a/miscutils/crontab.c b/miscutils/crontab.c index 85c6623b2..bcd424578 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c | |||
@@ -9,6 +9,19 @@ | |||
9 | * | 9 | * |
10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
11 | */ | 11 | */ |
12 | //config:config CRONTAB | ||
13 | //config: bool "crontab" | ||
14 | //config: default y | ||
15 | //config: help | ||
16 | //config: Crontab manipulates the crontab for a particular user. Only | ||
17 | //config: the superuser may specify a different user and/or crontab directory. | ||
18 | //config: Note that Busybox binary must be setuid root for this applet to | ||
19 | //config: work properly. | ||
20 | |||
21 | /* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */ | ||
22 | //applet:IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) | ||
23 | |||
24 | //kbuild:lib-$(CONFIG_CRONTAB) += crontab.o | ||
12 | 25 | ||
13 | //usage:#define crontab_trivial_usage | 26 | //usage:#define crontab_trivial_usage |
14 | //usage: "[-c DIR] [-u USER] [-ler]|[FILE]" | 27 | //usage: "[-c DIR] [-u USER] [-ler]|[FILE]" |
diff --git a/miscutils/dc.c b/miscutils/dc.c index 4d92bc3d0..7986fef5f 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c | |||
@@ -2,10 +2,24 @@ | |||
2 | /* | 2 | /* |
3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
4 | */ | 4 | */ |
5 | 5 | //config:config DC | |
6 | #include "libbb.h" | 6 | //config: bool "dc" |
7 | #include "common_bufsiz.h" | 7 | //config: default y |
8 | #include <math.h> | 8 | //config: help |
9 | //config: Dc is a reverse-polish desk calculator which supports unlimited | ||
10 | //config: precision arithmetic. | ||
11 | //config: | ||
12 | //config:config FEATURE_DC_LIBM | ||
13 | //config: bool "Enable power and exp functions (requires libm)" | ||
14 | //config: default y | ||
15 | //config: depends on DC | ||
16 | //config: help | ||
17 | //config: Enable power and exp functions. | ||
18 | //config: NOTE: This will require libm to be present for linking. | ||
19 | |||
20 | //applet:IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
21 | |||
22 | //kbuild:lib-$(CONFIG_DC) += dc.o | ||
9 | 23 | ||
10 | //usage:#define dc_trivial_usage | 24 | //usage:#define dc_trivial_usage |
11 | //usage: "EXPRESSION..." | 25 | //usage: "EXPRESSION..." |
@@ -30,6 +44,10 @@ | |||
30 | //usage: "$ echo 72 9 div 8 mul p | dc\n" | 44 | //usage: "$ echo 72 9 div 8 mul p | dc\n" |
31 | //usage: "64\n" | 45 | //usage: "64\n" |
32 | 46 | ||
47 | #include "libbb.h" | ||
48 | #include "common_bufsiz.h" | ||
49 | #include <math.h> | ||
50 | |||
33 | #if 0 | 51 | #if 0 |
34 | typedef unsigned data_t; | 52 | typedef unsigned data_t; |
35 | #define DATA_FMT "" | 53 | #define DATA_FMT "" |
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 6217918da..99bdc72b8 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -53,6 +53,66 @@ | |||
53 | The postal address is: | 53 | The postal address is: |
54 | Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. | 54 | Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. |
55 | */ | 55 | */ |
56 | //config:config DEVFSD | ||
57 | //config: bool "devfsd (obsolete)" | ||
58 | //config: default n | ||
59 | //config: select PLATFORM_LINUX | ||
60 | //config: select FEATURE_SYSLOG | ||
61 | //config: help | ||
62 | //config: This is deprecated and should NOT be used anymore. | ||
63 | //config: Use linux >= 2.6 (optionally with hotplug) and mdev instead! | ||
64 | //config: See docs/mdev.txt for detailed instructions on how to use mdev | ||
65 | //config: instead. | ||
66 | //config: | ||
67 | //config: Provides compatibility with old device names on a devfs systems. | ||
68 | //config: You should set it to true if you have devfs enabled. | ||
69 | //config: The following keywords in devsfd.conf are supported: | ||
70 | //config: "CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE", | ||
71 | //config: "PERMISSIONS", "EXECUTE", "COPY", "IGNORE", | ||
72 | //config: "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT". | ||
73 | //config: | ||
74 | //config: But only if they are written UPPERCASE!!!!!!!! | ||
75 | //config: | ||
76 | //config:config DEVFSD_MODLOAD | ||
77 | //config: bool "Adds support for MODLOAD keyword in devsfd.conf" | ||
78 | //config: default y | ||
79 | //config: depends on DEVFSD | ||
80 | //config: help | ||
81 | //config: This actually doesn't work with busybox modutils but needs | ||
82 | //config: the external modutils. | ||
83 | //config: | ||
84 | //config:config DEVFSD_FG_NP | ||
85 | //config: bool "Enables the -fg and -np options" | ||
86 | //config: default y | ||
87 | //config: depends on DEVFSD | ||
88 | //config: help | ||
89 | //config: -fg Run the daemon in the foreground. | ||
90 | //config: -np Exit after parsing the configuration file. | ||
91 | //config: Do not poll for events. | ||
92 | //config: | ||
93 | //config:config DEVFSD_VERBOSE | ||
94 | //config: bool "Increases logging (and size)" | ||
95 | //config: default y | ||
96 | //config: depends on DEVFSD | ||
97 | //config: help | ||
98 | //config: Increases logging to stderr or syslog. | ||
99 | //config: | ||
100 | //config:config FEATURE_DEVFS | ||
101 | //config: bool "Use devfs names for all devices (obsolete)" | ||
102 | //config: default n | ||
103 | //config: select PLATFORM_LINUX | ||
104 | //config: help | ||
105 | //config: This is obsolete and should NOT be used anymore. | ||
106 | //config: Use linux >= 2.6 (optionally with hotplug) and mdev instead! | ||
107 | //config: | ||
108 | //config: For legacy systems -- if there is no way around devfsd -- this | ||
109 | //config: tells busybox to look for names like /dev/loop/0 instead of | ||
110 | //config: /dev/loop0. If your /dev directory has normal names instead of | ||
111 | //config: devfs names, you don't want this. | ||
112 | |||
113 | //applet:IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP)) | ||
114 | |||
115 | //kbuild:lib-$(CONFIG_DEVFSD) += devfsd.o | ||
56 | 116 | ||
57 | //usage:#define devfsd_trivial_usage | 117 | //usage:#define devfsd_trivial_usage |
58 | //usage: "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]") | 118 | //usage: "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]") |
diff --git a/miscutils/devmem.c b/miscutils/devmem.c index 786a21bee..aeb32b13a 100644 --- a/miscutils/devmem.c +++ b/miscutils/devmem.c | |||
@@ -3,6 +3,16 @@ | |||
3 | * Copyright (C) 2000, Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) | 3 | * Copyright (C) 2000, Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) |
4 | * Copyright (C) 2008, BusyBox Team. -solar 4/26/08 | 4 | * Copyright (C) 2008, BusyBox Team. -solar 4/26/08 |
5 | */ | 5 | */ |
6 | //config:config DEVMEM | ||
7 | //config: bool "devmem" | ||
8 | //config: default y | ||
9 | //config: help | ||
10 | //config: devmem is a small program that reads and writes from physical | ||
11 | //config: memory using /dev/mem. | ||
12 | |||
13 | //applet:IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP)) | ||
14 | |||
15 | //kbuild:lib-$(CONFIG_DEVMEM) += devmem.o | ||
6 | 16 | ||
7 | //usage:#define devmem_trivial_usage | 17 | //usage:#define devmem_trivial_usage |
8 | //usage: "ADDRESS [WIDTH [VALUE]]" | 18 | //usage: "ADDRESS [WIDTH [VALUE]]" |
diff --git a/miscutils/eject.c b/miscutils/eject.c index 16ae250ff..667932f6c 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c | |||
@@ -12,6 +12,24 @@ | |||
12 | * This is a simple hack of eject based on something Erik posted in #uclibc. | 12 | * This is a simple hack of eject based on something Erik posted in #uclibc. |
13 | * Most of the dirty work blatantly ripped off from cat.c =) | 13 | * Most of the dirty work blatantly ripped off from cat.c =) |
14 | */ | 14 | */ |
15 | //config:config EJECT | ||
16 | //config: bool "eject" | ||
17 | //config: default y | ||
18 | //config: select PLATFORM_LINUX | ||
19 | //config: help | ||
20 | //config: Used to eject cdroms. (defaults to /dev/cdrom) | ||
21 | //config: | ||
22 | //config:config FEATURE_EJECT_SCSI | ||
23 | //config: bool "SCSI support" | ||
24 | //config: default y | ||
25 | //config: depends on EJECT | ||
26 | //config: help | ||
27 | //config: Add the -s option to eject, this allows to eject SCSI-Devices and | ||
28 | //config: usb-storage devices. | ||
29 | |||
30 | //applet:IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
31 | |||
32 | //kbuild:lib-$(CONFIG_EJECT) += eject.o | ||
15 | 33 | ||
16 | //usage:#define eject_trivial_usage | 34 | //usage:#define eject_trivial_usage |
17 | //usage: "[-t] [-T] [DEVICE]" | 35 | //usage: "[-t] [-T] [DEVICE]" |
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c index 3ddf8a242..fc6c9b953 100644 --- a/miscutils/fbsplash.c +++ b/miscutils/fbsplash.c | |||
@@ -20,6 +20,31 @@ | |||
20 | * "NN" (ASCII decimal number) - percentage to show on progress bar. | 20 | * "NN" (ASCII decimal number) - percentage to show on progress bar. |
21 | * "exit" (or just close fifo) - well you guessed it. | 21 | * "exit" (or just close fifo) - well you guessed it. |
22 | */ | 22 | */ |
23 | //config:config FBSPLASH | ||
24 | //config: bool "fbsplash" | ||
25 | //config: default y | ||
26 | //config: select PLATFORM_LINUX | ||
27 | //config: help | ||
28 | //config: Shows splash image and progress bar on framebuffer device. | ||
29 | //config: Can be used during boot phase of an embedded device. ~2kb. | ||
30 | //config: Usage: | ||
31 | //config: - use kernel option 'vga=xxx' or otherwise enable fb device. | ||
32 | //config: - put somewhere fbsplash.cfg file and an image in .ppm format. | ||
33 | //config: - $ setsid fbsplash [params] & | ||
34 | //config: -c: hide cursor | ||
35 | //config: -d /dev/fbN: framebuffer device (if not /dev/fb0) | ||
36 | //config: -s path_to_image_file (can be "-" for stdin) | ||
37 | //config: -i path_to_cfg_file (can be "-" for stdin) | ||
38 | //config: -f path_to_fifo (can be "-" for stdin) | ||
39 | //config: - if you want to run it only in presence of kernel parameter: | ||
40 | //config: grep -q "fbsplash=on" </proc/cmdline && setsid fbsplash [params] & | ||
41 | //config: - commands for fifo: | ||
42 | //config: "NN" (ASCII decimal number) - percentage to show on progress bar | ||
43 | //config: "exit" - well you guessed it | ||
44 | |||
45 | //applet:IF_FBSPLASH(APPLET(fbsplash, BB_DIR_SBIN, BB_SUID_DROP)) | ||
46 | |||
47 | //kbuild:lib-$(CONFIG_FBSPLASH) += fbsplash.o | ||
23 | 48 | ||
24 | //usage:#define fbsplash_trivial_usage | 49 | //usage:#define fbsplash_trivial_usage |
25 | //usage: "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]" | 50 | //usage: "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]" |
diff --git a/miscutils/flash_eraseall.c b/miscutils/flash_eraseall.c index d95d214d9..2a9bd6cfe 100644 --- a/miscutils/flash_eraseall.c +++ b/miscutils/flash_eraseall.c | |||
@@ -9,6 +9,16 @@ | |||
9 | * | 9 | * |
10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
11 | */ | 11 | */ |
12 | //config:config FLASH_ERASEALL | ||
13 | //config: bool "flash_eraseall" | ||
14 | //config: default n # doesn't build on Ubuntu 8.04 | ||
15 | //config: help | ||
16 | //config: The flash_eraseall binary from mtd-utils as of git head c4c6a59eb. | ||
17 | //config: This utility is used to erase the whole MTD device. | ||
18 | |||
19 | //applet:IF_FLASH_ERASEALL(APPLET(flash_eraseall, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
20 | |||
21 | //kbuild:lib-$(CONFIG_FLASH_ERASEALL) += flash_eraseall.o | ||
12 | 22 | ||
13 | //usage:#define flash_eraseall_trivial_usage | 23 | //usage:#define flash_eraseall_trivial_usage |
14 | //usage: "[-jNq] MTD_DEVICE" | 24 | //usage: "[-jNq] MTD_DEVICE" |
diff --git a/miscutils/flash_lock_unlock.c b/miscutils/flash_lock_unlock.c index 1fefd95f9..2f698641f 100644 --- a/miscutils/flash_lock_unlock.c +++ b/miscutils/flash_lock_unlock.c | |||
@@ -3,6 +3,25 @@ | |||
3 | * | 3 | * |
4 | * Licensed under GPLv2, see file LICENSE in this source tree. | 4 | * Licensed under GPLv2, see file LICENSE in this source tree. |
5 | */ | 5 | */ |
6 | //config:config FLASH_LOCK | ||
7 | //config: bool "flash_lock" | ||
8 | //config: default n # doesn't build on Ubuntu 8.04 | ||
9 | //config: help | ||
10 | //config: The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This | ||
11 | //config: utility locks part or all of the flash device. | ||
12 | //config: | ||
13 | //config:config FLASH_UNLOCK | ||
14 | //config: bool "flash_unlock" | ||
15 | //config: default n # doesn't build on Ubuntu 8.04 | ||
16 | //config: help | ||
17 | //config: The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This | ||
18 | //config: utility unlocks part or all of the flash device. | ||
19 | |||
20 | //applet:IF_FLASH_LOCK(APPLET_ODDNAME(flash_lock, flash_lock_unlock, BB_DIR_USR_SBIN, BB_SUID_DROP, flash_lock)) | ||
21 | //applet:IF_FLASH_UNLOCK(APPLET_ODDNAME(flash_unlock, flash_lock_unlock, BB_DIR_USR_SBIN, BB_SUID_DROP, flash_unlock)) | ||
22 | |||
23 | //kbuild:lib-$(CONFIG_FLASH_LOCK) += flash_lock_unlock.o | ||
24 | //kbuild:lib-$(CONFIG_FLASH_UNLOCK) += flash_lock_unlock.o | ||
6 | 25 | ||
7 | //usage:#define flash_lock_trivial_usage | 26 | //usage:#define flash_lock_trivial_usage |
8 | //usage: "MTD_DEVICE OFFSET SECTORS" | 27 | //usage: "MTD_DEVICE OFFSET SECTORS" |
diff --git a/miscutils/flashcp.c b/miscutils/flashcp.c index 9bc588d14..4bbc67727 100644 --- a/miscutils/flashcp.c +++ b/miscutils/flashcp.c | |||
@@ -6,6 +6,16 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | //config:config FLASHCP | ||
10 | //config: bool "flashcp" | ||
11 | //config: default n # doesn't build on Ubuntu 8.04 | ||
12 | //config: help | ||
13 | //config: The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7. | ||
14 | //config: This utility is used to copy images into a MTD device. | ||
15 | |||
16 | //applet:IF_FLASHCP(APPLET(flashcp, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
17 | |||
18 | //kbuild:lib-$(CONFIG_FLASHCP) += flashcp.o | ||
9 | 19 | ||
10 | //usage:#define flashcp_trivial_usage | 20 | //usage:#define flashcp_trivial_usage |
11 | //usage: "-v FILE MTD_DEVICE" | 21 | //usage: "-v FILE MTD_DEVICE" |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index b4c5876d4..e43a0dec2 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -11,6 +11,68 @@ | |||
11 | * hdparm.c - Command line interface to get/set hard disk parameters | 11 | * hdparm.c - Command line interface to get/set hard disk parameters |
12 | * - by Mark Lord (C) 1994-2002 -- freely distributable | 12 | * - by Mark Lord (C) 1994-2002 -- freely distributable |
13 | */ | 13 | */ |
14 | //config:config HDPARM | ||
15 | //config: bool "hdparm" | ||
16 | //config: default y | ||
17 | //config: select PLATFORM_LINUX | ||
18 | //config: help | ||
19 | //config: Get/Set hard drive parameters. Primarily intended for ATA | ||
20 | //config: drives. Adds about 13k (or around 30k if you enable the | ||
21 | //config: FEATURE_HDPARM_GET_IDENTITY option).... | ||
22 | //config: | ||
23 | //config:config FEATURE_HDPARM_GET_IDENTITY | ||
24 | //config: bool "Support obtaining detailed information directly from drives" | ||
25 | //config: default y | ||
26 | //config: depends on HDPARM | ||
27 | //config: help | ||
28 | //config: Enables the -I and -i options to obtain detailed information | ||
29 | //config: directly from drives about their capabilities and supported ATA | ||
30 | //config: feature set. If no device name is specified, hdparm will read | ||
31 | //config: identify data from stdin. Enabling this option will add about 16k... | ||
32 | //config: | ||
33 | //config:config FEATURE_HDPARM_HDIO_SCAN_HWIF | ||
34 | //config: bool "Register an IDE interface (DANGEROUS)" | ||
35 | //config: default y | ||
36 | //config: depends on HDPARM | ||
37 | //config: help | ||
38 | //config: Enables the 'hdparm -R' option to register an IDE interface. | ||
39 | //config: This is dangerous stuff, so you should probably say N. | ||
40 | //config: | ||
41 | //config:config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF | ||
42 | //config: bool "Un-register an IDE interface (DANGEROUS)" | ||
43 | //config: default y | ||
44 | //config: depends on HDPARM | ||
45 | //config: help | ||
46 | //config: Enables the 'hdparm -U' option to un-register an IDE interface. | ||
47 | //config: This is dangerous stuff, so you should probably say N. | ||
48 | //config: | ||
49 | //config:config FEATURE_HDPARM_HDIO_DRIVE_RESET | ||
50 | //config: bool "Perform device reset (DANGEROUS)" | ||
51 | //config: default y | ||
52 | //config: depends on HDPARM | ||
53 | //config: help | ||
54 | //config: Enables the 'hdparm -w' option to perform a device reset. | ||
55 | //config: This is dangerous stuff, so you should probably say N. | ||
56 | //config: | ||
57 | //config:config FEATURE_HDPARM_HDIO_TRISTATE_HWIF | ||
58 | //config: bool "Tristate device for hotswap (DANGEROUS)" | ||
59 | //config: default y | ||
60 | //config: depends on HDPARM | ||
61 | //config: help | ||
62 | //config: Enables the 'hdparm -x' option to tristate device for hotswap, | ||
63 | //config: and the '-b' option to get/set bus state. This is dangerous | ||
64 | //config: stuff, so you should probably say N. | ||
65 | //config: | ||
66 | //config:config FEATURE_HDPARM_HDIO_GETSET_DMA | ||
67 | //config: bool "Get/set using_dma flag" | ||
68 | //config: default y | ||
69 | //config: depends on HDPARM | ||
70 | //config: help | ||
71 | //config: Enables the 'hdparm -d' option to get/set using_dma flag. | ||
72 | |||
73 | //applet:IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP)) | ||
74 | |||
75 | //kbuild:lib-$(CONFIG_HDPARM) += hdparm.o | ||
14 | 76 | ||
15 | //usage:#define hdparm_trivial_usage | 77 | //usage:#define hdparm_trivial_usage |
16 | //usage: "[OPTIONS] [DEVICE]" | 78 | //usage: "[OPTIONS] [DEVICE]" |
diff --git a/miscutils/inotifyd.c b/miscutils/inotifyd.c index 52db08ada..601df6465 100644 --- a/miscutils/inotifyd.c +++ b/miscutils/inotifyd.c | |||
@@ -26,6 +26,16 @@ | |||
26 | * | 26 | * |
27 | * See below for mask names explanation. | 27 | * See below for mask names explanation. |
28 | */ | 28 | */ |
29 | //config:config INOTIFYD | ||
30 | //config: bool "inotifyd" | ||
31 | //config: default n # doesn't build on Knoppix 5 | ||
32 | //config: help | ||
33 | //config: Simple inotify daemon. Reports filesystem changes. Requires | ||
34 | //config: kernel >= 2.6.13 | ||
35 | |||
36 | //applet:IF_INOTIFYD(APPLET(inotifyd, BB_DIR_SBIN, BB_SUID_DROP)) | ||
37 | |||
38 | //kbuild:lib-$(CONFIG_INOTIFYD) += inotifyd.o | ||
29 | 39 | ||
30 | //usage:#define inotifyd_trivial_usage | 40 | //usage:#define inotifyd_trivial_usage |
31 | //usage: "PROG FILE1[:MASK]..." | 41 | //usage: "PROG FILE1[:MASK]..." |
diff --git a/miscutils/ionice.c b/miscutils/ionice.c index 5fcb653a8..c54b3a6e1 100644 --- a/miscutils/ionice.c +++ b/miscutils/ionice.c | |||
@@ -6,6 +6,17 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | //config:config IONICE | ||
10 | //config: bool "ionice" | ||
11 | //config: default y | ||
12 | //config: select PLATFORM_LINUX | ||
13 | //config: help | ||
14 | //config: Set/set program io scheduling class and priority | ||
15 | //config: Requires kernel >= 2.6.13 | ||
16 | |||
17 | //applet:IF_IONICE(APPLET(ionice, BB_DIR_BIN, BB_SUID_DROP)) | ||
18 | |||
19 | //kbuild:lib-$(CONFIG_IONICE) += ionice.o | ||
9 | 20 | ||
10 | //usage:#define ionice_trivial_usage | 21 | //usage:#define ionice_trivial_usage |
11 | //usage: "[-c 1-3] [-n 0-7] [-p PID] [PROG]" | 22 | //usage: "[-c 1-3] [-n 0-7] [-p PID] [PROG]" |
diff --git a/miscutils/last.c b/miscutils/last.c index f8f34371a..67c1343f1 100644 --- a/miscutils/last.c +++ b/miscutils/last.c | |||
@@ -6,6 +6,28 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | //config:config LAST | ||
10 | //config: bool "last" | ||
11 | //config: default y | ||
12 | //config: depends on FEATURE_WTMP | ||
13 | //config: help | ||
14 | //config: 'last' displays a list of the last users that logged into the system. | ||
15 | //config: | ||
16 | //config:config FEATURE_LAST_FANCY | ||
17 | //config: bool "Turn on output of extra information" | ||
18 | //config: default y | ||
19 | //config: depends on LAST | ||
20 | //config: help | ||
21 | //config: 'last' displays detailed information about the last users that | ||
22 | //config: logged into the system (mimics sysvinit last). +900 bytes. | ||
23 | |||
24 | //applet:IF_LAST(APPLET(last, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
25 | |||
26 | //kbuild:ifeq ($(CONFIG_FEATURE_LAST_FANCY),y) | ||
27 | //kbuild:lib-$(CONFIG_FEATURE_LAST_FANCY) += last_fancy.o | ||
28 | //kbuild:else | ||
29 | //kbuild:lib-$(CONFIG_LAST) += last.o | ||
30 | //kbuild:endif | ||
9 | 31 | ||
10 | //usage:#define last_trivial_usage | 32 | //usage:#define last_trivial_usage |
11 | //usage: ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]") | 33 | //usage: ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]") |
diff --git a/miscutils/less.c b/miscutils/less.c index 8ba687872..8f9b329ba 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -105,6 +105,10 @@ | |||
105 | //config: help | 105 | //config: help |
106 | //config: Enables "-N" command. | 106 | //config: Enables "-N" command. |
107 | 107 | ||
108 | //applet:IF_LESS(APPLET(less, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
109 | |||
110 | //kbuild:lib-$(CONFIG_LESS) += less.o | ||
111 | |||
108 | //usage:#define less_trivial_usage | 112 | //usage:#define less_trivial_usage |
109 | //usage: "[-E" IF_FEATURE_LESS_REGEXP("I")IF_FEATURE_LESS_FLAGS("Mm") | 113 | //usage: "[-E" IF_FEATURE_LESS_REGEXP("I")IF_FEATURE_LESS_FLAGS("Mm") |
110 | //usage: "N" IF_FEATURE_LESS_TRUNCATE("S") "h~] [FILE]..." | 114 | //usage: "N" IF_FEATURE_LESS_TRUNCATE("S") "h~] [FILE]..." |
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index c945a1352..9e7ca340f 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c | |||
@@ -6,6 +6,41 @@ | |||
6 | * Make ranges of device files quickly. | 6 | * Make ranges of device files quickly. |
7 | * known bugs: can't deal with alpha ranges | 7 | * known bugs: can't deal with alpha ranges |
8 | */ | 8 | */ |
9 | //config:config MAKEDEVS | ||
10 | //config: bool "makedevs" | ||
11 | //config: default y | ||
12 | //config: help | ||
13 | //config: 'makedevs' is a utility used to create a batch of devices with | ||
14 | //config: one command. | ||
15 | //config: | ||
16 | //config: There are two choices for command line behaviour, the interface | ||
17 | //config: as used by LEAF/Linux Router Project, or a device table file. | ||
18 | //config: | ||
19 | //config: 'leaf' is traditionally what busybox follows, it allows multiple | ||
20 | //config: devices of a particluar type to be created per command. | ||
21 | //config: e.g. /dev/hda[0-9] | ||
22 | //config: Device properties are passed as command line arguments. | ||
23 | //config: | ||
24 | //config: 'table' reads device properties from a file or stdin, allowing | ||
25 | //config: a batch of unrelated devices to be made with one command. | ||
26 | //config: User/group names are allowed as an alternative to uid/gid. | ||
27 | //config: | ||
28 | //config:choice | ||
29 | //config: prompt "Choose makedevs behaviour" | ||
30 | //config: depends on MAKEDEVS | ||
31 | //config: default FEATURE_MAKEDEVS_TABLE | ||
32 | //config: | ||
33 | //config:config FEATURE_MAKEDEVS_LEAF | ||
34 | //config: bool "leaf" | ||
35 | //config: | ||
36 | //config:config FEATURE_MAKEDEVS_TABLE | ||
37 | //config: bool "table" | ||
38 | //config: | ||
39 | //config:endchoice | ||
40 | |||
41 | //applet:IF_MAKEDEVS(APPLET(makedevs, BB_DIR_SBIN, BB_SUID_DROP)) | ||
42 | |||
43 | //kbuild:lib-$(CONFIG_MAKEDEVS) += makedevs.o | ||
9 | 44 | ||
10 | //usage:#if ENABLE_FEATURE_MAKEDEVS_LEAF | 45 | //usage:#if ENABLE_FEATURE_MAKEDEVS_LEAF |
11 | //usage:#define makedevs_trivial_usage | 46 | //usage:#define makedevs_trivial_usage |
@@ -122,8 +157,11 @@ int makedevs_main(int argc, char **argv) | |||
122 | 157 | ||
123 | /* if mode != S_IFCHR and != S_IFBLK, | 158 | /* if mode != S_IFCHR and != S_IFBLK, |
124 | * third param in mknod() ignored */ | 159 | * third param in mknod() ignored */ |
125 | if (mknod(nodname, mode, makedev(Smajor, Sminor))) | 160 | if (mknod(nodname, mode, makedev(Smajor, Sminor)) != 0 |
161 | && errno != EEXIST | ||
162 | ) { | ||
126 | bb_perror_msg("can't create '%s'", nodname); | 163 | bb_perror_msg("can't create '%s'", nodname); |
164 | } | ||
127 | 165 | ||
128 | /*if (nodname == basedev)*/ /* ex. /dev/hda - to /dev/hda1 ... */ | 166 | /*if (nodname == basedev)*/ /* ex. /dev/hda - to /dev/hda1 ... */ |
129 | nodname = buf; | 167 | nodname = buf; |
@@ -244,7 +282,9 @@ int makedevs_main(int argc UNUSED_PARAM, char **argv) | |||
244 | for (i = start; i <= start + count; i++) { | 282 | for (i = start; i <= start + count; i++) { |
245 | sprintf(full_name_inc, count ? "%s%u" : "%s", full_name, i); | 283 | sprintf(full_name_inc, count ? "%s%u" : "%s", full_name, i); |
246 | rdev = makedev(major, minor + (i - start) * increment); | 284 | rdev = makedev(major, minor + (i - start) * increment); |
247 | if (mknod(full_name_inc, mode, rdev) < 0) { | 285 | if (mknod(full_name_inc, mode, rdev) != 0 |
286 | && errno != EEXIST | ||
287 | ) { | ||
248 | bb_perror_msg("line %d: can't create node %s", linenum, full_name_inc); | 288 | bb_perror_msg("line %d: can't create node %s", linenum, full_name_inc); |
249 | ret = EXIT_FAILURE; | 289 | ret = EXIT_FAILURE; |
250 | } else if (chown(full_name_inc, uid, gid) < 0) { | 290 | } else if (chown(full_name_inc, uid, gid) < 0) { |
diff --git a/miscutils/man.c b/miscutils/man.c index a8c2d4047..741980961 100644 --- a/miscutils/man.c +++ b/miscutils/man.c | |||
@@ -2,6 +2,15 @@ | |||
2 | * Copyright (C) 2008 Denys Vlasenko <vda.linux@googlemail.com> | 2 | * Copyright (C) 2008 Denys Vlasenko <vda.linux@googlemail.com> |
3 | * Licensed under GPLv2, see file LICENSE in this source tree. | 3 | * Licensed under GPLv2, see file LICENSE in this source tree. |
4 | */ | 4 | */ |
5 | //config:config MAN | ||
6 | //config: bool "man" | ||
7 | //config: default y | ||
8 | //config: help | ||
9 | //config: Format and display manual pages. | ||
10 | |||
11 | //applet:IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
12 | |||
13 | //kbuild:lib-$(CONFIG_MAN) += man.o | ||
5 | 14 | ||
6 | //usage:#define man_trivial_usage | 15 | //usage:#define man_trivial_usage |
7 | //usage: "[-aw] [MANPAGE]..." | 16 | //usage: "[-aw] [MANPAGE]..." |
diff --git a/miscutils/microcom.c b/miscutils/microcom.c index dfc9771d8..04605d883 100644 --- a/miscutils/microcom.c +++ b/miscutils/microcom.c | |||
@@ -7,6 +7,15 @@ | |||
7 | * | 7 | * |
8 | * Licensed under GPLv2, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | //config:config MICROCOM | ||
11 | //config: bool "microcom" | ||
12 | //config: default y | ||
13 | //config: help | ||
14 | //config: The poor man's minicom utility for chatting with serial port devices. | ||
15 | |||
16 | //applet:IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
17 | |||
18 | //kbuild:lib-$(CONFIG_MICROCOM) += microcom.o | ||
10 | 19 | ||
11 | //usage:#define microcom_trivial_usage | 20 | //usage:#define microcom_trivial_usage |
12 | //usage: "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" | 21 | //usage: "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" |
diff --git a/miscutils/mountpoint.c b/miscutils/mountpoint.c index 7041f7c59..8b9e1d779 100644 --- a/miscutils/mountpoint.c +++ b/miscutils/mountpoint.c | |||
@@ -8,6 +8,15 @@ | |||
8 | * | 8 | * |
9 | * Based on sysvinit's mountpoint | 9 | * Based on sysvinit's mountpoint |
10 | */ | 10 | */ |
11 | //config:config MOUNTPOINT | ||
12 | //config: bool "mountpoint" | ||
13 | //config: default y | ||
14 | //config: help | ||
15 | //config: mountpoint checks if the directory is a mountpoint. | ||
16 | |||
17 | //applet:IF_MOUNTPOINT(APPLET(mountpoint, BB_DIR_BIN, BB_SUID_DROP)) | ||
18 | |||
19 | //kbuild:lib-$(CONFIG_MOUNTPOINT) += mountpoint.o | ||
11 | 20 | ||
12 | //usage:#define mountpoint_trivial_usage | 21 | //usage:#define mountpoint_trivial_usage |
13 | //usage: "[-q] <[-dn] DIR | -x DEVICE>" | 22 | //usage: "[-q] <[-dn] DIR | -x DEVICE>" |
diff --git a/miscutils/mt.c b/miscutils/mt.c index 20afd3a50..6b3169675 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c | |||
@@ -2,6 +2,17 @@ | |||
2 | /* | 2 | /* |
3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
4 | */ | 4 | */ |
5 | //config:config MT | ||
6 | //config: bool "mt" | ||
7 | //config: default y | ||
8 | //config: help | ||
9 | //config: mt is used to control tape devices. You can use the mt utility | ||
10 | //config: to advance or rewind a tape past a specified number of archive | ||
11 | //config: files on the tape. | ||
12 | |||
13 | //applet:IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DROP)) | ||
14 | |||
15 | //kbuild:lib-$(CONFIG_MT) += mt.o | ||
5 | 16 | ||
6 | //usage:#define mt_trivial_usage | 17 | //usage:#define mt_trivial_usage |
7 | //usage: "[-f device] opcode value" | 18 | //usage: "[-f device] opcode value" |
diff --git a/miscutils/raidautorun.c b/miscutils/raidautorun.c index b72d89058..c6d8e6235 100644 --- a/miscutils/raidautorun.c +++ b/miscutils/raidautorun.c | |||
@@ -7,6 +7,17 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | //config:config RAIDAUTORUN | ||
11 | //config: bool "raidautorun" | ||
12 | //config: default y | ||
13 | //config: select PLATFORM_LINUX | ||
14 | //config: help | ||
15 | //config: raidautorun tells the kernel md driver to | ||
16 | //config: search and start RAID arrays. | ||
17 | |||
18 | //applet:IF_RAIDAUTORUN(APPLET(raidautorun, BB_DIR_SBIN, BB_SUID_DROP)) | ||
19 | |||
20 | //kbuild:lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o | ||
10 | 21 | ||
11 | //usage:#define raidautorun_trivial_usage | 22 | //usage:#define raidautorun_trivial_usage |
12 | //usage: "DEVICE" | 23 | //usage: "DEVICE" |
diff --git a/miscutils/readahead.c b/miscutils/readahead.c index e22aaa468..b8e9b257f 100644 --- a/miscutils/readahead.c +++ b/miscutils/readahead.c | |||
@@ -9,6 +9,27 @@ | |||
9 | * | 9 | * |
10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
11 | */ | 11 | */ |
12 | //config:config READAHEAD | ||
13 | //config: bool "readahead" | ||
14 | //config: default y | ||
15 | //config: depends on LFS | ||
16 | //config: select PLATFORM_LINUX | ||
17 | //config: help | ||
18 | //config: Preload the files listed on the command line into RAM cache so that | ||
19 | //config: subsequent reads on these files will not block on disk I/O. | ||
20 | //config: | ||
21 | //config: This applet just calls the readahead(2) system call on each file. | ||
22 | //config: It is mainly useful in system startup scripts to preload files | ||
23 | //config: or executables before they are used. When used at the right time | ||
24 | //config: (in particular when a CPU bound process is running) it can | ||
25 | //config: significantly speed up system startup. | ||
26 | //config: | ||
27 | //config: As readahead(2) blocks until each file has been read, it is best to | ||
28 | //config: run this applet as a background job. | ||
29 | |||
30 | //applet:IF_READAHEAD(APPLET(readahead, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
31 | |||
32 | //kbuild:lib-$(CONFIG_READAHEAD) += readahead.o | ||
12 | 33 | ||
13 | //usage:#define readahead_trivial_usage | 34 | //usage:#define readahead_trivial_usage |
14 | //usage: "[FILE]..." | 35 | //usage: "[FILE]..." |
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index 8558db862..b6412a6ea 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c | |||
@@ -11,6 +11,19 @@ | |||
11 | * | 11 | * |
12 | * initially busyboxified by Bernhard Reutner-Fischer | 12 | * initially busyboxified by Bernhard Reutner-Fischer |
13 | */ | 13 | */ |
14 | //config:config RUNLEVEL | ||
15 | //config: bool "runlevel" | ||
16 | //config: default y | ||
17 | //config: depends on FEATURE_UTMP | ||
18 | //config: help | ||
19 | //config: find the current and previous system runlevel. | ||
20 | //config: | ||
21 | //config: This applet uses utmp but does not rely on busybox supporing | ||
22 | //config: utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. | ||
23 | |||
24 | //applet:IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP)) | ||
25 | |||
26 | //kbuild:lib-$(CONFIG_RUNLEVEL) += runlevel.o | ||
14 | 27 | ||
15 | //usage:#define runlevel_trivial_usage | 28 | //usage:#define runlevel_trivial_usage |
16 | //usage: "[FILE]" | 29 | //usage: "[FILE]" |
diff --git a/miscutils/rx.c b/miscutils/rx.c index 1dffb593a..660f66a89 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c | |||
@@ -14,6 +14,16 @@ | |||
14 | * | 14 | * |
15 | * This was originally written for blob and then adapted for busybox. | 15 | * This was originally written for blob and then adapted for busybox. |
16 | */ | 16 | */ |
17 | //config:config RX | ||
18 | //config: bool "rx" | ||
19 | //config: default y | ||
20 | //config: select PLATFORM_LINUX | ||
21 | //config: help | ||
22 | //config: Receive files using the Xmodem protocol. | ||
23 | |||
24 | //applet:IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
25 | |||
26 | //kbuild:lib-$(CONFIG_RX) += rx.o | ||
17 | 27 | ||
18 | //usage:#define rx_trivial_usage | 28 | //usage:#define rx_trivial_usage |
19 | //usage: "FILE" | 29 | //usage: "FILE" |
@@ -101,7 +111,7 @@ static int receive(/*int read_fd, */int file_fd) | |||
101 | && blockBuf[blockLength - 3] == PAD | 111 | && blockBuf[blockLength - 3] == PAD |
102 | ) { | 112 | ) { |
103 | while (blockLength | 113 | while (blockLength |
104 | && blockBuf[blockLength - 1] == PAD | 114 | && blockBuf[blockLength - 1] == PAD |
105 | ) { | 115 | ) { |
106 | blockLength--; | 116 | blockLength--; |
107 | } | 117 | } |
diff --git a/miscutils/setsid.c b/miscutils/setsid.c index 9bddc2fcf..143a8f8fa 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c | |||
@@ -13,6 +13,15 @@ | |||
13 | * 2004-11-12 Paul Fox | 13 | * 2004-11-12 Paul Fox |
14 | * - busyboxed | 14 | * - busyboxed |
15 | */ | 15 | */ |
16 | //config:config SETSID | ||
17 | //config: bool "setsid" | ||
18 | //config: default y | ||
19 | //config: help | ||
20 | //config: setsid runs a program in a new session | ||
21 | |||
22 | //applet:IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
23 | |||
24 | //kbuild:lib-$(CONFIG_SETSID) += setsid.o | ||
16 | 25 | ||
17 | //usage:#define setsid_trivial_usage | 26 | //usage:#define setsid_trivial_usage |
18 | //usage: "[-c] PROG ARGS" | 27 | //usage: "[-c] PROG ARGS" |
diff --git a/miscutils/strings.c b/miscutils/strings.c index ee6649625..4d9bfe690 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c | |||
@@ -6,6 +6,16 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | //config:config STRINGS | ||
10 | //config: bool "strings" | ||
11 | //config: default y | ||
12 | //config: help | ||
13 | //config: strings prints the printable character sequences for each file | ||
14 | //config: specified. | ||
15 | |||
16 | //applet:IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
17 | |||
18 | //kbuild:lib-$(CONFIG_STRINGS) += strings.o | ||
9 | 19 | ||
10 | //usage:#define strings_trivial_usage | 20 | //usage:#define strings_trivial_usage |
11 | //usage: "[-fo] [-t o/d/x] [-n LEN] [FILE]..." | 21 | //usage: "[-fo] [-t o/d/x] [-n LEN] [FILE]..." |
diff --git a/miscutils/time.c b/miscutils/time.c index 19b0b44c9..a73a837d8 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -8,6 +8,17 @@ | |||
8 | Heavily modified by David MacKenzie <djm@gnu.ai.mit.edu>. | 8 | Heavily modified by David MacKenzie <djm@gnu.ai.mit.edu>. |
9 | Heavily modified for busybox by Erik Andersen <andersen@codepoet.org> | 9 | Heavily modified for busybox by Erik Andersen <andersen@codepoet.org> |
10 | */ | 10 | */ |
11 | //config:config TIME | ||
12 | //config: bool "time" | ||
13 | //config: default y | ||
14 | //config: help | ||
15 | //config: The time command runs the specified program with the given arguments. | ||
16 | //config: When the command finishes, time writes a message to standard output | ||
17 | //config: giving timing statistics about this program run. | ||
18 | |||
19 | //applet:IF_TIME(APPLET(time, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
20 | |||
21 | //kbuild:lib-$(CONFIG_TIME) += time.o | ||
11 | 22 | ||
12 | //usage:#define time_trivial_usage | 23 | //usage:#define time_trivial_usage |
13 | //usage: "[-v] PROG ARGS" | 24 | //usage: "[-v] PROG ARGS" |
diff --git a/miscutils/timeout.c b/miscutils/timeout.c index 8df9ff0fd..f29dc8a9c 100644 --- a/miscutils/timeout.c +++ b/miscutils/timeout.c | |||
@@ -27,6 +27,16 @@ | |||
27 | * splitszf 12-05-2006 by Roberto A. Foglietta | 27 | * splitszf 12-05-2006 by Roberto A. Foglietta |
28 | * rewrite 14-11-2008 vda | 28 | * rewrite 14-11-2008 vda |
29 | */ | 29 | */ |
30 | //config:config TIMEOUT | ||
31 | //config: bool "timeout" | ||
32 | //config: default y | ||
33 | //config: help | ||
34 | //config: Runs a program and watches it. If it does not terminate in | ||
35 | //config: specified number of seconds, it is sent a signal. | ||
36 | |||
37 | //applet:IF_TIMEOUT(APPLET(timeout, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
38 | |||
39 | //kbuild:lib-$(CONFIG_TIMEOUT) += timeout.o | ||
30 | 40 | ||
31 | //usage:#define timeout_trivial_usage | 41 | //usage:#define timeout_trivial_usage |
32 | //usage: "[-t SECS] [-s SIG] PROG ARGS" | 42 | //usage: "[-t SECS] [-s SIG] PROG ARGS" |
diff --git a/miscutils/ttysize.c b/miscutils/ttysize.c index d2d48d0a9..135ce8535 100644 --- a/miscutils/ttysize.c +++ b/miscutils/ttysize.c | |||
@@ -9,6 +9,18 @@ | |||
9 | * | 9 | * |
10 | * Licensed under GPLv2, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2, see file LICENSE in this source tree. |
11 | */ | 11 | */ |
12 | //config:config TTYSIZE | ||
13 | //config: bool "ttysize" | ||
14 | //config: default y | ||
15 | //config: help | ||
16 | //config: A replacement for "stty size". Unlike stty, can report only width, | ||
17 | //config: only height, or both, in any order. It also does not complain on | ||
18 | //config: error, but returns default 80x24. | ||
19 | //config: Usage in shell scripts: width=`ttysize w`. | ||
20 | |||
21 | //applet:IF_TTYSIZE(APPLET(ttysize, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
22 | |||
23 | //kbuild:lib-$(CONFIG_TTYSIZE) += ttysize.o | ||
12 | 24 | ||
13 | //usage:#define ttysize_trivial_usage | 25 | //usage:#define ttysize_trivial_usage |
14 | //usage: "[w] [h]" | 26 | //usage: "[w] [h]" |
diff --git a/miscutils/volname.c b/miscutils/volname.c index b50e79573..6d1addbb5 100644 --- a/miscutils/volname.c +++ b/miscutils/volname.c | |||
@@ -27,6 +27,15 @@ | |||
27 | * mods from distributed source (eject-2.0.13) are by | 27 | * mods from distributed source (eject-2.0.13) are by |
28 | * Matthew Stoltenberg <d3matt@gmail.com> | 28 | * Matthew Stoltenberg <d3matt@gmail.com> |
29 | */ | 29 | */ |
30 | //config:config VOLNAME | ||
31 | //config: bool "volname" | ||
32 | //config: default y | ||
33 | //config: help | ||
34 | //config: Prints a CD-ROM volume name. | ||
35 | |||
36 | //applet:IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
37 | |||
38 | //kbuild:lib-$(CONFIG_VOLNAME) += volname.o | ||
30 | 39 | ||
31 | //usage:#define volname_trivial_usage | 40 | //usage:#define volname_trivial_usage |
32 | //usage: "[DEVICE]" | 41 | //usage: "[DEVICE]" |
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index d3a76edf0..07ae64e52 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c | |||
@@ -8,6 +8,21 @@ | |||
8 | * | 8 | * |
9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
10 | */ | 10 | */ |
11 | //config:config WATCHDOG | ||
12 | //config: bool "watchdog" | ||
13 | //config: default y | ||
14 | //config: select PLATFORM_LINUX | ||
15 | //config: help | ||
16 | //config: The watchdog utility is used with hardware or software watchdog | ||
17 | //config: device drivers. It opens the specified watchdog device special file | ||
18 | //config: and periodically writes a magic character to the device. If the | ||
19 | //config: watchdog applet ever fails to write the magic character within a | ||
20 | //config: certain amount of time, the watchdog device assumes the system has | ||
21 | //config: hung, and will cause the hardware to reboot. | ||
22 | |||
23 | //applet:IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP)) | ||
24 | |||
25 | //kbuild:lib-$(CONFIG_WATCHDOG) += watchdog.o | ||
11 | 26 | ||
12 | //usage:#define watchdog_trivial_usage | 27 | //usage:#define watchdog_trivial_usage |
13 | //usage: "[-t N[ms]] [-T N[ms]] [-F] DEV" | 28 | //usage: "[-t N[ms]] [-T N[ms]] [-F] DEV" |