[libvirt] [PATCH] qemu: bulk stats: add pcpu placement information
by Francesco Romani
This patch adds the information about the physical cpu
placement of virtual cpus for bulk stats.
This is the only difference in output with the
virDomainGetVcpus() API.
Management software, like oVirt, needs this information
to properly manage NUMA configurations.
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
src/libvirt-domain.c | 2 ++
src/qemu/qemu_driver.c | 9 +++++++++
2 files changed, 11 insertions(+)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index cb76d8c..63fc967 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -10888,6 +10888,8 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
* from virVcpuState enum.
* "vcpu.<num>.time" - virtual cpu time spent by virtual CPU <num>
* as unsigned long long.
+ * "vcpu.<num>.physical" - real CPU number on which virtual CPU <num> is
+ * running, or -1 if offline.
*
* VIR_DOMAIN_STATS_INTERFACE: Return network interface statistics.
* The typed parameter keys are in this format:
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 830fca7..ab0652d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -18348,6 +18348,15 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
param_name,
cpuinfo[i].cpuTime) < 0)
goto cleanup;
+
+ snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH,
+ "vcpu.%zu.physical", i);
+ if (virTypedParamsAddULLong(&record->params,
+ &record->nparams,
+ maxparams,
+ param_name,
+ cpuinfo[i].cpu) < 0)
+ goto cleanup;
}
ret = 0;
--
1.9.3
9 years, 11 months
[libvirt] Entering freeze for 1.2.11, rc1 available
by Daniel Veillard
As planned, I tagged 1.2.11-rc1 in git and made signed tarballs and
rpms available at the usual place:
ftp://libvirt.org/libvirt/
This seems to work fine in my limited testing, but please give it
a serious try !
I understand Peter concerns w.r.t. the parallels patches, IMHO if
this doesn't touch common code and is fine by the maintainers, then
pushing in time for rc2 is reasonable even if we are past freeze.
The plan is to put out an rc2 in a couple of days and get the final
release this w.e. unless there is a serious issue blocking it.
thanks in advance for testing and reports !
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
9 years, 11 months
[libvirt] [PATCH 0/3] support sysrq in xen/libxl driver
by Chunyan Liu
xm/xend and libxl already support sending sysrq key. Adding the
equivalant to libvirt.
Chunyan Liu (3):
virkeycode: add virKeynameFromKeycode function
xen: add .domainSendKey
libxl: add .domainSendKey
src/libvirt_private.syms | 1 +
src/libxl/libxl_driver.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++
src/util/virkeycode.c | 17 +++++++++
src/util/virkeycode.h | 1 +
src/xen/xen_driver.c | 85 +++++++++++++++++++++++++++++++++++++++++++++
src/xen/xend_internal.c | 21 ++++++++++++
src/xen/xend_internal.h | 1 +
7 files changed, 215 insertions(+)
--
1.8.4.5
9 years, 11 months
[libvirt] [PATCH] virsh.pod: Fix typo
by John Ferlan
Commit id 'c9ffd3ea9e' updated the descriptions, but pointed at the
wrong place for the pool-define-as (it should have been pool-create-as)
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Pushed as trivial
tools/virsh.pod | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index cbd82275..0eba2c1 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -3019,7 +3019,7 @@ I<--print-xml> is specified, then print the XML of the pool object
without defining the pool. Otherwise, the pool has the specified
I<type>.
-Use the same arguments as B<pool-define-as>.
+Use the same arguments as B<pool-create-as>.
=item B<pool-destroy> I<pool-or-uuid>
--
1.9.3
9 years, 11 months
[libvirt] [PATCH] viriscsi: Need to sendtargets on Initiator IQN
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1172015
The refactoring done as part of commit id '59446096' caused a regression
for the multi initiator IQN commit '6aabcb5b' because the sendtargets was
not done on/for the initiator IQN prior to login (or trying to disable
autologin)
Prior to that commit, the paths were essentially
virStorageBackendISCSIStartPool
virStorageBackendISCSILogin
virStorageBackendISCSIConnection
if initiatoriqn
virStorageBackendCreateIfaceIQN
Issue sendtargets
Perform --login
else
Issue sendtargets
Perform --login
After that commit:
virStorageBackendISCSIStartPool
Issue sendtargets
Call virStorageBackendISCSIConnection
If initiatoriqn
virStorageBackendCreateIfaceIQN
Perform --login
else
Perform --login
So for non initiator IQN paths, nothing changed. For the initiator path,
the --login fails as does any attempts to change autologin via "--op update
--name node.startup --value manual".
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
NOTE:
I tried to move "Issue sendtargets" to inside virStorageBackendISCSIConnection;
however, that caused issues for my authenticated iSCSI pool. I have to assume
that sendtargets being run before the iscsiadm commands to set the auth data
require that sendtargets as well. So I just repeated the call for the very
specific case of after the CreateIfaceIQN succeeds.
src/util/viriscsi.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/util/viriscsi.c b/src/util/viriscsi.c
index ef8fb59..bd34fea 100644
--- a/src/util/viriscsi.c
+++ b/src/util/viriscsi.c
@@ -295,10 +295,17 @@ virISCSIConnection(const char *portal,
VIR_DEBUG("ifacename: '%s'", ifacename);
break;
case IQN_MISSING:
- if (virStorageBackendCreateIfaceIQN(initiatoriqn,
- &ifacename) != 0) {
+ if (virStorageBackendCreateIfaceIQN(initiatoriqn, &ifacename) != 0)
goto cleanup;
- }
+ /*
+ * iscsiadm doesn't let you send commands to the Interface IQN,
+ * unless you've first issued a 'sendtargets' command to the
+ * portal. Without the sendtargets all that is received is a
+ * "iscsiadm: No records found"
+ */
+ if (virISCSIScanTargets(portal, initiatoriqn, NULL, NULL) < 0)
+ goto cleanup;
+
break;
case IQN_ERROR:
default:
--
1.9.3
9 years, 11 months
[libvirt] [PATCH] virsh: Emit error for VSH_OT_DATA without VSH_OFLAG_REQ
by Hao Liu
Commit 6b9964 enforces checking invalid use of VSH_OT_STRING with
VSH_OFLAG_REQ. This commit tries to do the same thing to stop using
VSH_OT_DATA without VSH_OFLAG_REQ and also fix existing misuse.
Signed-off-by: Hao Liu <hliu(a)redhat.com>
---
tools/virsh-domain-monitor.c | 2 +-
tools/virsh-domain.c | 68 ++++++++++++++++++++++----------------------
tools/virsh-network.c | 6 ++--
tools/virsh-pool.c | 18 ++++++------
tools/virsh-snapshot.c | 20 ++++++-------
tools/virsh.c | 13 +++++++--
6 files changed, 67 insertions(+), 60 deletions(-)
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 259400f..442adfb 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -845,7 +845,7 @@ static const vshCmdOptDef opts_domblkstat[] = {
.help = N_("domain name, id or uuid")
},
{.name = "device",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.flags = VSH_OFLAG_EMPTY_OK,
.help = N_("block device")
},
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 750411b..6733cfa 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -755,27 +755,27 @@ static const vshCmdOptDef opts_attach_interface[] = {
.help = N_("source of network interface")
},
{.name = "target",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("target network name")
},
{.name = "mac",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("MAC address")
},
{.name = "script",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("script used to bridge network interface")
},
{.name = "model",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("model type")
},
{.name = "inbound",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("control domain's incoming traffics")
},
{.name = "outbound",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("control domain's outgoing traffics")
},
{.name = "persistent",
@@ -1749,7 +1749,7 @@ static const vshCmdOptDef opts_block_commit[] = {
.help = N_("bandwidth limit in MiB/s")
},
{.name = "base",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("path of base file to commit into (default bottom of chain)")
},
{.name = "shallow",
@@ -1757,7 +1757,7 @@ static const vshCmdOptDef opts_block_commit[] = {
.help = N_("use backing file of top as base")
},
{.name = "top",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("path of top file to commit from (default top of chain)")
},
{.name = "active",
@@ -1977,7 +1977,7 @@ static const vshCmdOptDef opts_block_copy[] = {
.help = N_("fully-qualified path of source disk")
},
{.name = "dest",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("path of the copy to create")
},
{.name = "bandwidth",
@@ -2025,11 +2025,11 @@ static const vshCmdOptDef opts_block_copy[] = {
.help = N_("with --wait, don't wait for cancel to finish")
},
{.name = "xml",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("filename containing XML description of the copy destination")
},
{.name = "format",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("format of the destination file")
},
{.name = "granularity",
@@ -2519,7 +2519,7 @@ static const vshCmdOptDef opts_block_pull[] = {
.help = N_("bandwidth limit in MiB/s")
},
{.name = "base",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("path of backing file in chain for a partial pull")
},
{.name = "wait",
@@ -3046,11 +3046,11 @@ static const vshCmdOptDef opts_domiftune[] = {
.help = N_("interface device (MAC Address)")
},
{.name = "inbound",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("control domain's incoming traffics")
},
{.name = "outbound",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("control domain's outgoing traffics")
},
{.name = "config",
@@ -3425,7 +3425,7 @@ static const vshCmdOptDef opts_undefine[] = {
.help = N_("remove domain managed state file")
},
{.name = "storage",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("remove associated storage volumes (comma separated list of "
"targets or source paths) (see domblklist)")
},
@@ -5019,7 +5019,7 @@ static const vshCmdOptDef opts_dump[] = {
.help = N_("dump domain's memory only")
},
{.name = "format",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("specify the format of memory-only dump")
},
{.name = NULL}
@@ -5173,7 +5173,7 @@ static const vshCmdOptDef opts_screenshot[] = {
.help = N_("domain name, id or uuid")
},
{.name = "file",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("where to store the screenshot")
},
{.name = "screen",
@@ -6217,7 +6217,7 @@ static const vshCmdOptDef opts_vcpupin[] = {
.help = N_("vcpu number")
},
{.name = "cpulist",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.flags = VSH_OFLAG_EMPTY_OK,
.help = N_("host cpu number(s) to set, or omit option to query")
},
@@ -6498,7 +6498,7 @@ static const vshCmdOptDef opts_emulatorpin[] = {
.help = N_("domain name, id or uuid")
},
{.name = "cpulist",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.flags = VSH_OFLAG_EMPTY_OK,
.help = N_("host cpu number(s) to set, or omit option to query")
},
@@ -7537,11 +7537,11 @@ static const vshCmdOptDef opts_metadata[] = {
.help = N_("use an editor to change the metadata")
},
{.name = "key",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("key to be used as a namespace identifier"),
},
{.name = "set",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("new metadata to set"),
},
{.name = "remove",
@@ -8326,12 +8326,12 @@ static const vshCmdOptDef opts_numatune[] = {
.help = N_("domain name, id or uuid")
},
{.name = "mode",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("NUMA mode, one of strict, preferred and interleave \n"
"or a number from the virDomainNumatuneMemMode enum")
},
{.name = "nodeset",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("NUMA node selections to set")
},
{.name = "config",
@@ -8602,11 +8602,11 @@ static const vshCmdInfo info_qemu_monitor_event[] = {
static const vshCmdOptDef opts_qemu_monitor_event[] = {
{.name = "domain",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("filter by domain name, id or uuid")
},
{.name = "event",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("filter by event name")
},
{.name = "pretty",
@@ -9416,19 +9416,19 @@ static const vshCmdOptDef opts_migrate[] = {
.help = N_("abort on soft errors during migration")
},
{.name = "migrateuri",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("migration URI, usually can be omitted")
},
{.name = "graphicsuri",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("graphics URI to be used for seamless graphics migration")
},
{.name = "listen-address",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("listen address that destination should bind to for incoming migration")
},
{.name = "dname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("rename to new name during migration (if supported)")
},
{.name = "timeout",
@@ -9914,7 +9914,7 @@ static const vshCmdOptDef opts_domdisplay[] = {
.help = N_("includes the password into the connection URI if available")
},
{.name = "type",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("select particular graphical display "
"(e.g. \"vnc\", \"spice\", \"rdp\")")
},
@@ -11761,11 +11761,11 @@ static const vshCmdInfo info_event[] = {
static const vshCmdOptDef opts_event[] = {
{.name = "domain",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("filter by domain name, id, or uuid")
},
{.name = "event",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("which event type to wait for")
},
{.name = "all",
@@ -11923,7 +11923,7 @@ static const vshCmdOptDef opts_change_media[] = {
.help = N_("Fully-qualified path or target of disk device")
},
{.name = "source",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("source of the media")
},
{.name = "eject",
@@ -12074,7 +12074,7 @@ static const vshCmdOptDef opts_domfstrim[] = {
"free ranges smaller than this (Bytes)")
},
{.name = "mountpoint",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("which mount point to trim")
},
{.name = NULL}
diff --git a/tools/virsh-network.c b/tools/virsh-network.c
index 9dc52e5..5f8743c 100644
--- a/tools/virsh-network.c
+++ b/tools/virsh-network.c
@@ -1191,11 +1191,11 @@ static const vshCmdInfo info_network_event[] = {
static const vshCmdOptDef opts_network_event[] = {
{.name = "network",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("filter by network name or uuid")
},
{.name = "event",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("which event type to wait for")
},
{.name = "loop",
@@ -1305,7 +1305,7 @@ static const vshCmdOptDef opts_network_dhcp_leases[] = {
.help = N_("network name or uuid")
},
{.name = "mac",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.flags = VSH_OFLAG_NONE,
.help = N_("MAC address")
},
diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
index a9482c4..addbccc 100644
--- a/tools/virsh-pool.c
+++ b/tools/virsh-pool.c
@@ -200,23 +200,23 @@ static const vshCmdOptDef opts_pool_X_as[] = {
.help = N_("print XML document, but don't define/create")
},
{.name = "source-host",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("source-host for underlying storage")
},
{.name = "source-path",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("source path for underlying storage")
},
{.name = "source-dev",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("source device for underlying storage")
},
{.name = "source-name",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("source name for underlying storage")
},
{.name = "target",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("target for underlying storage")
},
{.name = "source-format",
@@ -1399,15 +1399,15 @@ static const vshCmdOptDef opts_find_storage_pool_sources_as[] = {
.help = N_("type of storage pool sources to find")
},
{.name = "host",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("optional host to query")
},
{.name = "port",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("optional port to query")
},
{.name = "initiator",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("optional initiator IQN to use for query")
},
{.name = NULL}
@@ -1489,7 +1489,7 @@ static const vshCmdOptDef opts_find_storage_pool_sources[] = {
.help = N_("type of storage pool sources to discover")
},
{.name = "srcSpec",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("optional file of source xml to query for pools")
},
{.name = NULL}
diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c
index 9fe7751..1bb74a6 100644
--- a/tools/virsh-snapshot.c
+++ b/tools/virsh-snapshot.c
@@ -128,7 +128,7 @@ static const vshCmdOptDef opts_snapshot_create[] = {
.help = N_("domain name, id or uuid")
},
{.name = "xmlfile",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("domain snapshot XML")
},
{.name = "redefine",
@@ -333,11 +333,11 @@ static const vshCmdOptDef opts_snapshot_create_as[] = {
.help = N_("domain name, id or uuid")
},
{.name = "name",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("name of snapshot")
},
{.name = "description",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("description of snapshot")
},
{.name = "print-xml",
@@ -529,7 +529,7 @@ static const vshCmdOptDef opts_snapshot_edit[] = {
.help = N_("domain name, id or uuid")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("snapshot name")
},
{.name = "current",
@@ -658,7 +658,7 @@ static const vshCmdOptDef opts_snapshot_current[] = {
.help = N_("include security sensitive information in XML dump")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("name of existing snapshot to make current")
},
{.name = NULL}
@@ -886,7 +886,7 @@ static const vshCmdOptDef opts_snapshot_info[] = {
.help = N_("domain name, id or uuid")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("snapshot name")
},
{.name = "current",
@@ -1491,7 +1491,7 @@ static const vshCmdOptDef opts_snapshot_list[] = {
.help = N_("list snapshots in a tree")
},
{.name = "from",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("limit list to children of given snapshot")
},
{.name = "current",
@@ -1775,7 +1775,7 @@ static const vshCmdOptDef opts_snapshot_parent[] = {
.help = N_("domain name, id or uuid")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("find parent of snapshot name")
},
{.name = "current",
@@ -1843,7 +1843,7 @@ static const vshCmdOptDef opts_snapshot_revert[] = {
.help = N_("domain name, id or uuid")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("snapshot name")
},
{.name = "current",
@@ -1936,7 +1936,7 @@ static const vshCmdOptDef opts_snapshot_delete[] = {
.help = N_("domain name, id or uuid")
},
{.name = "snapshotname",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("snapshot name")
},
{.name = "current",
diff --git a/tools/virsh.c b/tools/virsh.c
index 0ead9ae..aba34ce 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -435,7 +435,7 @@ static const vshCmdInfo info_connect[] = {
static const vshCmdOptDef opts_connect[] = {
{.name = "name",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.flags = VSH_OFLAG_EMPTY_OK,
.help = N_("hypervisor connection URI")
},
@@ -594,7 +594,7 @@ static const vshCmdInfo info_help[] = {
static const vshCmdOptDef opts_help[] = {
{.name = "command",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("Prints global help, command specific help, or help for a group of related commands")
},
{.name = NULL}
@@ -854,7 +854,7 @@ static const vshCmdInfo info_cd[] = {
static const vshCmdOptDef opts_cd[] = {
{.name = "dir",
- .type = VSH_OT_DATA,
+ .type = VSH_OT_STRING,
.help = N_("directory to switch to (default: home or else root)")
},
{.name = NULL}
@@ -1392,6 +1392,13 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
snprintf(buf, sizeof(buf), _("--%s <string>"), opt->name);
break;
case VSH_OT_DATA:
+ /* OT_DATA should always be VSH_OFLAG_REQ */
+ if (!(opt->flags & VSH_OFLAG_REQ)) {
+ vshError(ctl,
+ _("internal error: bad options in command: '%s'"),
+ def->name);
+ return false;
+ }
snprintf(buf, sizeof(buf), _("[--%s] <string>"),
opt->name);
break;
--
1.8.3.1
9 years, 11 months
[libvirt] [PATCH] docs: Fix typo in path for storage pool
by John Ferlan
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Pushed as trivial
docs/formatstorage.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/formatstorage.html.in b/docs/formatstorage.html.in
index 0951daa..933268c 100644
--- a/docs/formatstorage.html.in
+++ b/docs/formatstorage.html.in
@@ -386,7 +386,7 @@
like the logical choice, however, devices nodes there are not
guaranteed stable across reboots, since they are allocated on
demand. It is preferable to use a stable location such as one
- of the <code>/dev/disk/by-{path,id,uuid,label</code> locations.
+ of the <code>/dev/disk/by-{path|id|uuid|label}</code> locations.
<span class="since">Since 0.4.1</span>
</dd>
<dt><code>permissions</code></dt>
--
1.9.3
9 years, 11 months
[libvirt] [PATCH] conf: Ignore device address for guestfwd channel
by Martin Kletzander
It make no sense at all to have it there.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/conf/domain_conf.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index db3369e..ec45b8c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8456,8 +8456,13 @@ virDomainChrDefParseXML(xmlXPathContextPtr ctxt,
}
}
- if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
+ if (def->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL &&
+ def->targetType == VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD) {
+ VIR_DEBUG("Ignoring device address for gustfwd channel");
+ } else if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0) {
goto error;
+ }
+
if (def->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
def->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB &&
--
2.2.0
9 years, 11 months