Mailing List Archive

[RESEND PATCH 09/12] golang/xenlight: add DomainDestroy wrapper
Add a wrapper around libxl_domain_destroy.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
---
tools/golang/xenlight/xenlight.go | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/tools/golang/xenlight/xenlight.go b/tools/golang/xenlight/xenlight.go
index 65f93abe32..1e0ed109e4 100644
--- a/tools/golang/xenlight/xenlight.go
+++ b/tools/golang/xenlight/xenlight.go
@@ -1357,3 +1357,13 @@ func (ctx *Context) DomainCreateNew(config *DomainConfig) (Domid, error) {

return Domid(cdomid), nil
}
+
+// DomainDestroy destroys a domain given a domid.
+func (ctx *Context) DomainDestroy(domid Domid) error {
+ ret := C.libxl_domain_destroy(ctx.ctx, C.uint32_t(domid), nil)
+ if ret != 0 {
+ return Error(ret)
+ }
+
+ return nil
+}
--
2.17.1
Re: [RESEND PATCH 09/12] golang/xenlight: add DomainDestroy wrapper [ In reply to ]
> On May 24, 2021, at 9:36 PM, Nick Rosbrook <rosbrookn@gmail.com> wrote:
>
> Add a wrapper around libxl_domain_destroy.
>
> Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>

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