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

Re: [Xen-devel] [PATCH v4 03/14] golang/xenlight: Add host-related functionality



On Thu, Mar 16, 2017 at 7:08 PM, Ronald Rojas <ronladred@xxxxxxxxx> wrote:
> Add calls for the following host-related functionality:
> - libxl_get_max_cpus
> - libxl_get_online_cpus
> - libxl_get_max_nodes
> - libxl_get_free_memory
> - libxl_get_physinfo
> - libxl_get_version_info
>
> Include Golang versions of the following structs:
> - libxl_physinfo as Physinfo
> - libxl_version_info as VersionInfo
> - libxl_hwcap as Hwcap
>
> Signed-off-by: Ronald Rojas <ronladred@xxxxxxxxx>
> ---
> Changes since last version
>
> - Used defer for libxl_physinfo_dispose

You say you did this, but...

> +//int libxl_get_physinfo(libxl_ctx *ctx, libxl_physinfo *physinfo)
> +func (Ctx *Context) GetPhysinfo() (physinfo *Physinfo, err error) {
> +       err = Ctx.CheckOpen()
> +       if err != nil {
> +               return
> +       }
> +       var cphys C.libxl_physinfo
> +       C.libxl_physinfo_init(&cphys)
> +
> +       ret := C.libxl_get_physinfo(Ctx.ctx, &cphys)
> +
> +       if ret < 0 {
> +               err = Error(ret)
> +               return
> +       }
> +       physinfo = cphys.toGo()
> +       C.libxl_physinfo_dispose(&cphys)

...the code looks the same as before.  Did you forge to / mix up a commit?

 -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®.