]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools/golang: Add missing golang bindings for vlan
authorHenry Wang <xin.wang2@amd.com>
Mon, 20 May 2024 08:21:45 +0000 (16:21 +0800)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 20 May 2024 13:29:44 +0000 (14:29 +0100)
It is noticed that commit:
3bc14e4fa4b9 ("tools/libs/light: Add vlan field to libxl_device_nic")
introduces a new "vlan" string field to libxl_device_nic. But the
golang bindings are missing. Add it in this patch.

Fixes: 3bc14e4fa4b9 ("tools/libs/light: Add vlan field to libxl_device_nic")
Signed-off-by: Henry Wang <xin.wang2@amd.com>
Acked-by: George Dunlap <george.dunlap@cloud.com>
tools/golang/xenlight/helpers.gen.go
tools/golang/xenlight/types.gen.go

index 78bdb08b159d7461703ec90ed71a968554385978..b9cb5b33c77360cea898c675fc6c13142c19bb09 100644 (file)
@@ -1963,6 +1963,7 @@ func (x *DeviceNic) fromC(xc *C.libxl_device_nic) error {
 x.BackendDomname = C.GoString(xc.backend_domname)
 x.Devid = Devid(xc.devid)
 x.Mtu = int(xc.mtu)
+x.Vlan = C.GoString(xc.vlan)
 x.Model = C.GoString(xc.model)
 if err := x.Mac.fromC(&xc.mac);err != nil {
 return fmt.Errorf("converting field Mac: %v", err)
@@ -2040,6 +2041,8 @@ if x.BackendDomname != "" {
 xc.backend_domname = C.CString(x.BackendDomname)}
 xc.devid = C.libxl_devid(x.Devid)
 xc.mtu = C.int(x.Mtu)
+if x.Vlan != "" {
+xc.vlan = C.CString(x.Vlan)}
 if x.Model != "" {
 xc.model = C.CString(x.Model)}
 if err := x.Mac.toC(&xc.mac); err != nil {
index ccfe18019e3ace15a38dace6fc1fdf39ed60b140..5b293755d781e661383cef539750cef4ed9c96f8 100644 (file)
@@ -756,6 +756,7 @@ BackendDomid Domid
 BackendDomname string
 Devid Devid
 Mtu int
+Vlan string
 Model string
 Mac Mac
 Ip string