Re: [libvirt] [PATCH] virDomainGetAutostart takes a pointer that it writes the output value to

2019-08-21 Thread Daniel P . Berrangé
On Wed, Aug 21, 2019 at 03:30:05AM -0700, Sage Imel wrote:
> No objection, thanks for catching that.

This is now pushed, thanks for your contribution.

Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] virDomainGetAutostart takes a pointer that it writes the output value to

2019-08-21 Thread Sage Imel
No objection, thanks for catching that.
--
Sage Imel 
Lead Linux/Unix System Administrator
Maseeh College of Engineering and Computer Science
Computer Action Team 
supp...@cat.pdx.edu - (503) 725-5420


On Wed, Aug 21, 2019 at 3:27 AM Daniel P. Berrangé 
wrote:

> On Thu, Aug 15, 2019 at 02:41:40PM -0700, Sage Imel wrote:
> > The current version of get_autostart seg faults. This patch
> > correctly passes a pointer to an int to virDomainGetAutostart
> > and returns a result based on the value of that int
> >
> > Signed-off-by: sage Imel 
>
> Jan points out the inconsistent capitalization on your first name. Any
> objection to me fixing that when pushing ?
>
> Regards,
> Daniel
> --
> |: https://berrange.com  -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org-o-
> https://www.instagram.com/dberrange :|
>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] virDomainGetAutostart takes a pointer that it writes the output value to

2019-08-21 Thread Daniel P . Berrangé
On Thu, Aug 15, 2019 at 02:41:40PM -0700, Sage Imel wrote:
> The current version of get_autostart seg faults. This patch
> correctly passes a pointer to an int to virDomainGetAutostart
> and returns a result based on the value of that int
> 
> Signed-off-by: sage Imel 

Jan points out the inconsistent capitalization on your first name. Any
objection to me fixing that when pushing ?

Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] virDomainGetAutostart takes a pointer that it writes the output value to

2019-08-21 Thread Daniel P . Berrangé
On Wed, Aug 21, 2019 at 12:22:47PM +0200, Ján Tomko wrote:
> On Wed, Aug 21, 2019 at 11:01:41AM +0100, Daniel P. Berrangé wrote:
> > On Thu, Aug 15, 2019 at 02:22:52PM -0700, Sage Imel wrote:
> > > ---
> > >  src/domain.rs | 7 ---
> > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > The change looks good, however, we need contributors to assert compliance
> > with the Developer Certificate of Origin:
> > 
> >   https://developercertificate.org/
> > 
> > Assuming you're ok with what's described there, you simply need to
> > add 'Signed-off-by: Your Name ' in the commit message
> > of the change. This can be done with 'git commit -s' (--amend for
> > existing commits)
> > 
> > If you can resend with that done, i'll merge this.
> 
> There's a resend of this patch with a sign-off:
> https://www.redhat.com/archives/libvir-list/2019-August/msg00588.html
> 
> however the capitalization does not match the From: field.

Opps, I missed that patch !

Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] virDomainGetAutostart takes a pointer that it writes the output value to

2019-08-21 Thread Ján Tomko

On Wed, Aug 21, 2019 at 11:01:41AM +0100, Daniel P. Berrangé wrote:

On Thu, Aug 15, 2019 at 02:22:52PM -0700, Sage Imel wrote:

---
 src/domain.rs | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)


The change looks good, however, we need contributors to assert compliance
with the Developer Certificate of Origin:

  https://developercertificate.org/

Assuming you're ok with what's described there, you simply need to
add 'Signed-off-by: Your Name ' in the commit message
of the change. This can be done with 'git commit -s' (--amend for
existing commits)

If you can resend with that done, i'll merge this.


There's a resend of this patch with a sign-off:
https://www.redhat.com/archives/libvir-list/2019-August/msg00588.html

however the capitalization does not match the From: field.

Jano



signature.asc
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] virDomainGetAutostart takes a pointer that it writes the output value to

2019-08-21 Thread Daniel P . Berrangé
On Thu, Aug 15, 2019 at 02:22:52PM -0700, Sage Imel wrote:
> ---
>  src/domain.rs | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)

The change looks good, however, we need contributors to assert compliance
with the Developer Certificate of Origin:

   https://developercertificate.org/

Assuming you're ok with what's described there, you simply need to
add 'Signed-off-by: Your Name ' in the commit message
of the change. This can be done with 'git commit -s' (--amend for
existing commits)

If you can resend with that done, i'll merge this.

