[libvirt] [PATCH v2 3/5] Remove network constants out of internal.h

Peter Krempa pkrempa at redhat.com
Tue Jul 11 12:48:56 UTC 2017


On Tue, Jul 11, 2017 at 13:38:56 +0100, Daniel Berrange wrote:
> On Tue, Jul 11, 2017 at 02:27:10PM +0200, Peter Krempa wrote:
> > On Mon, Jul 10, 2017 at 16:07:08 +0100, Daniel Berrange wrote:
> > > On Mon, Jul 10, 2017 at 01:01:26PM +0200, Peter Krempa wrote:
> > > > On Wed, Jul 05, 2017 at 12:58:49 +0100, Daniel Berrange wrote:

[...]

> > > > > +# ifndef HOST_NAME_MAX
> > > > > +#  define HOST_NAME_MAX 256
> > > > 
> > > > I'm not entirely convinced that this semantically belongs to
> > > > virsocketaddr.h
> > > > 
> > > > At least in the virlog.c usage case it is not used in any way in regards
> > > > to network communication.
> > > 
> > > The constant is used to define a hostname string buffer, which is then
> > > used with the gethostname() system call. That's network related IMHO.
> > 
> > I find it weird, that it gets defined in virsocketaddr.h, but the only
> > usage is in src/util/virutil.c thus it needs cross-inclusions which were
> > not in place prior to the move.
> > 
> > Should perhaps virGetHostnameImpl and friends be moved too in that case?
> 
> Lets just move HOST_NAME_MAX out of the headers entirely and just pyut it
> in virutil.c at the virGetHostname method definition.

Yep, that's reasonable. ACK to that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170711/8038b9e8/attachment-0001.sig>


More information about the libvir-list mailing list