[BusyBox] interesing ash module?

Matt Kraai kraai at verona.lineo.com
Sat Dec 30 08:00:56 UTC 2000


On Sat, Dec 30, 2000 at 10:47:52AM +0300, Vladimir N. Oleynik wrote:
> Matt Kraai wrote:
> > > 4) put into functions Xerror_msg_and_die putc('\n', stderr) and
> > > remove fflush(stderr);
> > 
> > Why?
> 
> exit(code) C standart usage flushall(), and stderr also not buffered.
> And removed all '\n' in end line in usage.c and all lines in
> Xerror_msg_adn_die - economy size.

So you are saying that

 (a) stderr isn't buffered so it doesn't need to be flushed, and
 (b) the putc eliminates the final '\n' in all the error message strings?

I think the fact that exit(3) calls flushall(3) is irrelevant
since the code is called by error_msg which doesn't necessarily
exit immediately.

That said, given (a) it sounds like eliminating the fflush is a
good idea.  And assuming that adding the putc(3) reduces the
binary size, that also sounds like a good idea.  Feel free to
post a patch to that effect.

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20001230/d5eef3fa/attachment.pgp 


More information about the busybox mailing list