[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 04/14] golang/xenlight: Implement libxl_domain_info and libxl_domain_unpause



On Thu, Mar 16, 2017 at 7:08 PM, Ronald Rojas <ronladred@xxxxxxxxx> wrote:
> Add calls for the following host-related functionality:
> - libxl_domain_info
> - libxl_domain_unpause
>
> Include Golang version for the libxl_domain_info as
> DomainInfo.
>
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx>
> Signed-off-by: Ronald Rojas <ronladred@xxxxxxxxx>
> ---
> Changes since last version
>
> - Formating fixes
>
> - used defer for libxl_dominfo_dispose
>
> - Removed unnessary unsafe.Pointer() casts.
>
> CC: xen-devel@xxxxxxxxxxxxx
> CC: george.dunlap@xxxxxxxxxx
> CC: ian.jackson@xxxxxxxxxxxxx
> CC: wei.liu2@xxxxxxxxxx
>
> ---
> ---
>  tools/golang/xenlight/xenlight.go | 136 
> +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 133 insertions(+), 3 deletions(-)
>
> diff --git a/tools/golang/xenlight/xenlight.go 
> b/tools/golang/xenlight/xenlight.go
> index 785eaaf..34c3050 100644
> --- a/tools/golang/xenlight/xenlight.go
> +++ b/tools/golang/xenlight/xenlight.go
> @@ -33,6 +33,7 @@ import "C"
>
>  import (
>         "fmt"
> +       "time"
>         "unsafe"
>  )
>
> @@ -102,13 +103,19 @@ var errors = [...]string{
>   * Types: Builtins
>   */
>
> +type Domid uint32
> +
> +type MemKB uint64
> +
> +type Uuid C.libxl_uuid
> +
>  type Context struct {
>         ctx *C.libxl_ctx
>  }
>
>  type Hwcap []C.uint32_t
>
> -func (chwcap C.libxl_hwcap) CToGo() (ghwcap Hwcap) {
> +func (chwcap C.libxl_hwcap) toGo() (ghwcap Hwcap) {
>         // Alloc a Go slice for the bytes
>         size := 8
>         ghwcap = make([]C.uint32_t, size)
> @@ -161,7 +168,7 @@ func (cphys *C.libxl_physinfo) toGo() (physinfo 
> *Physinfo) {
>         physinfo.SharingFreedPages = uint64(cphys.sharing_freed_pages)
>         physinfo.SharingUsedFrames = uint64(cphys.sharing_used_frames)
>         physinfo.NrNodes = uint32(cphys.nr_nodes)
> -       physinfo.HwCap = cphys.hw_cap.CToGo()
> +       physinfo.HwCap = cphys.hw_cap.toGo()

Oh -- looks like you accidentally added the changes intended for the
last patch to this patch.

Move this (and the defer libxl_physinfo_dispose) to the previous
patch, and you can add:

Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>

to both.

Thanks,
 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.