Re: [go PATCH] Add support for virNetworkPort object and APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 18, 2019 at 06:33:01PM +0200, Christophe de Dinechin wrote:
> 
> 
> > On 18 Jun 2019, at 17:43, Daniel P. Berrangé <berrange@xxxxxxxxxx> wrote:
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> > ---
> > network.go              |  80 ++++++++++++++
> > network_port.go         | 233 ++++++++++++++++++++++++++++++++++++++++
> > network_port_compat.h   |  67 ++++++++++++
> > network_port_wrapper.go | 197 +++++++++++++++++++++++++++++++++
> > network_port_wrapper.h  |  79 ++++++++++++++
> > network_wrapper.go      |  73 +++++++++++++
> > network_wrapper.h       |  23 ++++
> > 7 files changed, 752 insertions(+)
> > create mode 100644 network_port.go
> > create mode 100644 network_port_compat.h
> > create mode 100644 network_port_wrapper.go
> > create mode 100644 network_port_wrapper.h

> > +package libvirt
> > +
> > +/*
> > +#cgo pkg-config: libvirt
> > +#include <assert.h>
> > +#include "network_port_wrapper.h"
> > +
> > +virNetworkPtr
> > +virNetworkPortGetNetworkWrapper(virNetworkPortPtr port,
> > +				virErrorPtr err)
> > +{
> > +#if LIBVIR_VERSION_NUMBER < 5005000
> > +    assert(0); // Caller should have checked version
> 
> What about
> 
> assert(!”C function not available in this version - Caller should have checked version”);
> 
> ?

That's certainly possible, but I'm not sure its worth bothering with
since this should never be hit in practice & if it is hit we'll  see
the offending code in the crash dump easily enough.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux