6 |
have any suggestions how they plan to go about it, and to minimize conflicts |
have any suggestions how they plan to go about it, and to minimize conflicts |
7 |
between your work and theirs. But otherwise, all of these are fair game. |
between your work and theirs. But otherwise, all of these are fair game. |
8 |
|
|
9 |
Rob Landley <rob@landley.net>: |
Rob Landley suggested this: |
10 |
Add BB_NOMMU to platform.h and migrate __uClinux__ tests to that. |
Implement bb_realpath() that can handle NULL on non-glibc. |
|
#if defined __UCLIBC__ && !defined __ARCH_USE_MMU__ |
|
|
Add a libbb/platform.c |
|
|
Implement fdprintf() for platforms that haven't got one. |
|
|
Implement bb_realpath() that can handle NULL on non-glibc. |
|
|
Cleanup bb_asprintf() |
|
11 |
|
|
|
Migrate calloc() and bb_calloc() occurrences to bb_xzalloc(). |
|
12 |
Remove obsolete _() wrapper crud for internationalization we don't do. |
Remove obsolete _() wrapper crud for internationalization we don't do. |
13 |
Figure out where we need utf8 support, and add it. |
Figure out where we need utf8 support, and add it. |
14 |
|
|
15 |
sh |
sh |
16 |
The command shell situation is a big mess. We have three or four different |
The command shell situation is a mess. We have two different |
17 |
shells that don't really share any code, and the "standalone shell" doesn't |
shells that don't really share any code, and the "standalone shell" doesn't |
18 |
work all that well (especially not in a chroot environment), due to apps not |
work all that well (especially not in a chroot environment), due to apps not |
19 |
being reentrant. I'm writing a new shell (bbsh) to unify the various |
being reentrant. |
20 |
shells and configurably add the minimal set of bash features people |
|
|
actually use. The hardest part is it has to configure down as small as |
|
|
lash while providing lash's features. The rest is easy in comparison. |
|
|
bzip2 |
|
|
Compression-side support. |
|
|
init |
|
|
General cleanup (should use ENABLE_FEATURE_INIT_SYSLOG and ENABLE_FEATURE_INIT_DEBUG). |
|
|
depmod |
|
|
busybox lacks a way to update module deps when running from firmware without the |
|
|
use of the depmod.pl (perl is to bloated for most embedded setups) and or orig |
|
|
modutils. The orig depmod is rather pointless to have to add to a firmware image |
|
|
in when we already have a insmod/rmmod and friends. |
|
|
Unify base64 handling. |
|
|
There's base64 encoding and decoding going on in: |
|
|
networking/wget.c:base64enc() |
|
|
coreutils/uudecode.c:read_base64() |
|
|
coreutils/uuencode.c:tbl_base64[] |
|
|
networking/httpd.c:decodeBase64() |
|
|
And probably elsewhere. That needs to be unified into libbb functions. |
|
21 |
Do a SUSv3 audit |
Do a SUSv3 audit |
22 |
Look at the full Single Unix Specification version 3 (available online at |
Look at the full Single Unix Specification version 3 (available online at |
23 |
"http://www.opengroup.org/onlinepubs/009695399/nfindex.html") and |
"http://www.opengroup.org/onlinepubs/009695399/nfindex.html") and |
26 |
|
|
27 |
Even better would be some kind of automated compliance test harness that |
Even better would be some kind of automated compliance test harness that |
28 |
exercises each command line option and the various corner cases. |
exercises each command line option and the various corner cases. |
29 |
|
|
30 |
Internationalization |
Internationalization |
31 |
How much internationalization should we do? |
How much internationalization should we do? |
32 |
|
|
94 |
This one's open to everybody, but I'll wind up doing it... |
This one's open to everybody, but I'll wind up doing it... |
95 |
|
|
96 |
|
|
97 |
Bernhard Fischer <busybox@busybox.net> suggests to look at these: |
Bernhard Reutner-Fischer <busybox@busybox.net> suggests to look at these: |
98 |
New debug options: |
New debug options: |
99 |
-Wlarger-than-127 |
-Wlarger-than-127 |
100 |
Cleanup any big users |
Cleanup any big users |
|
-Wunused-parameter |
|
|
Facilitate applet PROTOTYPES to provide means for having applets that |
|
|
do a) not take any arguments b) need only one of argc or argv c) need |
|
|
both argc and argv. All of these three options should go for the most |
|
|
feature complete denominator. |
|
101 |
Collate BUFSIZ IOBUF_SIZE MY_BUF_SIZE PIPE_PROGRESS_SIZE BUFSIZE PIPESIZE |
Collate BUFSIZ IOBUF_SIZE MY_BUF_SIZE PIPE_PROGRESS_SIZE BUFSIZE PIPESIZE |
102 |
make bb_common_bufsiz1 configurable, size wise. |
make bb_common_bufsiz1 configurable, size wise. |
103 |
make pipesize configurable, size wise. |
make pipesize configurable, size wise. |
104 |
Use bb_common_bufsiz1 throughout applets! |
Use bb_common_bufsiz1 throughout applets! |
|
Add chrt applet. Please CC Bernhard if you suggest a patch. |
|
105 |
|
|
106 |
As yet unclaimed: |
As yet unclaimed: |
107 |
|
|
108 |
---- |
---- |
|
find |
|
|
doesn't understand (), lots of susv3 stuff. |
|
|
---- |
|
109 |
diff |
diff |
110 |
Make sure we handle empty files properly: |
Make sure we handle empty files properly: |
111 |
From the patch man page: |
From the patch man page: |
122 |
And while we're at it, a new patch filename quoting format is apparently |
And while we're at it, a new patch filename quoting format is apparently |
123 |
coming soon: http://marc.theaimsgroup.com/?l=git&m=112927316408690&w=2 |
coming soon: http://marc.theaimsgroup.com/?l=git&m=112927316408690&w=2 |
124 |
--- |
--- |
|
man |
|
|
It would be nice to have a man command. Not one that handles troff or |
|
|
anything, just one that can handle preformatted ascii man pages, possibly |
|
|
compressed. This could probably be a script in the extras directory that |
|
|
calls cat/zcat/bzcat | less |
|
|
|
|
|
(How doclifter might work into this is anybody's guess.) |
|
|
--- |
|
125 |
ar |
ar |
126 |
Write support? |
Write support! |
127 |
---- |
--- |
128 |
stty / catv |
stty / catv |
129 |
stty's visible() function and catv's guts are identical. Merge them into |
stty's visible() function and catv's guts are identical. Merge them into |
130 |
an appropriate libbb function. |
an appropriate libbb function. |
131 |
---- |
--- |
132 |
|
struct suffix_mult |
133 |
|
Several duplicate users of: grep -r "1024\*1024" * -B2 -A1 |
134 |
|
Merge to a single size_suffixes[] in libbb. |
135 |
|
Users: head tail od_bloaty hexdump and (partially as it wouldn't hurt) svlogd |
136 |
|
--- |
137 |
|
tail |
138 |
|
./busybox tail -f foo.c~ TODO |
139 |
|
should not print fmt=header_fmt for subsequent date >> TODO; i.e. only |
140 |
|
fmt+ if another (not the current) file did change |
141 |
|
|
142 |
Architectural issues: |
Architectural issues: |
143 |
|
|
165 |
--- |
--- |
166 |
Text buffer support. |
Text buffer support. |
167 |
Several existing applets (sort, vi, less...) read |
Several existing applets (sort, vi, less...) read |
168 |
a whole file into memory and act on it. There might be an opportunity |
a whole file into memory and act on it. Use open_read_close(). |
|
for shared code in there that could be moved into libbb... |
|
169 |
--- |
--- |
170 |
Memory Allocation |
Memory Allocation |
171 |
We have a CONFIG_BUFFER mechanism that lets us select whether to do memory |
We have a CONFIG_BUFFER mechanism that lets us select whether to do memory |
217 |
FEATURE_CLEAN_UP |
FEATURE_CLEAN_UP |
218 |
This is more an unresolved issue than a to-do item. More thought is needed. |
This is more an unresolved issue than a to-do item. More thought is needed. |
219 |
|
|
220 |
Normally we rely on exit() to free memory, close files, and unmap segments |
Normally we rely on exit() to free memory, close files and unmap segments |
221 |
for us. This makes most calls to free(), close(), and unmap() optional in |
for us. This makes most calls to free(), close(), and unmap() optional in |
222 |
busybox applets that don't intend to run for very long, and optional stuff |
busybox applets that don't intend to run for very long, and optional stuff |
223 |
can be omitted to save size. |
can be omitted to save size. |
246 |
For right now, exit() handles it just fine. |
For right now, exit() handles it just fine. |
247 |
|
|
248 |
|
|
|
|
|
249 |
Minor stuff: |
Minor stuff: |
250 |
watchdog.c could autodetect the timer duration via: |
watchdog.c could autodetect the timer duration via: |
251 |
if(!ioctl (fd, WDIOC_GETTIMEOUT, &tmo)) timer_duration = 1 + (tmo / 2); |
if(!ioctl (fd, WDIOC_GETTIMEOUT, &tmo)) timer_duration = 1 + (tmo / 2); |
258 |
use bb_perror_msg where appropriate: See |
use bb_perror_msg where appropriate: See |
259 |
egrep "[^_]perror" |
egrep "[^_]perror" |
260 |
--- |
--- |
|
Remove superfluous fmt occurances: e.g. |
|
|
fprintf(stderr, "%s: %s not found\n", "unalias", *argptr); |
|
|
-> fprintf(stderr, "unalias: %s not found\n", *argptr); |
|
|
--- |
|
261 |
possible code duplication ingroup() and is_a_group_member() |
possible code duplication ingroup() and is_a_group_member() |
262 |
--- |
--- |
263 |
Move __get_hz() to a better place and (re)use it in route.c, ash.c, msh.c |
Move __get_hz() to a better place and (re)use it in route.c, ash.c |
264 |
--- |
--- |
265 |
|
See grep -r strtod |
266 |
|
Alot of duplication that wants cleanup. |
267 |
|
--- |
268 |
|
in_ether duplicated in network/{interface,ifconfig}.c |
269 |
|
--- |
270 |
|
unify progress_meter. wget, flash_eraseall, pipe_progress, fbsplash, setfiles. |
271 |
|
--- |
272 |
|
support start-stop-daemon -d <chdir-path> |
273 |
|
|
274 |
Code cleanup: |
Code cleanup: |
275 |
|
|
276 |
Replace deprecated functions. |
Replace deprecated functions. |
277 |
|
|
|
bzero() -> memset() |
|
|
--- |
|
|
sigblock(), siggetmask(), sigsetmask(), sigmask() -> sigprocmask et al |
|
278 |
--- |
--- |
279 |
vdprintf() -> similar sized functionality |
vdprintf() -> similar sized functionality |
280 |
--- |
--- |
281 |
|
|
282 |
|
(TODO list after discussion 11.05.2009) |
283 |
|
|
284 |
|
* shrink tc/brctl/ip |
285 |
|
tc/brctl seem like fairly large things to try and tackle in your timeframe, |
286 |
|
and i think people have posted attempts in the past. Adding additional |
287 |
|
options to ip though seems reasonable. |
288 |
|
|
289 |
|
* add tests for some applets |
290 |
|
|
291 |
|
* implement POSIX utilities and audit them for POSIX conformance. then |
292 |
|
audit them for GNU conformance. then document all your findings in a new |
293 |
|
doc/conformance.txt file while perhaps implementing some of the missing |
294 |
|
features. |
295 |
|
you can find the latest POSIX documentation (1003.1-2008) here: |
296 |
|
http://www.opengroup.org/onlinepubs/9699919799/ |
297 |
|
and the complete list of all utilities that POSIX covers: |
298 |
|
http://www.opengroup.org/onlinepubs/9699919799/idx/utilities.html |
299 |
|
The first step would to generate a file/matrix what is already archived |
300 |
|
(also IPV6) |
301 |
|
|
302 |
|
* ntpdate/ntpd (see ntpclient and openntp for examples) |
303 |
|
|
304 |
|
* implement 'at' |
305 |
|
|
306 |
|
* rpcbind (former portmap) or equivalent |
307 |
|
so that we don't have to use -o nolock on nfs mounts |
308 |
|
|
309 |
|
* check IPV6 compliance |
310 |
|
|
311 |
|
* generate a mini example using kernel+busybox only (+libc) for example |
312 |
|
|
313 |
|
* more support for advanced linux 2.6.x features, see: iotop |
314 |
|
most likely there is more |
315 |
|
|
316 |
|
* even more support for statistics: mpstat, iostat, powertop.... |
317 |
|
|
318 |
|
|
319 |
|
Unicode work needed: |
320 |
|
|
321 |
|
Unicode support uses libc multibyte functions if LOCALE_SUPPORT is on |
322 |
|
(in this case, the code will also support many more encodings), |
323 |
|
or uses a limited subset of re-implemented multibyte functions |
324 |
|
which only understand "one byte == one char" and unicode. |
325 |
|
This is useful if you build against uclibc with locale support disabled. |
326 |
|
|
327 |
|
Unicode-dependent applets must call check_unicode_in_env() when they |
328 |
|
begin executing. |
329 |
|
|
330 |
|
Applet code may conditionalize on FEATURE_ASSUME_UNICODE |
331 |
|
in order to use more efficient code if unicode support is not requested. |
332 |
|
|
333 |
|
Available functions (if you need more, implement them in libbb/unicode.c |
334 |
|
so that they work without LOCALE_SUPPORT too): |
335 |
|
|
336 |
|
int bb_mbstrlen(str) - multibyte-aware strlen |
337 |
|
size_t mbstowcs(wdest, src, n) |
338 |
|
size_t wcstombs(dest, wsrc, n) |
339 |
|
size_t wcrtomb(str, wc, wstate) |
340 |
|
int iswspace(wc) |
341 |
|
int iswalnum(wc) |
342 |
|
int iswpunct(wc) |
343 |
|
|
344 |
|
Applets which only need to align columns on screen correctly: |
345 |
|
|
346 |
|
ls - already done, use source as an example |
347 |
|
df |
348 |
|
dumpleases |
349 |
|
lsmod |
350 |
|
|
351 |
|
Applets which need to account for Unicode chars |
352 |
|
while processing the output: |
353 |
|
|
354 |
|
[un]expand |
355 |
|
fold |
356 |
|
man |
357 |
|
watch |
358 |
|
cut (-b and -c are currently the same, needs fixing) |
359 |
|
|
360 |
|
These applets need to ensure that unicode input |
361 |
|
is handled correctly (say, <unicode><backspace> sequence): |
362 |
|
|
363 |
|
getty, login |
364 |
|
rm -i |
365 |
|
unzip (overwrite prompt) |
366 |
|
|
367 |
|
Viewers/editors are more difficult (many cases to get right). |
368 |
|
libbb/lineedit.c is an example how to do it: |
369 |
|
|
370 |
|
less, most, ed, vi |
371 |
|
awk |
372 |
|
[ef]grep |
373 |
|
sed |
374 |
|
|
375 |
|
Probably needs some specialized work: |
376 |
|
|
377 |
|
loadkeys |