@@ -669,6 +669,21 @@ int libxl_set_parameters(libxl_ctx *ctx, char *params)
return 0;
}
+int libxl_get_parameters(libxl_ctx *ctx, char *params, char *values)
+{
+ int ret;
+ GC_INIT(ctx);
+
+ ret = xc_get_parameters(ctx->xch, params, values);
+ if (ret < 0) {
+ LOGEV(ERROR, ret, "getting parameters");
+ GC_FREE;
+ return ret;//ERROR_FAIL;
+ }
+ GC_FREE;
+ return 0;
+}
+
static int fd_set_flags(libxl_ctx *ctx, int fd,
int fcntlgetop, int fcntlsetop, const char *fl,
int flagmask, int set_p)
@@ -2307,6 +2307,7 @@ int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid,
int libxl_send_sysrq(libxl_ctx *ctx, uint32_t domid, char sysrq);
int libxl_send_debug_keys(libxl_ctx *ctx, char *keys);
int libxl_set_parameters(libxl_ctx *ctx, char *params);
+int libxl_get_parameters(libxl_ctx *ctx, char *params, char *values);
typedef struct libxl__xen_console_reader libxl_xen_console_reader;
Add a new libxl function to get hypervisor parameters at runtime. Signed-off-by: Vasilis Liaskovitis <vliaskovitis@suse.com> --- tools/libxl/libxl.c | 15 +++++++++++++++ tools/libxl/libxl.h | 1 + 2 files changed, 16 insertions(+)