On Tue, Mar 11, 2025 at 14:01:38 +0000, Daniel P. Berrangé wrote:
> On Thu, Mar 06, 2025 at 03:43:18PM +0100, Peter Krempa wrote:
> > On Tue, Mar 04, 2025 at 14:04:06 +0000, Daniel P. Berrangé wrote:
> > > Contrary to most APIs returning typed parameters, there are no constants
> > > defined for the domain stats data keys. This is was because many of the
> > > keys needs to be dynamically constructed using one or more array index
> > > values.
> > > 
> > > It is possible to define constants while still supporting dynamic
> > > array indexes by simply defining the prefixes and suffixes as constants.
> > > The consuming code can then combine the constants with array index
> > > value.
> > > 
> > > With this approach, it is practical to add constants for the domain stats
> > > API keys.
> > > 
> > > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>
> > > ---
> > >  include/libvirt/libvirt-domain.h | 123 +++++++++++++++++++++++++++++++
> > >  src/libvirt-domain.c             |  44 +++--------
> > >  src/qemu/qemu_driver.c           |  44 +++++++----
> > >  3 files changed, 166 insertions(+), 45 deletions(-)
> 
> 
> > > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
> > > index 6c86ad566f..78bc053151 100644
> > > --- a/src/libvirt-domain.c
> > > +++ b/src/libvirt-domain.c
> > > @@ -12253,43 +12253,23 @@ virConnectGetDomainCapabilities(virConnectPtr 
> > > conn,
> > >   *
> > >   * VIR_DOMAIN_STATS_VCPU:
> > >   *     Return virtual CPU statistics.
> > > - *     Due to VCPU hotplug, the vcpu.<num>.* array could be sparse.
> > 
> > [...]
> > 
> > > - *    This group of statistics also reports additional 
> > > hypervisor-originating
> > > - *    per-vCPU stats. The hypervisor-specific statistics in this group 
> > > have the
> > > - *    following naming scheme:
> > > + *     This group of statistics also reports additional 
> > > hypervisor-originating
> > > + *     per-vCPU stats. The hypervisor-specific statistics in this group 
> > > have the
> > > + *     following naming scheme:
> > 
> > The alignment of this hunk is off by 1.
> 
> I'm not sure I see the problem here. This is aligned at 4-spaces which
> matches the surrounding code, and looks to render ok to me.

Ah I see. I was comparing it to the hunk directly above (right under
VIR_DOMAIN_STATS_VCPU:) which is actually correct; so this is actually
fixing the alignment for that paragraph and not breaking it.

It seemed to me as if it was breaking the alignment instead.

Sorry for the noise

Reply via email to