We don't need a pointer here, just the status value.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-static void boot_process(void *ctx, int *status)
+static void boot_process(void *ctx, int status __attribute__((unused)))
{
struct boot_task *task = ctx;
unsigned int clean_image = 0;
{
struct boot_task *task = ctx;
unsigned int clean_image = 0;
goto no_load;
} else {
task->state = BOOT_STATE_IMAGE_LOADING;
goto no_load;
} else {
task->state = BOOT_STATE_IMAGE_LOADING;
goto no_load;
} else {
task->state = BOOT_STATE_INITRD_LOADING;
goto no_load;
} else {
task->state = BOOT_STATE_INITRD_LOADING;
goto no_load;
} else {
task->state = BOOT_STATE_FINISH;
goto no_load;
} else {
task->state = BOOT_STATE_FINISH;
if (task->state != BOOT_STATE_FINISH) {
task->state = BOOT_STATE_UNKNOWN;
if (task->state != BOOT_STATE_FINISH) {
task->state = BOOT_STATE_UNKNOWN;
}
int boot(void *ctx, struct discover_boot_option *opt, struct boot_command *cmd,
}
int boot(void *ctx, struct discover_boot_option *opt, struct boot_command *cmd,
struct boot_task *boot_task;
struct pb_url *image = NULL;
const char *boot_desc;
struct boot_task *boot_task;
struct pb_url *image = NULL;
const char *boot_desc;
if (opt && opt->option->name)
boot_desc = opt->option->name;
if (opt && opt->option->name)
boot_desc = opt->option->name;
boot_task->args = NULL;
}
boot_task->args = NULL;
}
- boot_process(boot_task, &result);
+ boot_process(boot_task, 0);
struct load_url_async_data {
load_url_callback url_cb;
void *ctx;
struct load_url_async_data {
load_url_callback url_cb;
void *ctx;
};
const char *mount_base(void)
};
const char *mount_base(void)
pb_log("The download client '%s' [pid %d] exited, rc %d\n",
process->path, process->pid, process->exit_status);
pb_log("The download client '%s' [pid %d] exited, rc %d\n",
process->path, process->pid, process->exit_status);
- if (!url_data->status)
- url_data->url_cb(url_data->ctx, &(url_data->status));
+ url_data->url_cb(url_data->ctx, process->exit_status);
process_release(process);
}
process_release(process);
}
url_data = talloc_zero(ctx, struct load_url_async_data);
url_data->url_cb = url_cb;
url_data->ctx = ctx;
url_data = talloc_zero(ctx, struct load_url_async_data);
url_data->url_cb = url_cb;
url_data->ctx = ctx;
*/
const char *mount_base(void);
*/
const char *mount_base(void);
-typedef void (*load_url_callback)(void *data, int *status);
+typedef void (*load_url_callback)(void *data, int status);
/* Load a (potentially remote) file, and return a guaranteed-local name */
char *load_url_async(void *ctx, struct pb_url *url, unsigned int *tempfile,
/* Load a (potentially remote) file, and return a guaranteed-local name */
char *load_url_async(void *ctx, struct pb_url *url, unsigned int *tempfile,