[netcf-devel] NetCF FreeBSD porting

Ed Maste emaste at freebsd.org
Thu Sep 13 17:41:16 UTC 2012


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?

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);

-Ed


More information about the netcf-devel mailing list