qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 2/2] semihosting: add --semihosting-config ar


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v4 2/2] semihosting: add --semihosting-config arg sub-argument
Date: Thu, 18 Jun 2015 13:29:40 +0100

On 16 June 2015 at 15:20, Leon Alrae <address@hidden> wrote:
> On 16/06/2015 15:03, Peter Maydell wrote:
>> On 16 June 2015 at 13:32, Liviu Ionescu <address@hidden> wrote:
>>> would it be possible to have all the semihosting patches ready for 2.4?
>>
>> Yes, I agree that would be good. Is it just this 2 patch
>> series, or are there others too?
>
> Just to confirm -- the only thing required before applying this 2 patch series
> is testing in ARM context by you, right?

That, and you need to respin it, because the qemu_opt_foreach API
has changed in current master.

Something like this is probably sufficient but you should check:

index 5edfa00..278cd6a 100644
--- a/vl.c
+++ b/vl.c
@@ -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, " ");
     }
 }
@@ -3727,7 +3729,7 @@ int main(int argc, char **argv, char **envp)
                     }
                     /* Set semihosting argument count and vector */
                     qemu_opt_foreach(opts, add_semihosting_arg,
-                                     &semihosting, 0);
+                                     &semihosting, NULL);
                 } else {
                     fprintf(stderr, "Unsupported semihosting-config %s\n",
                             optarg);


thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]