Switch to using the 'g_auto*' helpers.
Signed-off-by: Yi Li
---
src/util/virconf.c | 47 +++---
1 file changed, 15 insertions(+), 32 deletions(-)
diff --git a/src/util/virconf.c b/src/util/virconf.c
index 16107bce96..17fbea2397 100644
---
Switch to using the 'g_auto*' helpers.
Signed-off-by: Yi Li
---
src/util/virconf.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/util/virconf.c b/src/util/virconf.c
index 16107bce96..11046a1d45 100644
--- a/src/util/virconf.c
+++
Switch to using the 'g_auto*' helpers.
Signed-off-by: Yi Li
---
src/qemu/qemu_capabilities.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 790375ac38..447cf77875 100644
---
Just return when alias is null and Remove the 'ret' variable.
Signed-off-by: Yi Li
---
src/qemu/qemu_block.c | 21 -
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 3d88e701b2..0af3e56c9a 100644
'conn' vairable which are used only inside the func. Let's declare
inside the func body to make that obvious.
Use g_autofree to allow removal of 'cleanup:' and the 'ret' variable.
Signed-off-by: Yi Li
---
src/qemu/qemu_migration.c | 68 +++-
Just Return when alias is null and Remove the 'ret' variable.
Signed-off-by: Yi Li
---
src/qemu/qemu_block.c | 21 -
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 0b8ca2a3f5..32b6500a3d 100644
Get rid of the 'need_release' variable.
Signed-off-by: Yi Li
---
src/qemu/qemu_hotplug.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 882e5d2384..e07dba3c5e 100644
--- a/src/qemu/qemu_hotplug.c
use the ret variable for return value
Signed-off-by: Yi Li
---
src/storage/storage_backend_rbd.c | 22 ++
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/src/storage/storage_backend_rbd.c
b/src/storage/storage_backend_rbd.c
index 1630d6eede..22f5c78591 100644
get rid of the 'cleanup:' label and created variable.
Signed-off-by: Yi Li
---
src/storage/storage_util.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 2478cb0a4a..2e2c7dc68a 100644
--- a/s
remove unused return variable,
The errno will throw by virReportSystemError
Signed-off-by: Yi Li
---
src/storage/storage_util.c | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index c13abf03af
refactor and remove unused created variable.
Signed-off-by: Yi Li
---
src/storage/storage_util.c | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index c6d0f7a97c..cc8189c3e0 100644
--- a/src
refactor storageBackendCreateRaw and remove some unused variable.
Yi Li (3):
createRawFile: remove unused return variable
virStorageBackendCopyToFD: remove unused return variable
storageBackendCreateRaw: remove unused created
src/storage/storage_util.c | 66
remove unused return variable,
The errno will throw by virReportSystemError
Signed-off-by: Yi Li
---
src/storage/storage_util.c | 21 -
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index cf1f33f177
refactor and remove unused created variable
Signed-off-by: Yi Li
---
src/storage/storage_util.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index c6d0f7a97c..c02ece8253 100644
--- a/src
remove unused return variable,
The errno will throw by virReportSystemError
Signed-off-by: Yi Li
---
src/storage/storage_util.c | 21 -
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 6fc8597733
remove unused return variable,
The errno will throw by virReportSystemError
Signed-off-by: Yi Li
---
src/storage/storage_util.c | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index cf1f33f177
On 11/6/20, Ján Tomko wrote:
> On a Friday in 2020, Yi Li wrote:
>>---
>> src/libvirt_private.syms | 1 -
>> src/util/virxml.c| 21 -
>> src/util/virxml.h| 1 -
>> 3 files changed, 23 deletions(-)
>>
>
> Looks g
---
src/libvirt_private.syms | 1 -
src/util/virxml.c| 21 -
src/util/virxml.h| 1 -
3 files changed, 23 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 9029ea4fa2..36ab84162c 100644
--- a/src/libvirt_private.syms
+++ b/src
The function is marked as unused. Remove it from the tree
until a new use case can be found.
Signed-off-by: Yi Li
---
tools/virsh-domain.c | 115 ---
1 file changed, 115 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index
Eliminate cleanup code by using g_autofree.
Signed-off-by: Yi Li
---
src/qemu/qemu_monitor_json.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 6c763ecc12..4994ace071 100644
--- a/src/qemu
Eliminate cleanup code by using g_autofree in qemuMonitorJSONCheckErrorFull()
and qemuMonitorJSONCheckReply
Signed-off-by: Yi Li
---
src/qemu/qemu_monitor_json.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu
Eliminate cleanup code by using g_autofree.
Signed-off-by: Yi Li
---
src/qemu/qemu_monitor_json.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 26ac499fc5..f76b369191 100644
--- a/src/qemu
virFileComparePaths just return 0 or 1 after commit 7b48bb8
so break while after virFileComparePaths return 1
Signed-off-by: Yi Li
---
src/storage/storage_backend_fs.c | 8 ++--
src/util/virfile.c | 1 -
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/src
virshDomainFree correctly handle null pointer parameters.
There is no need to check if the parameter is null before
calling this function.
Signed-off-by: Yi Li
---
tools/virsh-domain-monitor.c | 6 ++
tools/virsh-domain.c | 3 +--
2 files changed, 3 insertions(+), 6 deletions
Signed-off-by: Yi Li
---
src/conf/snapshot_conf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index 857d04c476..f73eeb06c7 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -231,7 +231,7
Use g_new0 to allocate and remove NULL checks from callers
and the lock will release properly
Signed-off-by: Yi Li
---
src/conf/virstorageobj.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 13b75b648d
The lock should be released.
Signed-off-by: Yi Li
---
src/conf/virstorageobj.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 13b75b648d..9f24ae67ca 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf
replace vm->def->disks[i] with dom_disk parameter
Signed-off-by: Yi Li
---
src/qemu/qemu_driver.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index daa3cb397d..27f43124ac 100644
--- a/src/qemu/qemu_driver.c
Use errno parameter in virReportSystemError.
Remove hold function return values if don't need.
Signed-off-by: Yi Li
---
src/storage/storage_backend_rbd.c | 159 ++
1 file changed, 76 insertions(+), 83 deletions(-)
diff --git a/src/st
most libvirt code uses 'int rc' to hold intermediate
function return values. consistent with the rest of libvirt.
Signed-off-by: Yi Li
---
src/storage/storage_backend_rbd.c | 202 ++
1 file changed, 96 insertions(+), 106 deletions(-)
diff --git a/s
Fix the return value status comparison checking for call to
volStorageBackendRBDRefreshVolInfo introduced by commit id f46d137e.
we only should fail when the return is < 0. -ENOENT, -ETIMEDOUT will
ignore according commit id f46d137e.
Signed-off-by: Yi Li
---
src/storage/storage_backend_rb
f2ce0,
searcher=searcher@entry=0x92103e68
,
opaque=) at conf/virstorageobj.c:505
5 0x92101f54 in storagePoolLookupByTargetPath (conn=0x5c0009f0,
path=0x7009a850 "/vms/images") at storage/storage_driver.c:1672
Signed-off-by: Yi Li
---
src/storage/storage_driver.c
obj.c:505
5 0x92101f54 in storagePoolLookupByTargetPath (conn=0x5c0009f0,
path=0x7009a850 "/vms/images") at storage/storage_driver.c:1672
Signed-off-by: Yi Li
---
src/storage/storage_driver.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/src/storage/storage
Fix the return value status comparison checking for call to
volStorageBackendRBDRefreshVolInfo introduced by commit id f46d137e.
we only should fail when the return is < 0. -ENOENT, -ETIMEDOUT will
ignore according commit id f46d137e.
Signed-off-by: Yi Li
---
src/storage/storage_backend_rb
Fix the return value status comparison checking for call to
volStorageBackendRBDRefreshVolInfo introduced by commit id f46d137e.
we only should fail when the return is < 0. -ENOENT, -ETIMEDOUT will
ignore according commit id f46d137e.
Signed-off-by: Yi Li
---
src/storage/storage_backend_rb
Move virStorageBackendFileSystemGetPoolSource outside of the while loop
Signed-off-by: Yi Li
---
src/storage/storage_backend_fs.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 02b8248
Move virStorageBackendFileSystemGetPoolSource outside of the while loop
Signed-off-by: Yi Li
---
src/storage/storage_backend_fs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 02b8248..10d9457
65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
2: After boot, the backingStore format is not expected
..
/usr/libexec/qemu-kvm
merge VIR_STORAGE_FILE_AUTO_SAFE/VIR_STORAGE_FILE_AUTO to VIR_STORAGE_FILE_AUTO
virStorageFileProbeFormatFromBuf will probe the backingStore format.
Fix the booting issue when setting backingStore format (QCOW image) to RAW
image.
Signed-off-by: Yi Li
---
src/qemu/qemu_block.c | 2 --
src
Silly mistakes omit the comma for multiple ipaddr
Fixes: cdd362e0e7a34d4f8f102c75f2ca513d23dd1db0
Signed-off-by: Yi Li
---
src/storage/storage_backend_rbd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/storage/storage_backend_rbd.c
b/src/storage
>From 4af765cb6ee87eb7a131901057a8b6d0e859ac63 Mon Sep 17 00:00:00 2001
From: Yi Li
Date: Sun, 28 Apr 2019 10:29:53 +0800
Subject: [PATCH v2] storage: escape ipv6 for ceph mon hosts to librados
Hosts for rbd are ceph monitor daemons. These have fixed IP addresses,
so they are often referenced
uare brackets
> >so it is distinguished from the port, which is currently mandatory.
> >
> >Signed-off-by: Yi Li
> >---
> > docs/schemas/storagepool.rng | 5 -
> > src/storage/storage_backend_rbd.c | 13 ++---
> > tests
used as an option separator in the
string passed to librados.
Escape these colons, and enclose the IPv6 address in square brackets
so it is distinguished from the port, which is currently mandatory.
Signed-off-by: Yi Li
---
docs/schemas/storagepool.rng | 5 -
src/storage
43 matches
Mail list logo