diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2012-05-29 10:31:39 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2012-05-29 10:31:39 +0100 |
commit | e9f8b0e530baaecc626ba912bfa98897d3cfb1dd (patch) | |
tree | 0780af117b6cc658706dd16e9b32d75258c5c8b9 | |
parent | 731a050623bd2a10a4d48176da3a79fb549d8114 (diff) | |
download | xen-e9f8b0e530baaecc626ba912bfa98897d3cfb1dd.tar.gz xen-e9f8b0e530baaecc626ba912bfa98897d3cfb1dd.tar.bz2 xen-e9f8b0e530baaecc626ba912bfa98897d3cfb1dd.zip |
xl: remove all local "ctx" variables
xl has a global "ctx" variable, so there should be no need to pass a
ctx to any function.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ ijc -- dropped xl_fork hunks on commit, this aspect was already done in
xl: track child processes for the benefit of libxl ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
-rw-r--r-- | tools/libxl/xl_cmdimpl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 8c8d02b7b7..eb1a9a0bf3 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -1299,7 +1299,7 @@ skip_vfb: xlu_cfg_destroy(config); } -static void reload_domain_config(libxl_ctx *ctx, uint32_t domid, +static void reload_domain_config(uint32_t domid, uint8_t **config_data, int *config_len) { uint8_t *t_data; @@ -1319,7 +1319,7 @@ static void reload_domain_config(libxl_ctx *ctx, uint32_t domid, /* Returns 1 if domain should be restarted, * 2 if domain should be renamed then restarted, or 0 */ -static int handle_domain_death(libxl_ctx *ctx, uint32_t domid, +static int handle_domain_death(uint32_t domid, libxl_event *event, uint8_t **config_data, int *config_len, libxl_domain_config *d_config) @@ -1378,12 +1378,12 @@ static int handle_domain_death(libxl_ctx *ctx, uint32_t domid, break; case LIBXL_ACTION_ON_SHUTDOWN_RESTART_RENAME: - reload_domain_config(ctx, domid, config_data, config_len); + reload_domain_config(domid, config_data, config_len); restart = 2; break; case LIBXL_ACTION_ON_SHUTDOWN_RESTART: - reload_domain_config(ctx, domid, config_data, config_len); + reload_domain_config(domid, config_data, config_len); restart = 1; /* fall-through */ @@ -1419,7 +1419,7 @@ static void replace_string(char **str, const char *val) } -static int preserve_domain(libxl_ctx *ctx, uint32_t domid, libxl_event *event, +static int preserve_domain(uint32_t domid, libxl_event *event, libxl_domain_config *d_config) { time_t now; @@ -1902,11 +1902,11 @@ start: LOG("Domain %d has shut down, reason code %d 0x%x", domid, event->u.domain_shutdown.shutdown_reason, event->u.domain_shutdown.shutdown_reason); - switch (handle_domain_death(ctx, domid, event, + switch (handle_domain_death(domid, event, (uint8_t **)&config_data, &config_len, &d_config)) { case 2: - if (!preserve_domain(ctx, domid, event, &d_config)) { + if (!preserve_domain(domid, event, &d_config)) { /* If we fail then exit leaving the old domain in place. */ ret = -1; goto out; |