* Jagannathan Raman (jag.ra...@oracle.com) wrote: > From: Elena Ufimtseva <elena.ufimts...@oracle.com> > > Signed-off-by: Elena Ufimtseva <elena.ufimts...@oracle.com> > Signed-off-by: Jagannathan Raman <jag.ra...@oracle.com> > Signed-off-by: John G Johnson <john.g.john...@oracle.com> > --- > 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 / dgilb...@redhat.com / Manchester, UK