[PATCH] add a few new xfuns and use them as appropriate

Denis Vlasenko vda at ilport.com.ua
Tue Mar 14 06:45:33 UTC 2006


On Monday 13 March 2006 17:47, Rob Landley wrote:
> On Monday 13 March 2006 1:58 am, Denis Vlasenko wrote:
> > On Monday 13 March 2006 08:57, Denis Vlasenko wrote:
> > > On Monday 13 March 2006 08:56, Denis Vlasenko wrote:
> > > > Patches are posted as replies. Please apply.
> > >
> > > This patch adds xstat() and uses it where appropriate.
> >
> > This patch replaces open() with bb_xopen() where appropriate.
> > --
> > vda
> 
> No, it also adds xsocket()

Oops... stuff got mixed it a bit...

> and adds at least one comment that it can't decide  
> whether or not to use it (the point at which I put it on the "to look at 
> later" pile.)

That's because I am trying to do things in small enough steps
in order to not annoy the maintainer ;)

For example:

-               int probe_fd = socket(AF_INET, SOCK_DGRAM, 0);
+               int probe_fd = socket(AF_INET, SOCK_DGRAM, 0); /* maybe use xsocket? */

                if (probe_fd < 0) {
                        bb_error_msg("socket");
                        exit(2);
                }

It's not 100% clear that xsocket will be identical here (will it exit with errorcode 2?).
I am leaving it to later time by just adding a reminder.

Thanks for applying stat.patch. Rest of them, rediffed & updated, are below.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stat2.patch
Type: text/x-diff
Size: 16758 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060314/8dd95052/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stat3.patch
Type: text/x-diff
Size: 6519 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060314/8dd95052/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stat4.patch
Type: text/x-diff
Size: 7250 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060314/8dd95052/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stat5.patch
Type: text/x-diff
Size: 6314 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060314/8dd95052/attachment-0003.bin 


More information about the busybox mailing list