[PATCH v2 0/6] virsh: refactor some bigger functions

Kristina Hanicova posted 6 patches 2 years, 7 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1632439268.git.khanicov@redhat.com
tools/virsh-domain.c | 210 ++++++++++++++++++++-----------------------
tools/virsh-host.c   | 139 ++++++++++++++--------------
tools/virsh-volume.c |  52 +++++------
3 files changed, 189 insertions(+), 212 deletions(-)
[PATCH v2 0/6] virsh: refactor some bigger functions
Posted by Kristina Hanicova 2 years, 7 months ago
This is v2 of patch:
https://listman.redhat.com/archives/libvir-list/2021-September/msg00730.html

Diff to v1:
* split the previous patch into more smaller ones to make the code
  review easier
* small code quality alternations I did not notice were possible before

This series refactors a few bigger functions mainly trying to remove too
deep indentation and make them more readable and more consistent with
the rest of the files.

Kristina Hanicova (6):
  virsh: domain: refactor cmdSchedinfo()
  virsh: domain: refactor virshCPUCountCollect()
  virsh: domain: refactor cmdLxcEnterNamespace()
  virsh: host: refactor cmdFreecell()
  virsh: host: refactor cmdNodeCpuStats()
  virsh: volume: refactor cmdVolInfo()

 tools/virsh-domain.c | 210 ++++++++++++++++++++-----------------------
 tools/virsh-host.c   | 139 ++++++++++++++--------------
 tools/virsh-volume.c |  52 +++++------
 3 files changed, 189 insertions(+), 212 deletions(-)

-- 
2.31.1

Re: [PATCH v2 0/6] virsh: refactor some bigger functions
Posted by Michal Prívozník 2 years, 7 months ago
On 9/24/21 1:25 AM, Kristina Hanicova wrote:
> This is v2 of patch:
> https://listman.redhat.com/archives/libvir-list/2021-September/msg00730.html
> 
> Diff to v1:
> * split the previous patch into more smaller ones to make the code
>   review easier
> * small code quality alternations I did not notice were possible before
> 
> This series refactors a few bigger functions mainly trying to remove too
> deep indentation and make them more readable and more consistent with
> the rest of the files.
> 
> Kristina Hanicova (6):
>   virsh: domain: refactor cmdSchedinfo()
>   virsh: domain: refactor virshCPUCountCollect()
>   virsh: domain: refactor cmdLxcEnterNamespace()
>   virsh: host: refactor cmdFreecell()
>   virsh: host: refactor cmdNodeCpuStats()
>   virsh: volume: refactor cmdVolInfo()
> 
>  tools/virsh-domain.c | 210 ++++++++++++++++++++-----------------------
>  tools/virsh-host.c   | 139 ++++++++++++++--------------
>  tools/virsh-volume.c |  52 +++++------
>  3 files changed, 189 insertions(+), 212 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

I've done the change suggested in 1/6 and pushed.

Michal