[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 14/50] mutli-process: build remote command line args
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [PATCH v5 14/50] mutli-process: build remote command line args |
Date: |
Wed, 4 Mar 2020 10:09:32 +0000 |
User-agent: |
Mutt/1.13.3 (2020-01-12) |
* Jagannathan Raman (address@hidden) wrote:
> From: Elena Ufimtseva <address@hidden>
>
> Signed-off-by: Elena Ufimtseva <address@hidden>
> Signed-off-by: Jagannathan Raman <address@hidden>
> Signed-off-by: John G Johnson <address@hidden>
> ---
> v4 -> v5:
> - Added "exec" suboption to get the executable's name
> - Addressed feedback about variable names
> - Removed redundant check for spawning a process
>
> hw/proxy/qemu-proxy.c | 68
> +++++++++++++++++++++++++++++++++----------
> include/hw/proxy/qemu-proxy.h | 2 +-
> 2 files changed, 54 insertions(+), 16 deletions(-)
>
> diff --git a/hw/proxy/qemu-proxy.c b/hw/proxy/qemu-proxy.c
> index 828bbd7..d792e86 100644
> --- a/hw/proxy/qemu-proxy.c
> +++ b/hw/proxy/qemu-proxy.c
> @@ -19,19 +19,50 @@
>
> static void pci_proxy_dev_realize(PCIDevice *dev, Error **errp);
>
> +static int add_argv(char *opts_str, char **argv, int argc)
> +{
> + int max_args = 64;
...
> +
> +static int make_argv(char *opts_str, char **argv, int argc)
> +{
> + int max_args = 64;
.....
> +
> static int remote_spawn(PCIProxyDev *pdev, const char *opts,
> const char *exec_name, Error **errp)
> {
> - char *args[3];
> pid_t rpid;
> int fd[2] = {-1, -1};
> Error *local_error = NULL;
> + char *argv[64];
Magic '64' in a lot of places; that should be one constant somewhere
(if it's actually needed).
Dave
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- Re: [PATCH v5 14/50] mutli-process: build remote command line args, Philippe Mathieu-Daudé, 2020/03/02
- Re: [PATCH v5 14/50] mutli-process: build remote command line args, Daniel P . Berrangé, 2020/03/02
- Re: [PATCH v5 14/50] mutli-process: build remote command line args, Elena Ufimtseva, 2020/03/02
- Re: [PATCH v5 14/50] mutli-process: build remote command line args, Daniel P . Berrangé, 2020/03/04
- Re: [PATCH v5 14/50] mutli-process: build remote command line args, Elena Ufimtseva, 2020/03/04
- Re: [PATCH v5 14/50] mutli-process: build remote command line args, Daniel P . Berrangé, 2020/03/04
- Re: [PATCH v5 14/50] mutli-process: build remote command line args, Elena Ufimtseva, 2020/03/04
- Re: [PATCH v5 14/50] mutli-process: build remote command line args, Daniel P . Berrangé, 2020/03/05
- Re: [PATCH v5 14/50] mutli-process: build remote command line args, Stefan Hajnoczi, 2020/03/06
- Re: [PATCH v5 14/50] mutli-process: build remote command line args,
Dr. David Alan Gilbert <=