summaryrefslogtreecommitdiffstats
path: root/discover/boot.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-09-24 10:39:03 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-09-25 14:56:56 +0800
commitb3d241164a7e34eed56159f4e0a8a2821b7ebf4d (patch)
tree0f83a7f7f85d6ec799e6d279d8ebd4d58caac93b /discover/boot.c
parent4844eaae93e9e32708f02f7e5a43edcc87435699 (diff)
downloadtalos-petitboot-b3d241164a7e34eed56159f4e0a8a2821b7ebf4d.tar.gz
talos-petitboot-b3d241164a7e34eed56159f4e0a8a2821b7ebf4d.zip
discover: load_url_async callback should take an int status
We don't need a pointer here, just the status value. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/boot.c')
-rw-r--r--discover/boot.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/discover/boot.c b/discover/boot.c
index a1e20e6..18bca58 100644
--- a/discover/boot.c
+++ b/discover/boot.c
@@ -287,7 +287,7 @@ static void run_boot_hooks(struct boot_task *task)
free(hooks);
}
-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;
@@ -307,7 +307,6 @@ static void boot_process(void *ctx, int *status)
goto no_load;
} else {
task->state = BOOT_STATE_IMAGE_LOADING;
- *status = 0;
return;
}
}
@@ -325,7 +324,6 @@ static void boot_process(void *ctx, int *status)
goto no_load;
} else {
task->state = BOOT_STATE_INITRD_LOADING;
- *status = 0;
return;
}
} else {
@@ -347,7 +345,6 @@ static void boot_process(void *ctx, int *status)
goto no_load;
} else {
task->state = BOOT_STATE_FINISH;
- *status = 0;
return;
}
} else {
@@ -357,7 +354,6 @@ static void boot_process(void *ctx, int *status)
if (task->state != BOOT_STATE_FINISH) {
task->state = BOOT_STATE_UNKNOWN;
- *status = -1;
return;
}
@@ -396,8 +392,6 @@ no_load:
}
talloc_free(task);
-
- *status = result;
}
int boot(void *ctx, struct discover_boot_option *opt, struct boot_command *cmd,
@@ -406,7 +400,6 @@ 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;
- int result;
if (opt && opt->option->name)
boot_desc = opt->option->name;
@@ -457,7 +450,7 @@ int boot(void *ctx, struct discover_boot_option *opt, struct boot_command *cmd,
boot_task->args = NULL;
}
- boot_process(boot_task, &result);
+ boot_process(boot_task, 0);
- return result;
+ return 0;
}
OpenPOWER on IntegriCloud