70706dc113f3c11f7cc1f4c117b3cdb9659f96ef
[oweals/busybox.git] / TODO
1 TODO list for busybox in no particular order. Just because something
2 is listed here doesn't mean that it is going to be added to busybox,
3 or that doing so is even a good idea. It just means that I _might_ get
4 around to it some time. If you have any good ideas, please let me know.
5
6 * login/sulogin/passwd/getty/etc are part of tinylogin, and so are not
7     needed or wanted in busybox (or else I'd have to link to libcrypt).
8
9 * Networking apps are probably going to be split out some time soon into a
10     separate package (named perhaps netkit-tiny?).  This would remove the
11     following items from BusyBox: hostid, hostname, nc, nslookup, telnet, 
12     and ping.  nfs mounting and syslogd (when it supports network logging)
13     will remain in BusyBox.
14
15  -Erik
16
17 -----------
18
19 Bugs that need fixing before the 0.44 release goes out the door:
20
21  - mkfs.minix rev 1.7 completely broke the parser.  Fix it.
22  - 'grep foo$ file' doesn't work
23  - 'grep *foo file' segfaults
24  - ps dirent race bug (need to stat the file before attempting chdir)
25  - The following commands segfault:
26         chmod -R
27         chown -R
28         chgrp -R
29   - I believe that swaponoff may also be also broken (check it).
30   - It used to be that BusyBox tar would happily overwrite existing files on
31       an extraction.  However, as of 0.42, BusyBox tar simply dies as soon as an 
32       existing file is found.
33   - Make 'mount -a' work even when /proc isn't mounted (ugly bug).
34   - Make 'ln -s /tmp/file .' work the way GNU ln does (i.e. makes a link to 
35     /tmp/file in the current directory, rather then trying and failing to create
36     a symlink named "." in the current working directory).
37   - implement 'ls -R'.
38   - "cp -a sourcedir/*" (note: no dest) - produces an odd error message about
39     the last file in the dir, rather than saying "missing destination file".
40   - "math" should also take input from stdin
41   - "more" doesn't accept " " to scroll by one page when BB_FEATURE_USE_TERMIOS
42     is not on.
43
44
45 -----------
46
47 * Make insmod actually work
48 * dnsdomainname
49 * traceroute/netstat
50 * rdate
51 * hwclock
52 * stty
53 * expr
54 * wget (or whatever I call it)
55 * tftp
56 * ftp
57 * group/commonize strings, remove dups (for i18n, l10n)
58
59
60 -----------------------
61
62 Running the following:
63
64     rm -f busybox && make LDFLAGS+=-nostdlib 2>&1 | \
65         sed -ne 's/.*undefined reference to `\(.*\)..*/\1/gp' | sort | uniq
66
67 reveals the list of all external (i.e. libc) things that BusyBox depends on.
68 It would be a very nice thing to reduce this list to an absolute minimum, and
69 then create a microLibc to provide these functions.  There is no good reason
70 for GNU libc to be so big.  I'm sure it can be a lot better.
71
72 (BTW, this is more informative if BB_FEATURE_NFSMOUNT is turned off...)
73
74 Most wanted list:
75
76     [andersen@slag busybox]$ grep -l getgroups *.[ch]
77     test.c
78
79 Policy violation.  getgroups uses libc nss, which is unlikely
80 to be present in an embedded system.
81
82 To be replaced with a busybox local glob routine:
83
84     [andersen@slag busybox]$ grep -l glob *.[ch]
85     gunzip.c
86     gzip.c
87     sh.c
88     tar.c
89     telnet.c
90
91 Can check_wildcard_match() from utility.c do this job?
92
93
94 -----------------------
95
96 Compile with debugging on, run 'nm --size-sort ./busybox'
97 and then start with the biggest things and make them smaller...
98
99 -----------------------
100
101 busybox.defs.h is too big and hard to follow.
102
103 Perhaps I need to add a better build system (like the Linux kernel?)
104
105 -----------------------
106
107 Feature request:
108
109 /bin/busybox --install -s    which makes all links to commands that it
110   can support (an optionnal -s should be used for symbolic links instead
111   of hard links).
112
113 -----------------------
114
115
116 > Have you ever thought of doig network logging in busybox syslogd ? It
117 > would quite make sense on embedded systems... :)
118
119 So far I had not considered it.  Basically, you wish to have
120 messages from the embedded box logged to a remote network
121 syslog box, right?  I can see that this would be useful.
122 I'll add this to the TODO list,
123
124
125 -----------------------
126
127
128  I think that the add_inode &c in utility.c needs to also stow the
129  st_dev field, and that du.c should NOT call `reset_inode_list'
130  because there can be hard links from inside one argv/ to inside
131  another argv/.  du.c probably ought to have an -x switch like GNU du
132  does also...
133
134
135 ------------------------------------------------------------------
136
137 An interesting email listing some apps that use /proc.  BusyBox
138 tries to avoid /proc as mush as is possible, so this stuff is
139 interesting (to me at least):
140
141
142 Date:   Fri, 25 Feb 2000 08:23:12 +0000 (GMT)
143 From: Riley Williams <rhw@MemAlpha.CX>
144 X-Sender: rhw@moo.cus.org.uk
145 To: almesber@lrc.di.epfl.ch
146 Cc: "Albert D. Cahalan" <acahalan@cs.uml.edu>,
147         Linux Kernel <linux-kernel@vger.rutgers.edu>
148 Subject: Re: What /proc should contain [was: /proc/driver/microcode]
149 In-Reply-To: <20000224165245.A29790@lrc.di.epfl.ch>
150 Message-ID: <Pine.LNX.4.21.0002250806220.8741-100000@moo.cus.org.uk>
151 Sender: owner-linux-kernel@vger.rutgers.edu
152 Precedence: bulk
153
154 Hi there.
155
156  >> Nope, most /proc access is does via programs written in C.
157
158  > That varies a lot from file to file. E.g. I haven't seen any
159  > programs that are specificly designed to read /proc/atm/* yet,
160  > and I know of only one (fuser) that reads /proc/mounts,
161  > extracting only partial information (just to pick two examples
162  > that I'm quite familiar with).
163
164 As a point of reference, here's a slightly tweaked analysis of the
165 programs on the system I'm reading your mail on. Basically, I ran the
166 following script...
167
168  Q> #!/bin/bash
169  Q> function use() {
170  Q>     for Z in $* ; do
171  Q>         strings $Z | grep /proc | sed "s=^=$Z ="
172  Q>     done
173  Q> }
174  Q> use /{,s}bin/* /usr/{,s}bin/* | sort -u | tee proc-usage
175
176 ...and then went through it removing comments and print format
177 strings. Replace /proc with /dev and you'd soon have an equivalent
178 list for that - although I can report that such is MUCH larger...
179
180 There are three programs therein that refer to /proc/mounts ...
181
182         /bin/mount
183         /bin/umount
184         /usr/bin/eject
185
186 ...and, as you stated, none that refer to /proc/atm on this system.
187 However, as this is a RedHat Linux 5.0 based system, that's not
188 necessarily an up to date reference thereto...
189
190 Here's the list anyway...
191
192 /bin/kill /proc/%d/cmdline
193 /bin/kill /proc/%d/stat
194
195 /bin/mount /proc/devices
196 /bin/mount /proc/filesystems
197 /bin/mount /proc/mounts
198
199 /bin/netstat /proc/net
200 /bin/netstat /proc/net/appletalk
201 /bin/netstat /proc/net/ax25
202 /bin/netstat /proc/net/ax25_route
203 /bin/netstat /proc/net/dev
204 /bin/netstat /proc/net/ip_masquerade
205 /bin/netstat /proc/net/ipx
206 /bin/netstat /proc/net/ipx_route
207 /bin/netstat /proc/net/netstat
208 /bin/netstat /proc/net/nr
209 /bin/netstat /proc/net/nr_neigh
210 /bin/netstat /proc/net/nr_nodes
211 /bin/netstat /proc/net/raw
212 /bin/netstat /proc/net/route
213 /bin/netstat /proc/net/rt_cache
214 /bin/netstat /proc/net/snmp
215 /bin/netstat /proc/net/tcp
216 /bin/netstat /proc/net/udp
217 /bin/netstat /proc/net/unix
218
219 /bin/umount /proc/devices
220 /bin/umount /proc/mounts
221
222 /sbin/arp /proc/net/appletalk
223 /sbin/arp /proc/net/arp
224 /sbin/arp /proc/net/ax25
225 /sbin/arp /proc/net/ipx
226 /sbin/arp /proc/net/nr
227 /sbin/arp /proc/net/unix
228
229 /sbin/cardctl /proc/devices
230
231 /sbin/cardmgr /proc/devices
232
233 /sbin/fdisk /proc/ide/%s/media
234 /sbin/fdisk /proc/scsi/scsi
235
236 /sbin/getty /proc/version
237
238 /sbin/ifconfig /proc/net
239 /sbin/ifconfig /proc/net/appletalk
240 /sbin/ifconfig /proc/net/ax25
241 /sbin/ifconfig /proc/net/dev
242 /sbin/ifconfig /proc/net/ipx
243 /sbin/ifconfig /proc/net/nr
244 /sbin/ifconfig /proc/net/unix
245
246 /sbin/ifup /proc/sys/kernel/modprobe
247
248 /sbin/ipchains /proc/net/ip_fwchains
249 /sbin/ipchains /proc/net/ip_fwnames
250 /sbin/ipchains /proc/net/ip_masquerade
251 /sbin/ipchains /proc/sys/net/ipv4/ip_forward
252
253 /sbin/ipmaddr /proc/net/dev_mcast
254 /sbin/ipmaddr /proc/net/igmp
255 /sbin/ipmaddr /proc/net/igmp6
256
257 /sbin/iptunnel /proc/net/dev
258
259 /sbin/killall5 /proc/%s/cmdline
260 /sbin/killall5 /proc/%s/exe
261 /sbin/killall5 /proc/%s/stat
262 /sbin/killall5 /proc/version
263
264 /sbin/klogd /proc/kmsg
265
266 /sbin/lsmod /proc/modules
267
268 /sbin/modprobe /proc/modules
269
270 /sbin/pidof /proc/%s/cmdline
271 /sbin/pidof /proc/%s/exe
272 /sbin/pidof /proc/%s/stat
273 /sbin/pidof /proc/version
274
275 /sbin/probe /proc/pci
276
277 /sbin/rarp /proc/net/ax25
278 /sbin/rarp /proc/net/nr
279 /sbin/rarp /proc/net/rarp
280
281 /sbin/rmmod /proc/modules
282
283 /sbin/rmmod.static /proc/modules
284
285 /sbin/route /proc/net/appletalk
286 /sbin/route /proc/net/ax25
287 /sbin/route /proc/net/ax25_route
288 /sbin/route /proc/net/ipx
289 /sbin/route /proc/net/ipx_route
290 /sbin/route /proc/net/nr
291 /sbin/route /proc/net/nr_neigh
292 /sbin/route /proc/net/nr_nodes
293 /sbin/route /proc/net/route
294 /sbin/route /proc/net/rt_cache
295 /sbin/route /proc/net/unix
296
297 /sbin/scsi_info /proc/scsi
298 /sbin/scsi_info /proc/scsi/%s
299 /sbin/scsi_info /proc/scsi/scsi
300
301 /sbin/slattach /proc/net/ax25
302 /sbin/slattach /proc/net/nr
303
304 /sbin/swapoff /proc/swaps
305
306 /sbin/swapon /proc/swaps
307
308 /sbin/uugetty /proc/version
309
310 /usr/bin/dig /proc/
311 /usr/bin/dig /proc/interrupts
312 /usr/bin/dig /proc/meminfo
313 /usr/bin/dig /proc/rtc
314 /usr/bin/dig /proc/self/status
315 /usr/bin/dig /proc/stat
316
317 /usr/bin/dnsquery /proc/
318 /usr/bin/dnsquery /proc/interrupts
319 /usr/bin/dnsquery /proc/meminfo
320 /usr/bin/dnsquery /proc/rtc
321 /usr/bin/dnsquery /proc/self/status
322 /usr/bin/dnsquery /proc/stat
323
324 /usr/bin/eject /proc/mounts
325
326 /usr/bin/emacs /proc/loadavg
327
328 /usr/bin/fetchmail /proc/net/dev
329
330 /usr/bin/free /proc/meminfo
331
332 /usr/bin/gmake /proc/loadavg
333
334 /usr/bin/gpm-root /proc/loadavg
335 /usr/bin/gpm-root /proc/meminfo
336
337 /usr/bin/host /proc/
338 /usr/bin/host /proc/interrupts
339 /usr/bin/host /proc/meminfo
340 /usr/bin/host /proc/rtc
341 /usr/bin/host /proc/self/status
342 /usr/bin/host /proc/stat
343
344 /usr/bin/hoststat /proc/loadavg
345
346 /usr/bin/hwdiag /proc/cpuinfo
347 /usr/bin/hwdiag /proc/pci
348 /usr/bin/hwdiag /proc/scsi/scsi
349 /usr/bin/hwdiag /proc/version
350
351 /usr/bin/lsdev /proc/dma
352 /usr/bin/lsdev /proc/interrupts
353 /usr/bin/lsdev /proc/ioports
354
355 /usr/bin/mailq /proc/loadavg
356
357 /usr/bin/make /proc/loadavg
358
359 /usr/bin/mcookie /proc/loadavg
360 /usr/bin/mcookie /proc/stat
361
362 /usr/bin/newaliases /proc/loadavg
363
364 /usr/bin/nslookup /proc/
365 /usr/bin/nslookup /proc/interrupts
366 /usr/bin/nslookup /proc/meminfo
367 /usr/bin/nslookup /proc/rtc
368 /usr/bin/nslookup /proc/self/status
369 /usr/bin/nslookup /proc/stat
370
371 /usr/bin/nsupdate /proc/
372 /usr/bin/nsupdate /proc/interrupts
373 /usr/bin/nsupdate /proc/meminfo
374 /usr/bin/nsupdate /proc/rtc
375 /usr/bin/nsupdate /proc/self/status
376 /usr/bin/nsupdate /proc/stat
377
378 /usr/bin/pgp /proc/version
379 /usr/bin/pgpe /proc/version
380 /usr/bin/pgpk /proc/version
381 /usr/bin/pgps /proc/version
382 /usr/bin/pgpv /proc/version
383
384 /usr/bin/procinfo /proc/cmdline
385 /usr/bin/procinfo /proc/devices
386 /usr/bin/procinfo /proc/dma
387 /usr/bin/procinfo /proc/filesystems
388 /usr/bin/procinfo /proc/interrupts
389 /usr/bin/procinfo /proc/loadavg
390 /usr/bin/procinfo /proc/meminfo
391 /usr/bin/procinfo /proc/modules
392 /usr/bin/procinfo /proc/stat
393 /usr/bin/procinfo /proc/uptime
394 /usr/bin/procinfo /proc/version
395
396 /usr/bin/purgestat /proc/loadavg
397
398 /usr/bin/screen /proc/loadavg
399
400 /usr/bin/strace /proc/%d/stat
401
402 /usr/bin/top /proc/cpuinfo
403 /usr/bin/top /proc/meminfo
404 /usr/bin/top /proc/stat
405
406 /usr/bin/vmstat /proc/%s/stat
407 /usr/bin/vmstat /proc/meminfo
408 /usr/bin/vmstat /proc/stat
409
410 /usr/sbin/atd /proc/loadavg
411
412 /usr/sbin/dnskeygen /proc/
413 /usr/sbin/dnskeygen /proc/interrupts
414 /usr/sbin/dnskeygen /proc/meminfo
415 /usr/sbin/dnskeygen /proc/rtc
416 /usr/sbin/dnskeygen /proc/self/status
417 /usr/sbin/dnskeygen /proc/stat
418
419 /usr/sbin/fuser /proc/%d/stat
420 /usr/sbin/fuser /proc/net/%s
421 /usr/sbin/fuser /proc/net/unix
422
423 /usr/sbin/in.identd /proc/net/tcp
424
425 /usr/sbin/irpd /proc/
426 /usr/sbin/irpd /proc/interrupts
427 /usr/sbin/irpd /proc/meminfo
428 /usr/sbin/irpd /proc/rtc
429 /usr/sbin/irpd /proc/self/status
430 /usr/sbin/irpd /proc/stat
431
432 /usr/sbin/named /proc/
433 /usr/sbin/named /proc/interrupts
434 /usr/sbin/named /proc/meminfo
435 /usr/sbin/named /proc/rtc
436 /usr/sbin/named /proc/self/status
437 /usr/sbin/named /proc/stat
438
439 /usr/sbin/named-xfer /proc/
440 /usr/sbin/named-xfer /proc/interrupts
441 /usr/sbin/named-xfer /proc/meminfo
442 /usr/sbin/named-xfer /proc/rtc
443 /usr/sbin/named-xfer /proc/self/status
444 /usr/sbin/named-xfer /proc/stat
445
446 /usr/sbin/readprofile /proc/profile
447
448 /usr/sbin/rwhod /proc/loadavg
449 /usr/sbin/rwhod /proc/uptime
450
451 /usr/sbin/sendmail /proc/loadavg
452
453 /usr/sbin/setconsole /proc/openprom/options
454 /usr/sbin/setconsole /proc/openprom/options/${console}-mode
455 /usr/sbin/setconsole /proc/openprom/options/input-device
456 /usr/sbin/setconsole /proc/openprom/options/output-device
457
458 Best wishes from Riley.
459
460  * Copyright (C) 1999, Memory Alpha Systems.
461  * All rights and wrongs reserved.
462
463 +----------------------------------------------------------------------+
464 | There is something frustrating about the quality and speed of Linux  |
465 | development, ie., the quality is too high and the speed is too high, |
466 | in other words, I can implement this XXXX feature, but I bet someone |
467 | else has already done so and is just about to release their patch.   |
468 +----------------------------------------------------------------------+
469  * http://www.memalpha.cx/Linux/Kernel/
470
471
472 -
473 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
474 the body of a message to majordomo@vger.rutgers.edu
475 Please read the FAQ at http://www.tux.org/lkml/
476