@@ -1292,7 +1292,9 @@ const char *semihosting_get_cmdline(void)
return semihosting.cmdline;
}
-static int add_semihosting_arg(const char *name, const char *val, void *opaque)
+static int add_semihosting_arg(void *opaque,
+ const char *name, const char *val,
+ Error **errp)
{
SemihostingConfig *s = opaque;
if (strcmp(name, "arg") == 0) {
@@ -1311,12 +1313,12 @@ static inline void
semihosting_arg_fallback(const char *file, const char *cmd)
char *cmd_token;
/* argv[0] */
- add_semihosting_arg("arg", file, &semihosting);
+ add_semihosting_arg(&semihosting, "arg", file, NULL);
/* split -append and initialize argv[1..n] */
cmd_token = strtok(g_strdup(cmd), " ");
while (cmd_token) {
- add_semihosting_arg("arg", cmd_token, &semihosting);
+ add_semihosting_arg(&semihosting, "arg", cmd_token, NULL);
cmd_token = strtok(NULL, " ");
}