Created boilerplate struct and toC methods for the following structs: - KeyValueList - DomainBuildInfo - DeviceNic - DevicePci - DeviceRdm - DeviceDtdev - DeviceVfb - DeviceVkb - DeviceVtpm - DeviceChannel - DeviceUsbctrl - DeviceUsbdev
Signed-off-by: Ronald Rojas <ronlad...@gmail.com> --- This specific patch constains mostly boilerplate code that will be implemented in patches later down the road. CC: xen-devel@lists.xen.org CC: george.dun...@citrix.com CC: ian.jack...@eu.citrix.com CC: wei.l...@citrix.com --- --- tools/golang/xenlight/xenlight.go | 162 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) diff --git a/tools/golang/xenlight/xenlight.go b/tools/golang/xenlight/xenlight.go index d520f74..8b5ca38 100644 --- a/tools/golang/xenlight/xenlight.go +++ b/tools/golang/xenlight/xenlight.go @@ -1137,3 +1137,165 @@ func (Ctx *Context) PrimaryConsoleGetTty(domid uint32) (path string, err error) path = C.GoString(cpath) return } + +type Defbool string + +type KeyValueList []string + +type ckeyvaluelist struct { + clist C.libxl_key_value_list +} + +func (clist ckeyvaluelist) toGo(glist KeyValueList) { + return +} + +type DomainCreateInfo struct { + Type DomainType + Hap Defbool + Oos Defbool + ssidref uint32 + ssid_label string + name string + uuid Uuid + Xsdata KeyValueList + Platformdata KeyValueList + Poolid uint32 + PoolName string + RunHotplugScripts Defbool + Pvh Defbool + DriverDomain Defbool +} + +func (dci DomainCreateInfo) toC() (cci C.libxl_domain_create_info) { + + return +} + +type TscMode int + +const ( + TscModeDefault = TscMode(C.LIBXL_TSC_MODE_DEFAULT) + TscModeAlwaysEmulate = TscMode(C.LIBXL_TSC_MODE_ALWAYS_EMULATE) + TscModeNative = TscMode(C.LIBXL_TSC_MODE_NATIVE) + TscModeNativeParavirt = TscMode(C.LIBXL_TSC_MODE_NATIVE_PARAVIRT) +) + +func (tm TscMode) String() (str string) { + cstr := C.libxl_tsc_mode_to_string(C.libxl_tsc_mode(tm)) + str = C.GoString(cstr) + + return +} + +type CpuidPolicy struct { + //FIXME: Implement struct +} + +//FIXME Create toGo function for CpuidPolicy + +type DomainBuildInfo struct { + MaxVcpus int + AvailVcpus Bitmap + Cpumap Bitmap + Nodemap Bitmap + VcpuHardAffinity []Bitmap + VcpuSoftAffinity []Bitmap + NumaPlacement Defbool + TscMode TscMode + MaxMemkb MemKB + TargetMemkb MemKB + VideoMemkb MemKB + ShadowMemkb MemKB + RtcTimeoffset uint32 + ExecSsidref uint32 + ExecSsidLabel string + localTime Defbool + DisableMigrate Defbool + Cpuid []CpuidPolicy + blkdevStart string +} + +func (gdbi DomainBuildInfo) toC() (cdbi C.libxl_domain_build_info) { + return +} + +type DeviceNic struct { + //FIXME: complete struct +} + +func (gdn DeviceNic) toC() (cdn C.libxl_device_nic) { + return +} + +type DevicePci struct { + //FIXME: complete struct +} + +func (gdp DevicePci) toC() (cdp C.libxl_device_pci) { + return +} + +type DeviceRdm struct { + //FIXME: complete struct +} + +func (gdr DeviceRdm) toC() (cdr C.libxl_device_rdm) { + return +} + +type DeviceDtdev struct { + //FIXME: complete struct +} + +func (gdd DeviceDtdev) toC() (cdd C.libxl_device_dtdev) { + return +} + +type DeviceVfb struct { + //FIXME: complete struct +} + +func (gdv DeviceVfb) toC() (cdv C.libxl_device_vfb) { + return +} + +type DeviceVkb struct { + //FIXME: complete struct +} + +func (gdv DeviceVkb) toC() (cdv C.libxl_device_vkb) { + return +} + +type DeviceVtpm struct { + //FIXME: complete struct +} + +func (gdv DeviceVtpm) toC() (cdv C.libxl_device_vtpm) { + return +} + +type DeviceChannel struct { + //FIXME: complete struct +} + +func (gdc DeviceChannel) toC() (cdc C.libxl_device_channel) { + return +} + +type DeviceUsbctrl struct { + //FIXME: complete struct +} + +func (gdu DeviceUsbctrl) toC() (cdu C.libxl_device_usbctrl) { + return +} + +type DeviceUsbdev struct { + //FIXME: complete struct +} + +func (gdu DeviceUsbdev) toC() (cdu C.libxl_device_usbdev) { + return +} -- 2.7.3 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel