On Thu, Sep 13, 2012 at 01:41:16PM -0400, Ed Maste wrote:
I'm taking a look at the FreeBSD NetCF porting that Sean and
Hiren
posted to this list last June, and want to help get it into a form
where it can be committed.
> Hmm. If the "Linux" sources are useful on FreeBSD, maybe they need to be
> relabelled :-)
>
> What's the proper term for "Unix-like" that doesn't step on
anyone's
> trademark/ego? "STARNIX" ? "UNIXLIKE" ? Or should it be split
into
> dutil_augeas.* and dutil_libnl.*?
It looks like the primary code reused from dutil_linux.c is
exec_program / run_program (nl and augeas aren't used). Would calling
it dutil_posix be reasonable?
Yes that sounds fine.
One item I noticed during review, the char *-returning strerror_r is a
GNU-specific version and the current code addresses this with an
#ifdef __FreeBSD__ for each use. Just calling strerror_r first should
be fine on both platforms - any objection to changing each
report_error(..., strerror_r(errno, errbuf, sizeof(errbuf));
to
strerror_r(errno, errbuf, sizeof(errbuf));
report_error(..., errbuf);
No need to #ifdef for BSD. Instead just add 'strerror_r-posix' to
the GNULIB bootstrap.conf file. That will bring in a version that
complies with the POSIX signature, ie returns int, not char *
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|