qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Yoni Bettan <ybettan@redhat.com>, qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] vl.c && linux-user/main.c : removed **envp from main() arguments
Date: Mon, 18 Dec 2017 08:52:01 +0100	[thread overview]
Message-ID: <0843d1d9-e015-f4bd-3a98-92c0e3db5b42@vivier.eu> (raw)
In-Reply-To: <64af419e-b8b8-0a05-21f7-1029bc809079@redhat.com>

Le 18/12/2017 à 07:07, Yoni Bettan a écrit :
> 
> 
> On 11/21/2017 09:30 AM, Laurent Vivier wrote:
>> Le 21/11/2017 à 07:41, Yoni Bettan a écrit :
>>>          * it was added on 2008 902b3d5c392bb6f48ef340ad8ecc3311705d2800
>>>            when introduced cache-utils.[ch]
>>>          * since then cache-utils.[ch] were removed but **envp was left
>>>            behind
>>>
>>> Signed-off-by: Yoni Bettan <ybettan@redhat.com>
>>> ---
>>>   linux-user/main.c | 2 +-
>>>   vl.c              | 6 +++---
>>>   2 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/linux-user/main.c b/linux-user/main.c
>>> index aa02f25b85..ca5628c1ca 100644
>>> --- a/linux-user/main.c
>>> +++ b/linux-user/main.c
>>> @@ -4233,7 +4233,7 @@ static int parse_args(int argc, char **argv)
>>>       return optind;
>>>   }
>>>   -int main(int argc, char **argv, char **envp)
>>> +int main(int argc, char **argv)
>>>   {
>>>       struct target_pt_regs regs1, *regs = &regs1;
>>>       struct image_info info1, *info = &info1;
>>> diff --git a/vl.c b/vl.c
>>> index 1ad1c04637..9667756ccc 100644
>>> --- a/vl.c
>>> +++ b/vl.c
>>> @@ -35,10 +35,10 @@
>>>   #ifdef CONFIG_SDL
>>>   #if defined(__APPLE__) || defined(main)
>>>   #include <SDL.h>
>>> -int qemu_main(int argc, char **argv, char **envp);
>>> +int qemu_main(int argc, char **argv);
>>>   int main(int argc, char **argv)
>>>   {
>>> -    return qemu_main(argc, argv, NULL);
>>> +    return qemu_main(argc, argv);
>>>   }
>>>   #undef main
>>>   #define main qemu_main
>> I think this part can be removed now. As it seems it has been added
>> because of the envp parameter.
> 
> Thanks Laurent for your response and sorry for my late response.
> I think this part was added for another purpose as described here
> 880fec5d086
> 
> As i see it the env param was added in 2008 in order to support cache-utils
> as shown in 902b3d5c392bb6f48ef340ad8ecc3311705d2800 and in 2009
> another main function was added in order to unbreak SDL on Mac-OS X and
> the env param
> was added only for consistency I suppose...
> 
> What do you think?

I think we don't need it anymore as there is no difference betweent
qemu_main() and main().

Thanks,
Laurent

  reply	other threads:[~2017-12-18  7:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21  6:41 [Qemu-devel] [PATCH] vl.c && linux-user/main.c : removed **envp from main() arguments Yoni Bettan
2017-11-21  6:46 ` no-reply
2017-11-21  7:30 ` Laurent Vivier
2017-12-18  6:07   ` Yoni Bettan
2017-12-18  7:52     ` Laurent Vivier [this message]
2017-12-18 12:30       ` Peter Maydell
2017-12-18 14:07         ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0843d1d9-e015-f4bd-3a98-92c0e3db5b42@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=ybettan@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).