On 13 September 2012 13:46, Daniel P. Berrange <berra...@redhat.com> wrote: >> 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.
In order to submit a patch I'm trying to refactor and test this on some Linux distribution, but I haven't yet been able to get the stock source to build on either the Ubuntu (12.04) or CentOS (6.3) virtual machines I have. It looks I have a libnl3 on Ubuntu with header problems and no libnl3 package available for CentOS. Can you suggest a working Linux reference platform I should use for testing the FreeBSD porting changes? > >> >> 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 :| _______________________________________________ netcf-devel mailing list netcf-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/netcf-devel