On Wed, Mar 29, 2017 at 03:56:28PM +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> > --- > Changes | 1 + > Virt.xs | 12 ++++++++++++ > lib/Sys/Virt/Domain.pm | 9 +++++++++ > 3 files changed, 22 insertions(+) > > diff --git a/Changes b/Changes > index 4d6136f..3faaf08 100644 > --- a/Changes > +++ b/Changes > @@ -12,6 +12,7 @@ Revision history for perl module Sys::Virt > - Add PERF_PARAM_ALIGNMENT_FAULTS constant > - Add PERF_PARAM_EMULATION_FAULTS constant > - Add block threshold event > + - Add virDomainSetBlockThreshold API > > 3.1.0 2017-03-03 > > diff --git a/Virt.xs b/Virt.xs > index e0588f0..a05cf4d 100644 > --- a/Virt.xs > +++ b/Virt.xs > @@ -6120,6 +6120,18 @@ send_process_signal(dom, pidsv, signum, flags=0) > if (virDomainSendProcessSignal(dom, pid, signum, flags) < 0) > _croak_error(); > > +void > +set_block_threshold(dom, dev, thresholdsv, flags=0) > + virDomainPtr dom; > + const char *dev; > + SV *thresholdsv; > + unsigned int flags; > + PREINIT: > + unsigned long long threshold; > + PPCODE: > + threshold = virt_SvIVull(thresholdsv); > + if (virDomainSetBlockThreshold(dom, dev, threshold, flags) < 0) > + _croak_error(); nit-pick - the stuff below PPCODE shoudl be indented to the same level as variable declarations. Yes, some pre-existing methods are inconsistent, as editors get very confused by perl XS format indenting. ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list