> diff --git a/src/domain.rs b/src/domain.rs
> index 11ecb3c..acb9e6e 100644
> --- a/src/domain.rs
> +++ b/src/domain.rs
> @@ -136,7 +136,7 @@ extern "C" {
>  fn virDomainGetHostname(ptr: sys::virDomainPtr, flags: libc::c_uint) -> 
> *mut libc::c_char;
>  fn virDomainGetUUIDString(ptr: sys::virDomainPtr, uuid: *mut 
> libc::c_char) -> libc::c_int;
>  fn virDomainGetXMLDesc(ptr: sys::virDomainPtr, flags: libc::c_uint) -> 
> *mut libc::c_char;
> -fn virDomainGetAutostart(ptr: sys::virDomainPtr) -> libc::c_int;
> +fn virDomainGetAutostart(ptr: sys::virDomainPtr, autostart: *mut 
> libc::c_int) -> libc::c_int;
>  fn virDomainSetAutostart(ptr: sys::virDomainPtr, autostart: 
> libc::c_uint) -> libc::c_int;
>  fn virDomainGetID(ptr: sys::virDomainPtr) -> libc::c_uint;
>  fn virDomainSetMaxMemory(ptr: sys::virDomainPtr, memory: libc::c_ulong) 
> -> libc::c_int;
> @@ -1036,11 +1036,12 @@ impl Domain {
>  
>  pub fn get_autostart() -> Result {
>  unsafe {
> -let ret = virDomainGetAutostart(self.as_ptr());
> +let mut autostart: libc::c_int = 0;
> +let ret = virDomainGetAutostart(self.as_ptr(),  autostart);
>  if ret == -1 {
>  return Err(Error::new());
>  }
> -return Ok(ret == 1);
> +return Ok(autostart == 1);
>  }
>  }

Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH] virDomainGetAutostart takes a pointer that it writes the output value to

2019-08-16 Thread Sage Imel
---
 src/domain.rs | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/domain.rs b/src/domain.rs
index 11ecb3c..acb9e6e 100644
--- a/src/domain.rs
+++ b/src/domain.rs
@@ -136,7 +136,7 @@ extern "C" {
 fn virDomainGetHostname(ptr: sys::virDomainPtr, flags: libc::c_uint) -> 
*mut libc::c_char;
 fn virDomainGetUUIDString(ptr: sys::virDomainPtr, uuid: *mut libc::c_char) 
-> libc::c_int;
 fn virDomainGetXMLDesc(ptr: sys::virDomainPtr, flags: libc::c_uint) -> 
*mut libc::c_char;
-fn virDomainGetAutostart(ptr: sys::virDomainPtr) -> libc::c_int;
+fn virDomainGetAutostart(ptr: sys::virDomainPtr, autostart: *mut 
libc::c_int) -> libc::c_int;
 fn virDomainSetAutostart(ptr: sys::virDomainPtr, autostart: libc::c_uint) 
-> libc::c_int;
 fn virDomainGetID(ptr: sys::virDomainPtr) -> libc::c_uint;
 fn virDomainSetMaxMemory(ptr: sys::virDomainPtr, memory: libc::c_ulong) -> 
libc::c_int;
@@ -1036,11 +1036,12 @@ impl Domain {
 
 pub fn get_autostart() -> Result {
 unsafe {
-let ret = virDomainGetAutostart(self.as_ptr());
+let mut autostart: libc::c_int = 0;
+let ret = virDomainGetAutostart(self.as_ptr(),  autostart);
 if ret == -1 {
 return Err(Error::new());
 }
-return Ok(ret == 1);
+return Ok(autostart == 1);
 }
 }
 
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH] virDomainGetAutostart takes a pointer that it writes the output value to

2019-08-15 Thread Sage Imel
The current version of get_autostart seg faults. This patch
correctly passes a pointer to an int to virDomainGetAutostart
and returns a result based on the value of that int

Signed-off-by: sage Imel 
---
 src/domain.rs | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/domain.rs b/src/domain.rs
index 11ecb3c..acb9e6e 100644
--- a/src/domain.rs
+++ b/src/domain.rs
@@ -136,7 +136,7 @@ extern "C" {
 fn virDomainGetHostname(ptr: sys::virDomainPtr, flags: libc::c_uint) -> 
*mut libc::c_char;
 fn virDomainGetUUIDString(ptr: sys::virDomainPtr, uuid: *mut libc::c_char) 
-> libc::c_int;
 fn virDomainGetXMLDesc(ptr: sys::virDomainPtr, flags: libc::c_uint) -> 
*mut libc::c_char;
-fn virDomainGetAutostart(ptr: sys::virDomainPtr) -> libc::c_int;
+fn virDomainGetAutostart(ptr: sys::virDomainPtr, autostart: *mut 
libc::c_int) -> libc::c_int;
 fn virDomainSetAutostart(ptr: sys::virDomainPtr, autostart: libc::c_uint) 
-> libc::c_int;
 fn virDomainGetID(ptr: sys::virDomainPtr) -> libc::c_uint;
 fn virDomainSetMaxMemory(ptr: sys::virDomainPtr, memory: libc::c_ulong) -> 
libc::c_int;
@@ -1036,11 +1036,12 @@ impl Domain {
 
 pub fn get_autostart() -> Result {
 unsafe {
-let ret = virDomainGetAutostart(self.as_ptr());
+let mut autostart: libc::c_int = 0;
+let ret = virDomainGetAutostart(self.as_ptr(),  autostart);
 if ret == -1 {
 return Err(Error::new());
 }
-return Ok(ret == 1);
+return Ok(autostart == 1);
 }
 }
 
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list