On Tuesday 26 January 2010 3:21:42 pm Xin LI wrote: > On 2010/01/26 08:40, John Baldwin wrote: > > I just have two suggestions/comments: > > @@ -295,6 +295,7 @@ struct ifreq { > [...] > > I prefer to not have this all on one line, but to instead be: > [...] > > Even better would be to actually define a separate type earlier > > in the file I think: > [...] > > I think caddr_t is deprecated in favor of void * for new APIs at least. > > I have split it into another type and used void *, also updated the > manual page. > > > Second, it would be nice if SIOCGIFDESCR provided length feedback to > > userland > > similar to sysctl(3). Maybe change the code to set ifr.ifr_buffer.length to > > the required length when returning ENAMETOOLONG. Userland can then just > > skip > > to that length directly, or instead use an idiom similar to sysctl where it > > does the following: > > Done in a slightly different way. It seems to be slightly wasteful (not > a big deal, though) to ioctl every time to obtain the length, so I used > an arbitrary number (2^6) and make the program to adapt to larger number > if kernel gave feedback with ENAMETOOLONG, and the buffer/length would > be used the next call.
Ok. My final suggestion is to start each sentence in the manual page on a new line as that is our style for manpages to ease the work of translators. -- John Baldwin _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"