qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: libqemuutil
Date: Tue, 16 Mar 2021 10:28:43 +0100	[thread overview]
Message-ID: <d0c5aa88-029e-4328-7a53-482a3010c5f8@redhat.com> (raw)
In-Reply-To: <87zgz38o0v.fsf@dusky.pond.sub.org>

On 16/03/21 10:07, Markus Armbruster wrote:
> I suspect the linker happens to pick the one that makes things work,
> until something in my patch makes it pick the other one.

Ouch.  Fortunately the stub is unnecessary and can be removed.

----------- 8< ------------
 From fe45350cc11434efe3461c540bb0f258bbe010f7 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Tue, 16 Mar 2021 05:25:48 -0400
Subject: [PATCH] qemuutil: remove qemu_set_fd_handler duplicate symbol

libqemuutil has two definitions of qemu_set_fd_handler.  This
is not needed since the only users of the function are
qemu-io.c and the emulators, both of which already include
util/main-loop.c.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

diff --git a/stubs/meson.build b/stubs/meson.build
index a054d5877f..8a3e804cf0 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -34,7 +34,6 @@ stub_ss.add(files('ram-block.c'))
  stub_ss.add(files('ramfb.c'))
  stub_ss.add(files('replay.c'))
  stub_ss.add(files('runstate-check.c'))
-stub_ss.add(files('set-fd-handler.c'))
  stub_ss.add(files('sysbus.c'))
  stub_ss.add(files('target-get-monitor-def.c'))
  stub_ss.add(files('target-monitor-defs.c'))
diff --git a/stubs/set-fd-handler.c b/stubs/set-fd-handler.c
deleted file mode 100644
index bff7e0a45a..0000000000
--- a/stubs/set-fd-handler.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "qemu/osdep.h"
-#include "qemu/main-loop.h"
-
-void qemu_set_fd_handler(int fd,
-                         IOHandler *fd_read,
-                         IOHandler *fd_write,
-                         void *opaque)
-{
-    abort();
-}

> Is qemu_set_fd_handler() the only one?  Nope:
> 
>      $ nm --defined-only bld-x86/libqemuutil.a | awk '/ T / { print $NF }' | sort | uniq -c | grep -v '^ *1 '
>            2 qemu_set_fd_handler
>            2 yank_generic_iochannel
>            2 yank_register_function
>            2 yank_register_instance
>            2 yank_unregister_function
>            2 yank_unregister_instance
> 
> I didn't run into this issue when I posted my series last Friday.  The
> issue now blocks its merge, and today is the soft freeze.  Help!

For yank_*, I suggest moving the non-stub version to monitor/ and adding 
it to the qmp_ss sourceset.

Paolo



  parent reply	other threads:[~2021-03-16  9:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16  9:07 libqemuutil Markus Armbruster
2021-03-16  9:24 ` libqemuutil Thomas Huth
2021-03-16  9:41   ` libqemuutil Paolo Bonzini
2021-03-16  9:28 ` Paolo Bonzini [this message]
2021-03-16 10:09   ` libqemuutil Markus Armbruster
2021-03-16 10:15     ` libqemuutil Paolo Bonzini

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=d0c5aa88-029e-4328-7a53-482a3010c5f8@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).