[libvirt] [PATCH v2 0/5] qemu: Change the way we generate VIR_DOMAIN_EVENT_RESUMED
by Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1612943
Version 2:
- keep VIR_DOMAIN_EVENT_RESUMED_MIGRATED event at the end of post-copy
migration
Jiri Denemark (5):
qemu: Properly report VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT
qemu: Report more appropriate running reasons
qemu: Pass running reason to RESUME event handler
qemu: Map running reason to resume event detail
qemu: Avoid duplicate resume events and state changes
src/qemu/qemu_domain.c | 29 +++++++++++++++++++++++
src/qemu/qemu_domain.h | 7 ++++++
src/qemu/qemu_driver.c | 13 -----------
src/qemu/qemu_migration.c | 49 ++++++++++++++++-----------------------
src/qemu/qemu_process.c | 46 ++++++++++++++++++++++--------------
5 files changed, 85 insertions(+), 59 deletions(-)
--
2.19.0
6 years, 3 months
[libvirt] [PATCH] vircgroupv1: add ifdef around cgroup code
by Pavel Hrdina
Cgroups are supported only on linux.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util/vircgroupv1.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/util/vircgroupv1.c b/src/util/vircgroupv1.c
index 62a6e5c448..3d05fbd745 100644
--- a/src/util/vircgroupv1.c
+++ b/src/util/vircgroupv1.c
@@ -55,6 +55,8 @@ VIR_ENUM_IMPL(virCgroupV1Controller, VIR_CGROUP_CONTROLLER_LAST,
"name=systemd");
+#ifdef VIR_CGROUP_SUPPORTED
+
/* We're looking for at least one 'cgroup' fs mount,
* which is *not* a named mount. */
static bool
@@ -2099,3 +2101,15 @@ virCgroupV1Register(void)
{
virCgroupBackendRegister(&virCgroupV1Backend);
}
+
+#else /* !VIR_CGROUP_SUPPORTED */
+
+void
+virCgroupV1Register(void)
+{
+ virReportSystemError(ENOSYS, "%s",
+ _("Control groups not supported on this platform"));
+ return -1;
+}
+
+#endif /* !VIR_CGROUP_SUPPORTED */
--
2.17.1
6 years, 3 months
[libvirt] [PATCH 00/47] extract cgroup v1 code to separate backend
by Pavel Hrdina
We will need to introduce cgroup v2 support which needs to co-exit
with the current cgroup v1 implementation. In order to do that
this patch series introduces virCgroupBackend structure and moves
all cgroup v1 related code to separate file.
There is no functional change.
This series depends on [1] and you can pull it from [2].
[1] <https://www.redhat.com/archives/libvir-list/2018-September/msg00760.html>
[2] <https://github.com/Antique/libvirt/tree/cgroupv1>
Pavel Hrdina (47):
util: introduce vircgroupbackend files
vircgroup: introduce cgroup v1 backend files
vircgroup: extract virCgroupV1Available
vircgroup: detect available backend for cgroup
vircgroup: extract virCgroupV1ValidateMachineGroup
vircgroup: extract virCgroupV1CopyMounts
vircgroup: extract v1 detect functions
vircgroup: extract virCgroupV1CopyPlacement
vircgroup: extract virCgroupV1ValidatePlacement
vircgroup: extract virCgroupV1GetPlacement
vircgroup: extract virCgroupV1DetectControllers
vircgroup: extract virCgroupV1HasController
vircgroup: extract virCgroupV1GetAnyController
vircgroup: extract virCgroupV1PathOfController
vircgroup: extract virCgroupV1MakeGroup
vircgroup: extract virCgroupV1Remove
vircgroup: extract virCgroupV1AddTask
vircgroup: extract virCgroupV1HasEmptyTasks
vircgroup: extract virCgroupV1BindMount
vircgroup: extract virCgroupV1SetOwner
vircgroup: extract virCgroupV1(Set|Get)BlkioWeight
vircgroup: extract virCgroupV1GetBlkioIoServiced
vircgroup: extract virCgroupV1GetBlkioIoDeviceServiced
vircgroup: extract virCgroupV1(Set|Get)BlkioDeviceWeight
vircgroup: extract virCgroupV1(Set|Get)BlkioDeviceReadIops
vircgroup: extract virCgroupV1(Set|Get)BlkioDeviceWriteIops
vircgroup: extract virCgroupV1(Set|Get)BlkioDeviceReadBps
vircgroup: extract virCgroupV1(Set|Get)BlkioDeviceWriteBps
vircgroup: extract virCgroupV1SetMemory
vircgroup: extract virCgroupV1GetMemoryStat
vircgroup: extract virCgroupV1GetMemoryUsage
vircgroup: extract virCgroupV1(Set|Get)Memory*Limit
vircgroup: extract virCgroupV1GetMemSwapUsage
vircgroup: extract virCgroupV1(Allow|Deny)Device
vircgroup: extract virCgroupV1(Allow|Deny)AllDevices
vircgroup: extract virCgroupV1(Set|Get)CpuShares
vircgroup: extract virCgroupV1(Set|Get)CpuCfsPeriod
vircgroup: extract virCgroupV1(Set|Get)CpuCfsQuota
vircgroup: extract virCgroupV1SupportsCpuBW
vircgroup: extract virCgroupV1GetCpuacct*Usage
vircgroup: extract virCgroupV1GetCpuacctStat
vircgroup: extract virCgroupV1(Set|Get)FreezerState
vircgroup: extract virCgroupV1(Set|Get)CpusetMems
vircgroup: extract virCgroupV1(Set|Get)CpusetMemoryMigrate
vircgroup: extract virCgroupV1(Set|Get)CpusetCpus
vircgroup: rename virCgroupController into virCgroupV1Controller
vircgroup: rename controllers to legacy
src/Makefile.am | 2 +
src/libvirt_private.syms | 6 +
src/util/Makefile.inc.am | 4 +
src/util/vircgroup.c | 1692 +++-------------------------
src/util/vircgroupbackend.c | 66 ++
src/util/vircgroupbackend.h | 437 ++++++++
src/util/vircgrouppriv.h | 59 +-
src/util/vircgroupv1.c | 2096 +++++++++++++++++++++++++++++++++++
src/util/vircgroupv1.h | 27 +
tests/vircgrouptest.c | 52 +-
10 files changed, 2840 insertions(+), 1601 deletions(-)
create mode 100644 src/util/vircgroupbackend.c
create mode 100644 src/util/vircgroupbackend.h
create mode 100644 src/util/vircgroupv1.c
create mode 100644 src/util/vircgroupv1.h
--
2.17.1
6 years, 3 months
[libvirt] [PATCH 0/6] syntax-check: Introduce a new rule to check misaligned stuff and fix it (batch I)
by Shi Lei
This series check misaligned stuff in parenthesis:
1. For misaligned arguments of function
2. For misaligned conditions of [if|while|switch|...]
It adds a temporary filter for this new rule since there're
too much misalignment.
Now it just fix misalignment in src/util and it's the batch I.
Next step, we need modify this path filter to finish all changes.
Also, it simplifies the check-spacing.pl by adding wrapper functions
before introducing the new rule.
Thanks,
Shi Lei
Shi Lei (6):
util: Fix misaligned arguments and misaligned conditions for
[if|while|...]
build-aux:check-spacing: Add wrapper function of CheckFunctionBody
build-aux:check-spacing: Add wrapper function of KillComments
build-aux:check-spacing: Add wrapper function of CheckWhiteSpaces
build-aux:check-spacing: Add wrapper function of CheckCurlyBrackets
build-aux:check-spacing: Introduce a new rule to check misaligned
stuff in parenthesises
build-aux/check-spacing.pl | 476 ++++++++++++++++++++-----------
src/util/vircgroup.c | 34 +--
src/util/virconf.c | 4 +-
src/util/virdbus.c | 2 +-
src/util/virdnsmasq.c | 5 +-
src/util/virerror.c | 2 +-
src/util/virevent.c | 14 +-
src/util/vireventpoll.c | 8 +-
src/util/virfile.c | 6 +-
src/util/virgic.c | 2 +-
src/util/virhook.c | 2 +-
src/util/virhostdev.c | 23 +-
src/util/viridentity.c | 18 +-
src/util/viriscsi.c | 22 +-
src/util/virjson.c | 2 +-
src/util/virkeycode.c | 22 +-
src/util/virkeyfile.c | 6 +-
src/util/virlockspace.c | 2 +-
src/util/virlog.c | 18 +-
src/util/virnetdev.c | 4 +-
src/util/virnetdevbridge.c | 2 +-
src/util/virnetdevip.c | 11 +-
src/util/virnetdevmacvlan.c | 30 +-
src/util/virnetdevopenvswitch.c | 34 +--
src/util/virnetdevvportprofile.c | 24 +-
src/util/virnetlink.c | 10 +-
src/util/virobject.c | 2 +-
src/util/virpci.c | 4 +-
src/util/virperf.c | 4 +-
src/util/virprocess.c | 2 +-
src/util/virqemu.c | 4 +-
src/util/virresctrl.c | 7 +-
src/util/virsocketaddr.c | 2 +-
src/util/virstorageencryption.c | 2 +-
src/util/virstoragefile.c | 60 ++--
src/util/virsysinfo.c | 2 +-
src/util/viruri.c | 2 +-
src/util/virutil.c | 2 +-
src/util/virxml.c | 2 +-
39 files changed, 512 insertions(+), 366 deletions(-)
--
2.17.1
6 years, 3 months
[libvirt] [PATCH v5 00/13] PCI passthrough support on s390
by Yi Min Zhao
Abstract
========
The PCI representation in QEMU has recently been extended for S390
allowing configuration of zPCI attributes like uid (user-defined
identifier) and fid (PCI function identifier).
The details can be found here:
https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg07262.html
To support the new zPCI feature of the S390 platform, two new XML
attributes, @uid and @fid, are introduced for device addresses of type
'pci', i.e.:
<hostdev mode='subsystem' type='pci'>
<driver name='vfio'/>
<source>
<address domain='0x0001' bus='0x00' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'
uid='0x0003' fid='0x00000027'/>
</hostdev>
uid and fid are optional attributes. If they are defined by the user,
unique values within the guest domain must be used. If they are not
specified and the architecture requires them, they are automatically
generated with non-conflicting values.
Current implementation is the most seamless one for the user as it
unites the address specific data of a PCI device on one XML element.
It could accommodate both specifying our special parameters (uid and fid)
and re-using standard statements (domain, bus, slot and function) for
PCI devices. User can still specify bus/slot/function for the virtualized
PCI devices in the XML.
Thus uid/fid act as an extension to the PCI address and are stored in
a new structure 'virZPCIDeviceAddress' which is a member of common PCI
Address structure. Additionally, two hashtables are used for assignment
and reservation of uid/fid.
In support of extending the PCI address, a new PCI address extension flag is
introduced. This extension flag allows is not only dedicated for the S390
platform but also other architectures needing certain extensions to PCI
address space.
Code Base
=========
commit in master:
2f6ff0da5b qemu: Don't overwrite stats in qemuDomainBlocksStatsGather
Change Log
==========
v4->v5:
1. Update the version number.
2. Fixup code style error.
3. Separate qemu code into single patch.
4. Rebase the patches to the new code of master branch.
v3->v4:
1. Update docs.
2. Format code style.
3. Optimize zPCI support check.
4. Move the check of zPCI defined in xml but unsupported by Qemu to
qemuDomainDeviceDefValidate().
5. Change zpci address member of PCI address struct from pointer to
instance.
6. Modify zpci address definition principle. Currently the user must
either define both of uid and fid or not.
v2->v3:
1. Revise code style.
2. Update test cases.
3. Introduce qemuDomainCollectPCIAddressExtension() to collect PCI
extension addresses.
4. Introduce virDeviceInfoPCIAddressExtensionPresent() to check if zPCI
address exists.
5. Optimize zPCI address check logic.
6. Optimize passed parameters of zPCI addr alloc/release/reserve functions.
7. Report enum range error in qemuDomainDeviceSupportZPCI().
8. Update commit messages.
v1->v2:
1. Separate test commit and merge testcases into corresponding commits that
introduce the functionalities firstly.
2. Spare some checks for zpci device.
3. Add vsock and controller support.
4. Add uin32 type schema.
5. Rename zpciuid and zpcifid to zpci_uid and zpci_fid.
6. Always return multibus support on S390.
Yi Min Zhao (13):
conf: Add definitions for 'uid' and 'fid' PCI address attributes
qemu: Introduce zPCI capability
conf: Introduce a new PCI address extension flag
qemu: Enable PCI multi bus for S390 guests
qemu: Auto add pci-root for s390/s390x guests
conf: Introduce address caching for PCI extensions
conf: Introduce parser, formatter for uid and fid
qemu: Add zPCI address definition check
conf: Allocate/release 'uid' and 'fid' in PCI address
qemu: Generate and use zPCI device in QEMU command line
qemu: Add hotpluging support for PCI devices on S390 guests
docs: Add 'uid' and 'fid' information
news: Update news for PCI address extension attributes
cfg.mk | 1 +
docs/formatdomain.html.in | 9 +-
docs/news.xml | 10 +
docs/schemas/basictypes.rng | 23 ++
docs/schemas/domaincommon.rng | 1 +
src/conf/device_conf.c | 76 +++++
src/conf/device_conf.h | 4 +
src/conf/domain_addr.c | 330 +++++++++++++++++++++
src/conf/domain_addr.h | 29 ++
src/conf/domain_conf.c | 6 +
src/libvirt_private.syms | 6 +
src/qemu/qemu_capabilities.c | 6 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 95 ++++++
src/qemu/qemu_command.h | 2 +
src/qemu/qemu_domain.c | 27 ++
src/qemu/qemu_domain_address.c | 205 ++++++++++++-
src/qemu/qemu_hotplug.c | 151 +++++++++-
src/util/virpci.h | 11 +
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 +
tests/qemuxml2argvdata/disk-virtio-s390-zpci.args | 26 ++
tests/qemuxml2argvdata/disk-virtio-s390-zpci.xml | 17 ++
.../hostdev-vfio-zpci-autogenerate.args | 25 ++
.../hostdev-vfio-zpci-autogenerate.xml | 18 ++
.../hostdev-vfio-zpci-boundaries.args | 29 ++
.../hostdev-vfio-zpci-boundaries.xml | 26 ++
.../hostdev-vfio-zpci-multidomain-many.args | 39 +++
.../hostdev-vfio-zpci-multidomain-many.xml | 67 +++++
tests/qemuxml2argvdata/hostdev-vfio-zpci.args | 25 ++
tests/qemuxml2argvdata/hostdev-vfio-zpci.xml | 19 ++
tests/qemuxml2argvtest.c | 20 ++
tests/qemuxml2xmloutdata/disk-virtio-s390-zpci.xml | 29 ++
.../hostdev-vfio-zpci-autogenerate.xml | 30 ++
.../hostdev-vfio-zpci-boundaries.xml | 42 +++
.../hostdev-vfio-zpci-multidomain-many.xml | 79 +++++
tests/qemuxml2xmloutdata/hostdev-vfio-zpci.xml | 30 ++
tests/qemuxml2xmltest.c | 17 ++
42 files changed, 1523 insertions(+), 14 deletions(-)
create mode 100644 tests/qemuxml2argvdata/disk-virtio-s390-zpci.args
create mode 100644 tests/qemuxml2argvdata/disk-virtio-s390-zpci.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate.args
create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-boundaries.args
create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-boundaries.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.args
create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci.args
create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci.xml
create mode 100644 tests/qemuxml2xmloutdata/disk-virtio-s390-zpci.xml
create mode 100644 tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate.xml
create mode 100644 tests/qemuxml2xmloutdata/hostdev-vfio-zpci-boundaries.xml
create mode 100644 tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.xml
create mode 100644 tests/qemuxml2xmloutdata/hostdev-vfio-zpci.xml
--
Yi Min
6 years, 3 months
[libvirt] [PATCH v4 0/4] block/rbd: enable filename parsing on open
by Jeff Cody
Changes from v3:
================
Patch 4: Typo fixed [Eric]
Added examples [Eric]
Changes from v2:
=================
Patch 4: New, document deprecation. [Eric]
Patch 3,2: Add r-b's
Changes from v1:
=================
Patch 1: Don't pass unused BlockDriverState to helper function
Patch 2: Do not allow mixed usage; fail if keyvalue is present [Eric]
Add deprecation warning [John]
Pull legacy parsing code into function [John]
Fixed filename leak
Patch 3: New; iotest 231. [Eric]
iotest failure on current master:
QA output created by 231
-qemu-img: RBD options encoded in the filename as keyvalue pairs is deprecated. Future versions may cease to parse these options in the future.
-unable to get monitor info from DNS SRV with service name: ceph-mon
-no monitors specified to connect to.
-qemu-img: Could not open 'json:{'file.driver':'rbd','file.filename':'rbd:rbd/bogus:conf=BOGUS_CONF'}': error connecting: No such file or directory
+qemu-img: Could not open 'json:{'file.driver':'rbd','file.filename':'rbd:rbd/bogus:conf=BOGUS_CONF'}': Parameter 'pool' is missing
unable to get monitor info from DNS SRV with service name: ceph-mon
no monitors specified to connect to.
qemu-img: Could not open 'json:{'file.driver':'rbd','file.pool':'rbd','file.image':'bogus','file.conf':'BOGUS_CONF'}': error connecting: No such file or directory
Failures: 231
Failed 1 of 1 tests
Jeff Cody (4):
block/rbd: pull out qemu_rbd_convert_options
block/rbd: Attempt to parse legacy filenames
block/rbd: add iotest for rbd legacy keyvalue filename parsing
block/rbd: add deprecation documentation for filename keyvalue pairs
block/rbd.c | 89 ++++++++++++++++++++++++++++++++------
qemu-deprecated.texi | 15 +++++++
tests/qemu-iotests/231 | 62 ++++++++++++++++++++++++++
tests/qemu-iotests/231.out | 9 ++++
tests/qemu-iotests/group | 1 +
5 files changed, 162 insertions(+), 14 deletions(-)
create mode 100755 tests/qemu-iotests/231
create mode 100644 tests/qemu-iotests/231.out
--
2.17.1
6 years, 3 months
[libvirt] [PATCH 00/10] libxl: PVHv2 support
by Marek Marczykowski-Górecki
This is a respin of my old PVHv1 patch[1], converted to PVHv2.
Should the code use "PVH" name (as libxl does internally), or "PVHv2" as in
many places in Xen documentation? I've chosen the former, but want to confirm
it.
Also, not sure about VIR_DOMAIN_OSTYPE_XENPVH (as discussed on PVHv1 patch) -
while it will be messy in many cases, there is
libxl_domain_build_info.u.{hvm,pv,pvh} which would be good to not mess up.
Also, PVHv2 needs different kernel features than PV (CONFIG_XEN_PVH vs
CONFIG_XEN_PV), so keeping the same VIR_DOMAIN_OSTYPE_XEN could be
confusing.
On the other hand, libxl_domain_build_info.u.pv is used in very few places (one
section of libxlMakeDomBuildInfo), so guarding u.hvm access with
VIR_DOMAIN_OSTYPE_HVM may be enough.
For now I've reused VIR_DOMAIN_OSTYPE_XEN - in the driver itself, most of
the code is the same as for PV.
Since PVHv2 relies on features in newer Xen versions, I needed to convert also
some older code. For example b_info->u.hvm.nested_hvm was deprecated in favor
of b_info->nested_hvm. While the code do handle both old and new versions
(obviously refusing PVHv2 if Xen is too old), this isn't the case for tests.
How it should be handled, if at all?
First few preparatory patches can be applied independently.
[1] https://www.redhat.com/archives/libvir-list/2016-August/msg00376.html
Marek Marczykowski-Górecki (10):
docs: don't refer to deprecated 'linux' ostype in example
docs: add documentation of arch element of capabilities.xml
docs: update domain schema for machine attribute
libxl: set shadow memory for any guest type, not only HVM
libxl: prefer new location of nested_hvm in libxl_domain_build_info
libxl: reorder libxlMakeDomBuildInfo for upcoming PVH support
libxl: add support for PVH
tests: add basic Xen PVH test
xenconfig: add support for parsing type= xl config entry
xenconfig: add support for type="pvh"
docs/formatcaps.html.in | 20 +++-
docs/formatdomain.html.in | 12 +-
docs/schemas/domaincommon.rng | 3 +-
src/libxl/libxl_capabilities.c | 23 +++-
src/libxl/libxl_conf.c | 90 ++++++++++++-----
src/libxl/libxl_driver.c | 6 +-
src/xenconfig/xen_common.c | 27 ++++-
src/xenconfig/xen_xl.c | 5 +-
tests/libxlxml2domconfigdata/basic-pv.json | 1 +-
tests/libxlxml2domconfigdata/basic-pvh.json | 49 +++++++++-
tests/libxlxml2domconfigdata/basic-pvh.xml | 28 +++++-
tests/libxlxml2domconfigdata/fullvirt-cpuid.json | 2 +-
tests/libxlxml2domconfigdata/multiple-ip.json | 1 +-
tests/libxlxml2domconfigdata/vnuma-hvm.json | 2 +-
tests/libxlxml2domconfigtest.c | 1 +-
tests/testutilsxen.c | 3 +-
tests/xlconfigdata/test-fullvirt-type.cfg | 21 ++++-
tests/xlconfigdata/test-fullvirt-type.xml | 27 +++++-
tests/xlconfigdata/test-paravirt-type.cfg | 13 ++-
tests/xlconfigdata/test-paravirt-type.xml | 25 +++++-
tests/xlconfigdata/test-pvh-type.cfg | 13 ++-
tests/xlconfigdata/test-pvh-type.xml | 25 +++++-
tests/xlconfigtest.c | 3 +-
23 files changed, 358 insertions(+), 42 deletions(-)
create mode 100644 tests/libxlxml2domconfigdata/basic-pvh.json
create mode 100644 tests/libxlxml2domconfigdata/basic-pvh.xml
create mode 100644 tests/xlconfigdata/test-fullvirt-type.cfg
create mode 100644 tests/xlconfigdata/test-fullvirt-type.xml
create mode 100644 tests/xlconfigdata/test-paravirt-type.cfg
create mode 100644 tests/xlconfigdata/test-paravirt-type.xml
create mode 100644 tests/xlconfigdata/test-pvh-type.cfg
create mode 100644 tests/xlconfigdata/test-pvh-type.xml
base-commit: 49a5fcfac7d13ac8082a80aff7d7156968afee0f
--
git-series 0.9.1
6 years, 3 months
[libvirt] [PATCH 0/3] Fix some Coverity found issues.
by John Ferlan
Updated to a more recent Coverity checker and it found some new
issues. The last one perhaps could be a false positive, I don't
really know for sure, but there's enough instances that I figured
it was worth the patch.
John Ferlan (3):
conf: Alter when ctxt->node is set
lxc: Resolve memory leak
tests: Resolve possible overrun
src/conf/domain_conf.c | 8 +--
src/lxc/lxc_native.c | 110 +++++++++++++++++++++++------------------
tests/vircgroupmock.c | 21 ++++----
3 files changed, 79 insertions(+), 60 deletions(-)
--
2.17.1
6 years, 3 months
[libvirt] [PATCH] tools: Fix printf format
by Michal Privoznik
We're passing size_t but using format for unsigned long.
Introduced in latest vshTable rework patches.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under build breaker and trivial rules.
tools/virsh-domain.c | 2 +-
tools/virt-admin.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 2a416b919a..cfb0095333 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -6949,7 +6949,7 @@ virshVcpuPinQuery(vshControl *ctl,
if (!(pinInfo = virBitmapDataFormat(cpumap, cpumaplen)))
goto cleanup;
- if (virAsprintf(&vcpuStr, "%lu", i) < 0)
+ if (virAsprintf(&vcpuStr, "%zu", i) < 0)
goto cleanup;
if (vshTableRowAppend(table, vcpuStr, pinInfo, NULL) < 0)
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index ce74489edf..77928ddb80 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -398,7 +398,7 @@ cmdSrvList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
for (i = 0; i < nsrvs; i++) {
VIR_AUTOFREE(char *) idStr = NULL;
- if (virAsprintf(&idStr, "%lu", i) < 0)
+ if (virAsprintf(&idStr, "%zu", i) < 0)
goto cleanup;
if (vshTableRowAppend(table,
--
2.16.4
6 years, 3 months