[libvirt] [PATCH] virnetdevbandwidthtest: fix hard coded /sbin/tc
by Cédric Bosdonnat
On openSuse, (and possibly other distros), tc isn't located in
/sbin/tc. To get rid of that problem, use TC constant instead of hard
coded /sbin/tc in the expected string
---
tests/virnetdevbandwidthtest.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c
index 609deb8..5bcab12 100644
--- a/tests/virnetdevbandwidthtest.c
+++ b/tests/virnetdevbandwidthtest.c
@@ -125,14 +125,14 @@ mymain(void)
" <inbound average='1' peak='2' floor='3' burst='4'/>"
" <outbound average='5' peak='6' burst='7'/>"
"</bandwidth>"),
- ("/sbin/tc qdisc del dev eth0 root\n"
- "/sbin/tc qdisc del dev eth0 ingress\n"
- "/sbin/tc qdisc add dev eth0 root handle 1: htb default 1\n"
- "/sbin/tc class add dev eth0 parent 1: classid 1:1 htb rate 1kbps ceil 2kbps burst 4kb\n"
- "/sbin/tc qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10\n"
- "/sbin/tc filter add dev eth0 parent 1:0 protocol ip handle 1 fw flowid 1\n"
- "/sbin/tc qdisc add dev eth0 ingress\n"
- "/sbin/tc filter add dev eth0 parent ffff: protocol ip u32 match ip src 0.0.0.0/0 "
+ (TC " qdisc del dev eth0 root\n"
+ TC " qdisc del dev eth0 ingress\n"
+ TC " qdisc add dev eth0 root handle 1: htb default 1\n"
+ TC " class add dev eth0 parent 1: classid 1:1 htb rate 1kbps ceil 2kbps burst 4kb\n"
+ TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10\n"
+ TC " filter add dev eth0 parent 1:0 protocol ip handle 1 fw flowid 1\n"
+ TC " qdisc add dev eth0 ingress\n"
+ TC " filter add dev eth0 parent ffff: protocol ip u32 match ip src 0.0.0.0/0 "
"police rate 5kbps burst 7kb mtu 64kb drop flowid :1\n"));
return ret;
--
1.8.5.2
10 years, 9 months
[libvirt] [PATCH] [RFC] libxl: add discard support to libxl_device_disk
by Olaf Hering
Translate libvirt discard settings into libxl-4.5 discard settings.
It makes use of upcoming changes for xen-4.5:
http://lists.xenproject.org/archives/html/xen-devel/2014-01/msg02632.html
This patch is not compile tested. How is a config file supposed to look
like to make use of a discard=on|off flag for a given disk image?
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
Cc: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_conf.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 4cefadf..8fc5e75 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -707,6 +707,26 @@ error:
return -1;
}
+static void
+libxlDiskSetDiscard(libxl_device_disk *x_disk, int discard)
+{
+ if (!x_disk->readwrite)
+ return;
+#if defined(LIBXL_HAVE_LIBXL_DEVICE_DISK_DISCARD_ENABLE)
+ /* libxl 4.5 */
+ switch (discard) {
+ case VIR_DOMAIN_DISK_DISCARD_DEFAULT:
+ case VIR_DOMAIN_DISK_DISCARD_UNMAP:
+ x_disk->discard_enable = 1;
+ break;
+ default:
+ case VIR_DOMAIN_DISK_DISCARD_IGNORE:
+ x_disk->discard_enable = 0;
+ break;
+ }
+#endif
+}
+
int
libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
{
@@ -817,6 +837,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
x_disk->removable = 1;
x_disk->readwrite = !l_disk->readonly;
x_disk->is_cdrom = l_disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM ? 1 : 0;
+ libxlDiskSetDiscard(x_disk, l_disk->discard);
if (l_disk->transient) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("libxenlight does not support transient disks"));
10 years, 9 months
[libvirt] [PATCH 0/2] Fix the scsi util test failure
by Osier Yang
Detected by Pavel reported.
Osier Yang (2):
util: Accept test data path for scsi device's sg_path
tests: Modify the scsi util tests
src/util/virscsi.c | 3 ++-
tests/virscsidata/1:0:0:0/block/sdh/dev | 1 +
tests/virscsidata/1:0:0:0/block/sr0/dev | 1 -
tests/virscsidata/1:0:0:0/scsi_generic/sg1/dev | 1 -
tests/virscsidata/1:0:0:0/scsi_generic/sg8/dev | 1 +
tests/virscsidata/sg0 | 0
tests/virscsidata/sg8 | 0
tests/virscsitest.c | 4 ++--
8 files changed, 6 insertions(+), 5 deletions(-)
create mode 100644 tests/virscsidata/1:0:0:0/block/sdh/dev
delete mode 100644 tests/virscsidata/1:0:0:0/block/sr0/dev
delete mode 100644 tests/virscsidata/1:0:0:0/scsi_generic/sg1/dev
create mode 100644 tests/virscsidata/1:0:0:0/scsi_generic/sg8/dev
create mode 100644 tests/virscsidata/sg0
create mode 100644 tests/virscsidata/sg8
--
1.8.1.4
10 years, 9 months
[libvirt] [PATCH v3 0/4] Fix deadlock in nwfilter code
by Daniel P. Berrange
Since we introduced fine grained locking into the QEMU driver so
that VM start can run in parallel, we appear to have caused a
race with the nwfilter code. In particular since we no longer
hold the global QEMU driver lock for the duration of VM startup
we have a lock ordering flaw. This results in deadlock when
nwfilter operations happen in parallel with VM startup. This
also affects the LXC driver.
This patch series attempts to address the problem
https://bugzilla.redhat.com/show_bug.cgi?id=929412
the removal of the windows thread impl isn't strictly required,
I just didn't want to waste time creating a read/write lock impl
for Windows threads.
See also this callgraph
http://berrange.fedorapeople.org/nwfilter.ps
In v3:
- Removed addition of extra lock for serializing
iptables since it was overkill
- Added patch to make libvirt compile with mingw32-pthreads
from Fedora 19 and earlier
- Fix errno handling with rwlock creation
In v2:
- Re-ordered patches and squashed two together
- Add missing locking in state reload function
- Don't remove locking from virNWFilterInstantiateFilterLate
*** BLURB HERE ***
Daniel P. Berrange (4):
Add a read/write lock implementation
Fix pthread_sigmask check for mingw32 without winpthreads
Remove windows thread implementation in favour of pthreads
Push nwfilter update locking up to top level
configure.ac | 21 +-
src/Makefile.am | 4 -
src/conf/nwfilter_conf.c | 23 +-
src/conf/nwfilter_conf.h | 3 +-
src/libvirt_private.syms | 8 +-
src/lxc/lxc_driver.c | 6 +
src/nwfilter/nwfilter_driver.c | 10 +-
src/nwfilter/nwfilter_gentech_driver.c | 6 +-
src/qemu/qemu_driver.c | 6 +
src/uml/uml_driver.c | 4 +
src/util/virthread.c | 293 +++++++++++++++++++++++-
src/util/virthread.h | 51 ++++-
src/util/virthreadpthread.c | 278 -----------------------
src/util/virthreadpthread.h | 49 ----
src/util/virthreadwin32.c | 396 ---------------------------------
src/util/virthreadwin32.h | 53 -----
16 files changed, 388 insertions(+), 823 deletions(-)
delete mode 100644 src/util/virthreadpthread.c
delete mode 100644 src/util/virthreadpthread.h
delete mode 100644 src/util/virthreadwin32.c
delete mode 100644 src/util/virthreadwin32.h
--
1.8.4.2
10 years, 9 months
Re: [libvirt] [Xen-devel] [PATCH 00/12] libxl: fork: SIGCHLD flexibility
by Jim Fehlig
[Adding libvirt list...]
Ian Jackson wrote:
> Jim Fehlig writes ("Re: [Xen-devel] [PATCH 00/12] libxl: fork: SIGCHLD flexibility"):
>
>> BTW, I only see the crash when the save/restore script is running. I
>> stopped the other scripts and domains, running only save/restore on a
>> single domain, and see the crash rather quickly (within 10 iterations).
>>
>
> I'll look at the libvirt code, but:
>
> With a recurring timeout, how can you ever know it's cancelled ?
> There might be threads out there, which don't hold any locks, which
> are in the process of executing a callback for a timeout. That might
> be arbitrarily delayed from the pov of the rest of the program.
>
> E.g.:
>
> Thread A Thread B
>
> invoke some libxl operation
> X do some libxl stuff
> X register timeout (libxl)
> XV record timeout info
> X do some more libxl stuff
> ...
> X do some more libxl stuff
> X deregister timeout (libxl internal)
> X converted to request immediate timeout
> XV record new timeout info
> X release libvirt event loop lock
> entering libvirt event loop
> V observe timeout is immediate
> V need to do callback
> call libxl driver
>
> entering libvirt event loop
> V observe timeout is immediate
> V need to do callback
> call libxl driver
> call libxl
> X libxl sees timeout is live
> X libxl does libxl stuff
> libxl driver deregisters
> V record lack of timeout
> free driver's timeout struct
> call libxl
> X libxl sees timeout is dead
> X libxl does nothing
> libxl driver deregisters
> V CRASH due to deregistering
> V already-deregistered timeout
>
> If this is how things are, then I think there is no sane way to use
> libvirt's timeouts (!)
>
Looking at the libvirt code again, it seems a single thread services the
event loop. See virNetServerRun() in src/util/virnetserver.c. Indeed, I
see the same thread ID in all the timer and fd callbacks. One of the
libvirt core devs can correct me if I'm wrong.
Regards,
Jim
> In principle I guess the driver could keep its per-timeout structs
> around forever and remember whether they've been deregistered or not.
> Each one would have to have a lock in it.
>
> But if you think about it, if you have 10 threads all running the
> event loop and you set a timeout to zero, doesn't that mean that every
> thread's event loop should do the timeout callback as fast as it can ?
> That could be a lot of wasted effort.
>
> The best solution would appear to be to provide a non-recurring
> callback.
>
>
>> I'm not so thrilled with the timeout handling code in the libvirt libxl
>> driver. The driver maintains a list of active timeouts because IIRC,
>> there were cases when the driver received timeout deregistrations when
>> calling libxl_ctx_free, at which point some of the associated structures
>> were freed. The idea was to call libxl_osevent_occurred_timeout on any
>> active timeouts before freeing libxlDomainObjPrivate and its contents.
>>
>
> libxl does deregister fd callbacks in libxl_ctx_free.
>
> But libxl doesn't currently "deregister" any timeouts in
> libxl_ctx_free; indeed it would be a bit daft for it to do so as at
> libxl_ctx_free there are no aos running so there would be nothing to
> time out.
>
> But there is a difficulty with timeouts which libxl has set to occur
> immediately but which have not yet actually had the callback. The the
> application cannot call libxl_ctx_free with such timeouts outstanding,
> because that would imply later calling back into libxl with a stale
> ctx.
>
> (Looking at the code I see that the "nexi" are never actually freed.
> Bah.)
>
> Thanks,
> Ian.
>
>
10 years, 9 months
[libvirt] [PATCH] docs/page.xls: remove unnecessary namespace attribute
by Pavel Hrdina
It breaks the build on RHEL-5.10 and because it's only optional we
could remove it from the code. The default namespace will be used.
This hunk was introduced by commit 237a088ba44633b08e0528fe5103d99b1e213b71.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
docs/page.xsl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/page.xsl b/docs/page.xsl
index d560c09..7de238e 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -187,7 +187,7 @@
</xsl:template>
<xsl:template match="html:h2 | html:h3 | html:h4 | html:h5 | html:h6" mode="content">
- <xsl:element name="{name()}" namespace="{namespace-uri()}">
+ <xsl:element name="{name()}">
<xsl:apply-templates mode="copy" />
<xsl:if test="./html:a/@name">
<a class="headerlink" href="#{html:a/@name}" title="Permalink to this headline">¶</a>
@@ -200,7 +200,7 @@
</xsl:template>
<xsl:template match="node()" mode="copy">
- <xsl:element name="{name()}" namespace="{namespace-uri()}">
+ <xsl:element name="{name()}">
<xsl:copy-of select="./@*"/>
<xsl:apply-templates mode="copy" />
</xsl:element>
--
1.8.3.1
10 years, 10 months
[libvirt] [PATCH] network: only prevent forwarding of DNS requests for unqualified names
by Laine Stump
In commit f386825 we began adding the option "--local=/$mydomain/" to
all dnsmasq commandlines (later changed to "local=/$mydomain/" when we
moved the options from the commandline to a conf file) with the stated
reason of preventing forwarding of DNS queries for names that weren't
fully qualified domain names ("FQDN", i.e. a name that included some
"."s and a domain name).
The original patch on the list, and discussion about it, is here:
https://www.redhat.com/archives/libvir-list/2012-August/msg01594.html
When a domain name isn't specified (no <domain> element in the network
definition), the corresponding addition of "local=//" will prevent
forwarding of domain-less requests to the virtualization host's DNS
resolver, but if a domain *is* specified, the addition of
"local=/domain/" will prevent forwarding of any requests for names
within that domain that aren't resolvable by libvirt's dnsmasq itself.
An example of the problems this causes: let's say a network is
defined with:
<domain name='example.com'/>
<dhcp>
..
<host mac='52:54:00:11:22:33' ip='1.2.3.4' name='myguest'/>
</dhcp>
This results in "local=/example.com/" being added to the dnsmasq options.
If a guest requests "myguest" or "myguest.example.com", that will be
resolved by dnsmasq. If the guest asks for "www.example.com", dnsmasq
will not know the answer, but instead of forwarding it to the host, it
will return NOT FOUND to the guest. In most cases that isn't the
behavior an admin is looking for.
Really we should have been just including the option "--local=//" in
all cases, so that (unresolvable by dnsmasq) requests for names
without a domain would be treated as "local to dnsmasq" and not
forwarded, but all other requests would be forwarded. That's what this
patch does.
---
I'm debating whether there is any value at all to maintaining the
previous behavior of "don't forward unresolved requests for hosts in
the network's defined domain", or if it should just be considered
purely a bug. If so, I think it shouldn't be the default behavior, and
should be controlled by a new attribute to the <domain> element,
something like this:
<domain name='example.com' forwardUnresolved='no'/>
(this would default to yes). Any opinions on 1) whether or not this is
needed, and 2) if so, any better name for the option? (it would be nice if it could default to 'no' or 'local-only' (which was == 0) or something else that didn't require a non-0 default or a strange double-negative name).
src/network/bridge_driver.c | 12 +++++-------
tests/networkxml2confdata/dhcp6-network.conf | 2 +-
tests/networkxml2confdata/nat-network-dns-hosts.conf | 2 +-
tests/networkxml2confdata/netboot-network.conf | 2 +-
tests/networkxml2confdata/netboot-proxy-network.conf | 2 +-
5 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 80c5acb..b1382e4 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -723,14 +723,12 @@ networkDnsmasqConfContents(virNetworkObjPtr network,
network->def->domain);
}
- if (network->def->domain || !network->def->dns.forwardPlainNames) {
- /* need to specify local even if no domain specified, unless
- * the config says we should forward "plain" names (i.e. not
- * fully qualified, no '.' characters)
+ if (!network->def->dns.forwardPlainNames) {
+ /* need to specify local=// whether or not a domain is
+ * specified, unless the config says we should forward "plain"
+ * names (i.e. not fully qualified, no '.' characters)
*/
- virBufferAsprintf(&configbuf,
- "local=/%s/\n",
- network->def->domain ? network->def->domain : "");
+ virBufferAsprintf(&configbuf, "local=//\n");
}
if (pidfile)
diff --git a/tests/networkxml2confdata/dhcp6-network.conf b/tests/networkxml2confdata/dhcp6-network.conf
index 5fde07f..24ac7fa 100644
--- a/tests/networkxml2confdata/dhcp6-network.conf
+++ b/tests/networkxml2confdata/dhcp6-network.conf
@@ -8,7 +8,7 @@ strict-order
domain-needed
domain=mynet
expand-hosts
-local=/mynet/
+local=//
except-interface=lo
bind-dynamic
interface=virbr0
diff --git a/tests/networkxml2confdata/nat-network-dns-hosts.conf b/tests/networkxml2confdata/nat-network-dns-hosts.conf
index 2577882..bb1d5f4 100644
--- a/tests/networkxml2confdata/nat-network-dns-hosts.conf
+++ b/tests/networkxml2confdata/nat-network-dns-hosts.conf
@@ -8,7 +8,7 @@ strict-order
domain-needed
domain=example.com
expand-hosts
-local=/example.com/
+local=//
except-interface=lo
bind-dynamic
interface=virbr0
diff --git a/tests/networkxml2confdata/netboot-network.conf b/tests/networkxml2confdata/netboot-network.conf
index b6f3c23..37fef40 100644
--- a/tests/networkxml2confdata/netboot-network.conf
+++ b/tests/networkxml2confdata/netboot-network.conf
@@ -8,7 +8,7 @@ strict-order
domain-needed
domain=example.com
expand-hosts
-local=/example.com/
+local=//
except-interface=lo
bind-interfaces
listen-address=192.168.122.1
diff --git a/tests/networkxml2confdata/netboot-proxy-network.conf b/tests/networkxml2confdata/netboot-proxy-network.conf
index 1e969fa..ae34aa0 100644
--- a/tests/networkxml2confdata/netboot-proxy-network.conf
+++ b/tests/networkxml2confdata/netboot-proxy-network.conf
@@ -8,7 +8,7 @@ strict-order
domain-needed
domain=example.com
expand-hosts
-local=/example.com/
+local=//
except-interface=lo
bind-interfaces
listen-address=192.168.122.1
--
1.8.3.1
10 years, 10 months
[libvirt] [libvirt-designer][PATCH] gvir_designer_domain_add_disk_full: Adapt to latest libvirt-glib
by Michal Privoznik
With libvirt-glib update, I've noticed a deprecation warning:
libvirt-designer-domain.c: In function 'gvir_designer_domain_add_disk_full':
libvirt-designer-domain.c:1610:9: error: 'gvir_config_domain_disk_set_driver_type' is deprecated (declared at /usr/include/libvirt-gconfig-1.0/libvirt-gconfig/libvirt-gconfig-domain-disk.h:145): Use 'gvir_config_domain_disk_set_driver_format' instead [-Werror=deprecated-declarations]
gvir_config_domain_disk_set_driver_type(disk, format);
^
cc1: all warnings being treated as errors
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
libvirt-designer/Makefile.am | 1 +
libvirt-designer/libvirt-designer-domain.c | 22 +++++++++++--
libvirt-designer/libvirt-designer-internal.c | 46 ++++++++++++++++++++++++++++
libvirt-designer/libvirt-designer-internal.h | 2 ++
4 files changed, 68 insertions(+), 3 deletions(-)
create mode 100644 libvirt-designer/libvirt-designer-internal.c
diff --git a/libvirt-designer/Makefile.am b/libvirt-designer/Makefile.am
index 7becfd2..bda4240 100644
--- a/libvirt-designer/Makefile.am
+++ b/libvirt-designer/Makefile.am
@@ -25,6 +25,7 @@ DESIGNER_HEADER_FILES = \
libvirt-designer-domain.h \
$(NULL)
DESIGNER_SOURCE_FILES = \
+ libvirt-designer-internal.c \
libvirt-designer-main.c \
libvirt-designer-domain.c \
$(NULL)
diff --git a/libvirt-designer/libvirt-designer-domain.c b/libvirt-designer/libvirt-designer-domain.c
index 848dfea..5475c79 100644
--- a/libvirt-designer/libvirt-designer-domain.c
+++ b/libvirt-designer/libvirt-designer-domain.c
@@ -1580,6 +1580,7 @@ gvir_designer_domain_add_disk_full(GVirDesignerDomain *design,
{
GVirDesignerDomainPrivate *priv = design->priv;
GVirConfigDomainDisk *disk = NULL;
+ GVirConfigDomainDiskDriver *driver = NULL;
GVirConfigDomainDiskBus bus;
gchar *target_gen = NULL;
const char *driver_name;
@@ -1602,12 +1603,27 @@ gvir_designer_domain_add_disk_full(GVirDesignerDomain *design,
break;
}
+ driver = gvir_config_domain_disk_driver_new();
+ gvir_config_domain_disk_driver_set_name(driver, driver_name);
+ if (format) {
+ int fmt;
+
+ fmt = gvir_designer_genum_get_value(GVIR_CONFIG_TYPE_DOMAIN_DISK_FORMAT,
+ format, -1);
+
+ if (fmt == -1) {
+ g_set_error(error, GVIR_DESIGNER_DOMAIN_ERROR, 0,
+ "Unknown disk format: %s", format);
+ goto error;
+ }
+
+ gvir_config_domain_disk_driver_set_format(driver, fmt);
+ }
+
disk = gvir_config_domain_disk_new();
gvir_config_domain_disk_set_type(disk, type);
gvir_config_domain_disk_set_source(disk, path);
- gvir_config_domain_disk_set_driver_name(disk, driver_name);
- if (format)
- gvir_config_domain_disk_set_driver_type(disk, format);
+ gvir_config_domain_disk_set_driver(disk, driver);
controller = gvir_designer_domain_get_preferred_disk_controller(design, NULL);
if (controller == NULL)
diff --git a/libvirt-designer/libvirt-designer-internal.c b/libvirt-designer/libvirt-designer-internal.c
new file mode 100644
index 0000000..bdfa5d1
--- /dev/null
+++ b/libvirt-designer/libvirt-designer-internal.c
@@ -0,0 +1,46 @@
+/*
+ * libvirt-designer-internal.c: libvirt-designer helpers
+ *
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Authors: Michal Privoznik <mprivozn(a)redhat.com>
+ */
+
+#include <config.h>
+
+#include "libvirt-designer/libvirt-designer.h"
+#include "libvirt-designer/libvirt-designer-internal.h"
+
+G_GNUC_INTERNAL int
+gvir_designer_genum_get_value(GType enum_type, const char *nick,
+ gint default_value)
+{
+ GEnumClass *enum_class;
+ GEnumValue *enum_value;
+
+ g_return_val_if_fail(G_TYPE_IS_ENUM(enum_type), default_value);
+ g_return_val_if_fail(nick != NULL, default_value);
+
+ enum_class = g_type_class_ref(enum_type);
+ enum_value = g_enum_get_value_by_nick(enum_class, nick);
+ g_type_class_unref(enum_class);
+
+ if (enum_value != NULL)
+ return enum_value->value;
+
+ g_return_val_if_reached(default_value);
+}
diff --git a/libvirt-designer/libvirt-designer-internal.h b/libvirt-designer/libvirt-designer-internal.h
index e95edfc..fd3db2c 100644
--- a/libvirt-designer/libvirt-designer-internal.h
+++ b/libvirt-designer/libvirt-designer-internal.h
@@ -24,4 +24,6 @@
#ifndef __LIBVIRT_DESIGNER_INTERNAL_H__
#define __LIBVIRT_DESIGNER_INTERNAL_H__
+int gvir_designer_genum_get_value(GType enum_type, const char *nick, gint default_value);
+
#endif /* __LIBVIRT_DESIGNER_INTERNAL_H__ */
--
1.8.5.2
10 years, 10 months
[libvirt] [PATCH v2 0/3] Honor blacklist for modprobe command
by John Ferlan
Original patch here:
http://www.redhat.com/archives/libvir-list/2014-January/msg01408.html
Changes since v1:
* Add virkmod.{c,h} to perform the various modprobe commands
virModprobeConfig() -> modprobe -c
virModprobeLoad() -> modprobe driver
virModprobeUnload() -> modprobe -r driver
virModprobeUseBlacklist() -> modprobe -b driver
* virkmodtest.c to test the functions
Caveat emptor... The config is the only test run by default. Loading and
Unloading modules is something to be done carefully.
* virpci.c
Use the virModprobe*() API's instead of a direct MODPROBE
* .gitignore
Added the /tests/virkmodtest and /examples/domain-events/ which seems
to have appeared recently. I can separate them out if desired.
NOTE: Since I have no messages in virkmod.c, modifying po/POTFILES.in was
deemed unnecessary by a 'make check-syntax'
John Ferlan (3):
utils: Introduce functions for modprobe
tests: Add test for new virkmod functions
Honor blacklist for modprobe command
.gitignore | 2 +
src/Makefile.am | 1 +
src/libvirt_private.syms | 7 ++
src/util/virkmod.c | 138 ++++++++++++++++++++++++++++++++
src/util/virkmod.h | 35 +++++++++
src/util/virpci.c | 49 +++++++++---
tests/Makefile.am | 5 ++
tests/virkmodtest.c | 201 +++++++++++++++++++++++++++++++++++++++++++++++
8 files changed, 429 insertions(+), 9 deletions(-)
create mode 100644 src/util/virkmod.c
create mode 100644 src/util/virkmod.h
create mode 100644 tests/virkmodtest.c
--
1.8.4.2
10 years, 10 months