[libvirt] [PATCH v2] qemu: avoid slash characters to the new domain name.
by Julio Faracco
The 'domrename' command needs to check if the new domain name contains
the slash character. This character is not accepted by libvirt XML
definition because it is an invalid char (see Cole's commit b1fc6a7b7).
This commit enhace the 'domrename' command adding this check. The method
virDomainDefPostParse() was the other methods to check the domain are
not accessible.
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/qemu/qemu_driver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5673d9fd8..9b16bc9c9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20773,6 +20773,9 @@ qemuDomainRenameCallback(virDomainObjPtr vm,
vm->def->name = new_dom_name;
new_dom_name = NULL;
+ if (virDomainDefPostParse(vm->def, driver->caps, 0, driver->xmlopt, NULL) < 0)
+ goto rollback;
+
if (virDomainSaveConfig(cfg->configDir, driver->caps, vm->def) < 0)
goto rollback;
--
2.14.1
6 years, 7 months
[libvirt] [PATCH perl] git: add config file telling git-publish how to send patches
by Daniel P. Berrangé
The "git-publish" tool is a useful git extension for sending patch
series for code review. It automatically creates versioned tags
each time code on a branch is sent, so that there is a record of
each version. It also remembers the cover letter so it does not
need re-entering each time the series is reposted.
With this config file present it is now sufficient[1] to run
$ git publish
to send all patches in a branch to the list for review, with the
correct subject prefix added for this non-core libvirt module.
[1] Assuming your $HOME/.gitconfig has an SMTP server listed
at least e.g.
[sendemail]
smtpserver = smtp.example.com
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitpublish | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 .gitpublish
diff --git a/.gitpublish b/.gitpublish
new file mode 100644
index 0000000..3f40578
--- /dev/null
+++ b/.gitpublish
@@ -0,0 +1,4 @@
+[gitpublishprofile "default"]
+base = master
+to = libvir-list(a)redhat.com
+prefix = PATCH perl
--
2.14.3
6 years, 7 months
[libvirt] [PATCH dbus] git: add config file telling git-publish how to send patches
by Daniel P. Berrangé
The "git-publish" tool is a useful git extension for sending patch
series for code review. It automatically creates versioned tags
each time code on a branch is sent, so that there is a record of
each version. It also remembers the cover letter so it does not
need re-entering each time the series is reposted.
With this config file present it is now sufficient[1] to run
$ git publish
to send all patches in a branch to the list for review, with the
correct subject prefix added for this non-core libvirt module.
[1] Assuming your $HOME/.gitconfig has an SMTP server listed
at least e.g.
[sendemail]
smtpserver = smtp.example.com
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitpublish | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 .gitpublish
diff --git a/.gitpublish b/.gitpublish
new file mode 100644
index 0000000..16f6a01
--- /dev/null
+++ b/.gitpublish
@@ -0,0 +1,4 @@
+[gitpublishprofile "default"]
+base = master
+to = libvir-list(a)redhat.com
+prefix = PATCH dbus
--
2.14.3
6 years, 7 months
[libvirt] [PATCH cim] git: add config file telling git-publish how to send patches
by Daniel P. Berrangé
The "git-publish" tool is a useful git extension for sending patch
series for code review. It automatically creates versioned tags
each time code on a branch is sent, so that there is a record of
each version. It also remembers the cover letter so it does not
need re-entering each time the series is reposted.
With this config file present it is now sufficient[1] to run
$ git publish
to send all patches in a branch to the list for review, with the
correct subject prefix added for this non-core libvirt module.
[1] Assuming your $HOME/.gitconfig has an SMTP server listed
at least e.g.
[sendemail]
smtpserver = smtp.example.com
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitpublish | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 .gitpublish
diff --git a/.gitpublish b/.gitpublish
new file mode 100644
index 0000000..4b45752
--- /dev/null
+++ b/.gitpublish
@@ -0,0 +1,4 @@
+[gitpublishprofile "default"]
+base = master
+to = libvir-list(a)redhat.com
+prefix = PATCH cim
--
2.14.3
6 years, 7 months
[libvirt] [dbus PATCH] domain: fix virTypedParameter memory leaks
by Pavel Hrdina
virTypedParameter can contain string which needs to be freed.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/domain.c | 44 +++++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/src/domain.c b/src/domain.c
index 50382ee..488760b 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -841,8 +841,7 @@ virtDBusDomainGetBlkioParameters(GVariant *inArgs,
{
virtDBusConnect *connect = userData;
g_autoptr(virDomain) domain = NULL;
- g_autofree virTypedParameterPtr params = NULL;
- gint nparams = 0;
+ g_auto(virtDBusUtilTypedParams) params = { 0 };
guint flags;
gint ret;
GVariant *grecords;
@@ -853,14 +852,16 @@ virtDBusDomainGetBlkioParameters(GVariant *inArgs,
if (!domain)
return;
- ret = virDomainGetBlkioParameters(domain, NULL, &nparams, flags);
- if (ret == 0 && nparams != 0) {
- params = g_new0(virTypedParameter, nparams);
- if (virDomainGetBlkioParameters(domain, params, &nparams, flags) < 0)
+ ret = virDomainGetBlkioParameters(domain, NULL, ¶ms.nparams, flags);
+ if (ret == 0 && params.nparams != 0) {
+ params.params = g_new0(virTypedParameter, params.nparams);
+ if (virDomainGetBlkioParameters(domain, params.params,
+ ¶ms.nparams, flags) < 0) {
return virtDBusUtilSetLastVirtError(error);
+ }
}
- grecords = virtDBusUtilTypedParamsToGVariant(params, nparams);
+ grecords = virtDBusUtilTypedParamsToGVariant(params.params, params.nparams);
*outArgs = g_variant_new_tuple(&grecords, 1);
}
@@ -958,8 +959,7 @@ virtDBusDomainGetMemoryParameters(GVariant *inArgs,
{
virtDBusConnect *connect = userData;
g_autoptr(virDomain) domain = NULL;
- g_autofree virTypedParameterPtr params = NULL;
- gint nparams = 0;
+ g_auto(virtDBusUtilTypedParams) params = { 0 };
guint flags;
gint ret;
GVariant *grecords;
@@ -970,14 +970,16 @@ virtDBusDomainGetMemoryParameters(GVariant *inArgs,
if (!domain)
return;
- ret = virDomainGetMemoryParameters(domain, NULL, &nparams, flags);
- if (ret == 0 && nparams != 0) {
- params = g_new0(virTypedParameter, nparams);
- if (virDomainGetMemoryParameters(domain, params, &nparams, flags) < 0)
+ ret = virDomainGetMemoryParameters(domain, NULL, ¶ms.nparams, flags);
+ if (ret == 0 && params.nparams != 0) {
+ params.params = g_new0(virTypedParameter, params.nparams);
+ if (virDomainGetMemoryParameters(domain, params.params,
+ ¶ms.nparams, flags) < 0) {
return virtDBusUtilSetLastVirtError(error);
+ }
}
- grecords = virtDBusUtilTypedParamsToGVariant(params, nparams);
+ grecords = virtDBusUtilTypedParamsToGVariant(params.params, params.nparams);
*outArgs = g_variant_new_tuple(&grecords, 1);
}
@@ -993,8 +995,7 @@ virtDBusDomainGetSchedulerParameters(GVariant *inArgs,
{
virtDBusConnect *connect = userData;
g_autoptr(virDomain) domain = NULL;
- g_autofree virTypedParameterPtr params = NULL;
- gint nparams;
+ g_auto(virtDBusUtilTypedParams) params = { 0 };
guint flags;
GVariant *grecords;
g_autofree gchar *ret = NULL;
@@ -1005,14 +1006,15 @@ virtDBusDomainGetSchedulerParameters(GVariant *inArgs,
if (!domain)
return;
- ret = virDomainGetSchedulerType(domain, &nparams);
- if (ret && nparams != 0) {
- params = g_new0(virTypedParameter, nparams);
- if (virDomainGetSchedulerParametersFlags(domain, params, &nparams, 0))
+ ret = virDomainGetSchedulerType(domain, ¶ms.nparams);
+ if (ret && params.nparams != 0) {
+ params.params = g_new0(virTypedParameter, params.nparams);
+ if (virDomainGetSchedulerParametersFlags(domain, params.params,
+ ¶ms.nparams, 0))
return virtDBusUtilSetLastVirtError(error);
}
- grecords = virtDBusUtilTypedParamsToGVariant(params, nparams);
+ grecords = virtDBusUtilTypedParamsToGVariant(params.params, params.nparams);
*outArgs = g_variant_new_tuple(&grecords, 1);
}
--
2.14.3
6 years, 7 months
[libvirt] [PATCH php] git: add config file telling git-publish how to send patches
by Daniel P. Berrangé
The "git-publish" tool is a useful git extension for sending patch
series for code review. It automatically creates versioned tags
each time code on a branch is sent, so that there is a record of
each version. It also remembers the cover letter so it does not
need re-entering each time the series is reposted.
With this config file present it is now sufficient[1] to run
$ git publish
to send all patches in a branch to the list for review, with the
correct subject prefix added for this non-core libvirt module.
[1] Assuming your $HOME/.gitconfig has an SMTP server listed
at least e.g.
[sendemail]
smtpserver = smtp.example.com
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitpublish | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 .gitpublish
diff --git a/.gitpublish b/.gitpublish
new file mode 100644
index 0000000..df80141
--- /dev/null
+++ b/.gitpublish
@@ -0,0 +1,4 @@
+[gitpublishprofile "default"]
+base = master
+to = libvir-list(a)redhat.com
+prefix = PATCH php
--
2.14.3
6 years, 7 months
[libvirt] [PATCH snmp] git: add config file telling git-publish how to send patches
by Daniel P. Berrangé
The "git-publish" tool is a useful git extension for sending patch
series for code review. It automatically creates versioned tags
each time code on a branch is sent, so that there is a record of
each version. It also remembers the cover letter so it does not
need re-entering each time the series is reposted.
With this config file present it is now sufficient[1] to run
$ git publish
to send all patches in a branch to the list for review, with the
correct subject prefix added for this non-core libvirt module.
[1] Assuming your $HOME/.gitconfig has an SMTP server listed
at least e.g.
[sendemail]
smtpserver = smtp.example.com
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitpublish | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 .gitpublish
diff --git a/.gitpublish b/.gitpublish
new file mode 100644
index 0000000..58ceeac
--- /dev/null
+++ b/.gitpublish
@@ -0,0 +1,4 @@
+[gitpublishprofile "default"]
+base = master
+to = libvir-list(a)redhat.com
+prefix = PATCH snmp
--
2.14.3
6 years, 7 months
[libvirt] [PATCH appdev-guide] git: add config file telling git-publish how to send patches
by Daniel P. Berrangé
The "git-publish" tool is a useful git extension for sending patch
series for code review. It automatically creates versioned tags
each time code on a branch is sent, so that there is a record of
each version. It also remembers the cover letter so it does not
need re-entering each time the series is reposted.
With this config file present it is now sufficient[1] to run
$ git publish
to send all patches in a branch to the list for review, with the
correct subject prefix added for this non-core libvirt module.
[1] Assuming your $HOME/.gitconfig has an SMTP server listed
at least e.g.
[sendemail]
smtpserver = smtp.example.com
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitpublish | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 .gitpublish
diff --git a/.gitpublish b/.gitpublish
new file mode 100644
index 0000000..fc91130
--- /dev/null
+++ b/.gitpublish
@@ -0,0 +1,4 @@
+[gitpublishprofile "default"]
+base = master
+to = libvir-list(a)redhat.com
+prefix = PATCH appdev-guide
--
2.14.3
6 years, 7 months
[libvirt] [PATCH security-notice] git: add config file telling git-publish how to send patches
by Daniel P. Berrangé
The "git-publish" tool is a useful git extension for sending patch
series for code review. It automatically creates versioned tags
each time code on a branch is sent, so that there is a record of
each version. It also remembers the cover letter so it does not
need re-entering each time the series is reposted.
With this config file present it is now sufficient[1] to run
$ git publish
to send all patches in a branch to the list for review, with the
correct subject prefix added for this non-core libvirt module.
[1] Assuming your $HOME/.gitconfig has an SMTP server listed
at least e.g.
[sendemail]
smtpserver = smtp.example.com
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitpublish | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 .gitpublish
diff --git a/.gitpublish b/.gitpublish
new file mode 100644
index 0000000..59abad6
--- /dev/null
+++ b/.gitpublish
@@ -0,0 +1,4 @@
+[gitpublishprofile "default"]
+base = master
+to = libvir-list(a)redhat.com
+prefix = PATCH security-notice
--
2.14.3
6 years, 7 months
[libvirt] [PATCH ocaml] git: add config file telling git-publish how to send patches
by Daniel P. Berrangé
The "git-publish" tool is a useful git extension for sending patch
series for code review. It automatically creates versioned tags
each time code on a branch is sent, so that there is a record of
each version. It also remembers the cover letter so it does not
need re-entering each time the series is reposted.
With this config file present it is now sufficient[1] to run
$ git publish
to send all patches in a branch to the list for review, with the
correct subject prefix added for this non-core libvirt module.
[1] Assuming your $HOME/.gitconfig has an SMTP server listed
at least e.g.
[sendemail]
smtpserver = smtp.example.com
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitpublish | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 .gitpublish
diff --git a/.gitpublish b/.gitpublish
new file mode 100644
index 0000000..1af26f8
--- /dev/null
+++ b/.gitpublish
@@ -0,0 +1,4 @@
+[gitpublishprofile "default"]
+base = master
+to = libvir-list(a)redhat.com
+prefix = PATCH ocaml
--
2.14.3
6 years, 7 months