Both qemu and lxc drivers have some duplicate code when
dealing with cgroups, such as virLXCCgroupSetupBlkioTune()
and qemuSetupBlkioCgroup(), duplicate code over 80, so
consolidate the same chunk into a separate routine.
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
src
Both QEMU and LXC drivers have some duplicate code when
dealing with cgroups, this serials mainly consolidate the
same chunk of src/qemu/qemu_cgroup.c and src/lxc/lxc_cgroup.c
into src/util/cgroup.c.
Mao Zhongyi (4):
lxc: remove duplicate header files
qemu: remove duplicate header files
"#include vircgroup.h" appears in both qemu_cgroup.h and
qemu_cgroup.c, and qemu_cgroup.c contains qemu_cgroup.h,
so remove the duplicate declarations.
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
src/qemu/qemu_cgroup.c | 1 -
1 file changed, 1 deletion(-)
diff --git
Both qemu and lxc drivers have some duplicate code when
dealing with cgroups, such as virLXCCgroupSetupMemTune()
and qemuSetupMemoryCgroup(), duplicate code over 80, so
consolidate the same chunk into a separate routine.
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
src
"#include vircgroup.h" appears in both lxc_cgroup.h and
lxc_cgroup.c, and lxc_cgroup.c contains lxc_cgroup.h,
so remove the duplicate declarations.
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
src/lxc/lxc_cgroup.c | 1 -
1 file changed, 1 deletion(-)
diff --git
A function virStringParseYesNo was added to convert
string 'yes' to true and 'no' to false, so use this
helper to replace 'STREQ(.*, \"yes\")' and
'STREQ(.*, \"no\")' as it allows us to drop several
repetitive if-then-else string->bool conversion blocks.
Signed-off-by:
alues are implicitly handled as 'false'. In this case,
use virStringParseYesNo to handle the conversion and
reserve the original logic of not raise an error, so
ignore the return value of helper.
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
src/con
- ignore the return value of virStringParseYesNo.
- update the commit message. [Michal Privoznik]
p2:
- add the Acked-by tag.
p3:
- pass return value of helper to rc directly.
[Michal Privoznik]
Mao Zhongyi (3):
conf/domain_conf: use virStringParseYesNo helpe
A function virStringParseYesNo was added to convert
string 'yes' to true and 'no' to false, so use this
helper to replace 'STREQ(.*, \"yes\")' and
'STREQ(.*, \"no\")' as it allows us to drop several
repetitive if-then-else string->bool conversion blocks.
Signed-off-by:
Cc: crobi...@redhat.com
Cc: berra...@redhat.com
Cc: g.sho1...@gmail.com
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
src/conf/network_conf.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 75ec5c
..@redhat.com
Cc: berra...@redhat.com
Cc: crobi...@redhat.com
Cc: g...@czarc.net
Cc: g.sho1...@gmail.com
Cc: jdene...@redhat.com
Cc: la...@laine.org
Cc: mklet...@redhat.com
Cc: phrd...@redhat.com
Mao Zhongyi (3):
conf/domain_conf: use virStringParseYesNo helper
conf/network_conf: use virStringP
g.sho1...@gmail.com
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
src/conf/domain_conf.c | 30 ++
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 10d6bf0eea..7420658726 100644
--- a/sr
.@redhat.com
Cc: g.sho1...@gmail.com
Cc: crobi...@redhat.com
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
src/qemu/qemu_migration_params.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index
13 matches
Mail list logo