Re: [libvirt] [PATCH] virConnectGetHostname: return a fully qualified hostname

2009-01-07 Thread Daniel Veillard
On Thu, Dec 11, 2008 at 09:24:27PM +, David Lutterkort wrote: Here is a revised patch that addresses all the comments from Jim and Dan: * Use getaddrinfo instead of gethostbyname * Terminate hostname explicitly with NUL_TERMINATE * Do not repeat constant

Re: [libvirt] [PATCH] virConnectGetHostname: return a fully qualified hostname

2008-12-11 Thread Jim Meyering
David Lutterkort [EMAIL PROTECTED] wrote: The attached patch makes virConnectGetHostname try a little harder to get a FQDN on systems where gethostname only returns a short name without a domain (which is pretty useless). The behavior is equivalent to 'hostname --fqdn'. Hi David, ACK, modulo

Re: [libvirt] [PATCH] virConnectGetHostname: return a fully qualified hostname

2008-12-11 Thread Daniel P. Berrange
On Wed, Dec 10, 2008 at 07:33:17PM -0800, David Lutterkort wrote: The attached patch makes virConnectGetHostname try a little harder to get a FQDN on systems where gethostname only returns a short name without a domain (which is pretty useless). The behavior is equivalent to 'hostname --fqdn'.

Re: [libvirt] [PATCH] virConnectGetHostname: return a fully qualified hostname

2008-12-11 Thread Daniel P. Berrange
On Wed, Dec 10, 2008 at 07:33:17PM -0800, David Lutterkort wrote: The attached patch makes virConnectGetHostname try a little harder to get a FQDN on systems where gethostname only returns a short name without a domain (which is pretty useless). The behavior is equivalent to 'hostname --fqdn'.

Re: [libvirt] [PATCH] virConnectGetHostname: return a fully qualified hostname

2008-12-11 Thread David Lutterkort
Here is a revised patch that addresses all the comments from Jim and Dan: * Use getaddrinfo instead of gethostbyname * Terminate hostname explicitly with NUL_TERMINATE * Do not repeat constant HOST_NAME_MAX+1 * Use tabs, not spaces in libvirt_sym.version.in David From

Re: [libvirt] [PATCH] virConnectGetHostname: return a fully qualified hostname

2008-12-11 Thread David Lutterkort
On Thu, 2008-12-11 at 10:29 +, Daniel P. Berrange wrote: ACK to the rest of the patch - particularly the removal of all those duplicated impls ! I would have liked to have just one impl of virConnectGetHostname that does the whole gethostname dance, but each driver uses slightly different

[libvirt] [PATCH] virConnectGetHostname: return a fully qualified hostname

2008-12-10 Thread David Lutterkort
The attached patch makes virConnectGetHostname try a little harder to get a FQDN on systems where gethostname only returns a short name without a domain (which is pretty useless). The behavior is equivalent to 'hostname --fqdn'. From 2ae57d0c8c68c453b3f9715fcc9f83af0ebe84a0 Mon Sep 17 00:00:00