All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Joe Slater <joe.slater@windriver.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"MacLeod, Randy" <randy.macleod@windriver.com>
Subject: Re: [PATCH 1/1] os_find_datadir: search as in version 4.2
Date: Tue, 16 Jun 2020 10:19:54 +0100	[thread overview]
Message-ID: <CAFEAcA_ZU_w7PaYFVVaW1vzGySOLaNaThVcNQFNmd_GV-hG6Qw@mail.gmail.com> (raw)
In-Reply-To: <20200615225827.183062-1-joe.slater@windriver.com>

On Tue, 16 Jun 2020 at 00:00, Joe Slater <joe.slater@windriver.com> wrote:
>
> Always look for ../share/qemu then ../pc-bios when looking for datadir.

Could you provide some more context, please? Why is this
change useful; presumably we broke some setup in 5.0, but
what exactly ?

I'm guessing this might be a regression introduced by commit
6dd2dacedd83d12328 so I'm ccing the relevant people.

> Signed-off-by: Joe Slater <joe.slater@windriver.com>
> ---
>  os-posix.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/os-posix.c b/os-posix.c
> index 3cd52e1e70..f77da94bf6 100644
> --- a/os-posix.c
> +++ b/os-posix.c
> @@ -82,8 +82,9 @@ void os_setup_signal_handling(void)
>
>  /*
>   * Find a likely location for support files using the location of the binary.
> + * Typically, this would be "$bindir/../share/qemu".
>   * When running from the build tree this will be "$bindir/../pc-bios".
> - * Otherwise, this is CONFIG_QEMU_DATADIR.
> + * Otherwise, this is CONFIG_QEMU_DATADIR as constructed by configure.
>   */
>  char *os_find_datadir(void)
>  {
> @@ -93,6 +94,12 @@ char *os_find_datadir(void)
>      exec_dir = qemu_get_exec_dir();
>      g_return_val_if_fail(exec_dir != NULL, NULL);
>
> +    dir = g_build_filename(exec_dir, "..", "share", "qemu", NULL);
> +    if (g_file_test(dir, G_FILE_TEST_IS_DIR)) {
> +        return g_steal_pointer(&dir);
> +    }
> +    g_free(dir);  /* no autofree this time */
> +
>      dir = g_build_filename(exec_dir, "..", "pc-bios", NULL);
>      if (g_file_test(dir, G_FILE_TEST_IS_DIR)) {
>          return g_steal_pointer(&dir);
> --
> 2.17.1


  reply	other threads:[~2020-06-16  9:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 22:58 [PATCH 1/1] os_find_datadir: search as in version 4.2 Joe Slater
2020-06-16  9:19 ` Peter Maydell [this message]
2020-06-16 15:37   ` Slater, Joseph
2020-07-15 19:37   ` Peter Maydell
2020-07-15 19:57     ` Marc-André Lureau
2020-08-08  1:35       ` Brian Norris
2020-08-08 15:34         ` Peter Maydell
2020-08-10  7:29           ` Marc-André Lureau
2020-08-10 21:41             ` Brian Norris
2021-01-23  2:05               ` Brian Norris
2021-01-23 18:08                 ` Paolo Bonzini
2020-07-16 14:12 ` Marc-André Lureau
2020-08-10  7:33 ` Marc-André Lureau

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=CAFEAcA_ZU_w7PaYFVVaW1vzGySOLaNaThVcNQFNmd_GV-hG6Qw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=joe.slater@windriver.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=randy.macleod@windriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.