qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Andrew Fasano <fasano@mit.edu>
Cc: qemu-devel@nongnu.org, elysia.witham@ll.mit.edu,
	erdnaxe@crans.org, ma.mandourr@gmail.com
Subject: Re: [PATCH 3/8] plugins: add id_to_plugin_name
Date: Thu, 09 Mar 2023 14:45:51 +0000	[thread overview]
Message-ID: <87r0tym18x.fsf@linaro.org> (raw)
In-Reply-To: <20221213213757.4123265-4-fasano@mit.edu>


Andrew Fasano <fasano@mit.edu> writes:

> From: Elysia Witham <elysia.witham@ll.mit.edu>
>
> Plugins will pass their unique id when creating callbacks to
> ensure they are associated with the correct plugin. This
> internal function resolves those ids to the declared names.
>
> Signed-off-by: Elysia Witham <elysia.witham@ll.mit.edu>
> Signed-off-by: Andrew Fasano <fasano@mit.edu>
> ---
>  plugins/core.c   | 12 ++++++++++++
>  plugins/plugin.h |  2 ++
>  2 files changed, 14 insertions(+)
>
> diff --git a/plugins/core.c b/plugins/core.c
> index 5fbdcb5768..6a50b4a6e6 100644
> --- a/plugins/core.c
> +++ b/plugins/core.c
> @@ -248,6 +248,18 @@ int name_to_plugin_version(const char *name)
>      return -1;
>  }
>  
> +const char *id_to_plugin_name(qemu_plugin_id_t id)
> +{
> +    const char *plugin = plugin_id_to_ctx_locked(id)->name;
> +    if (plugin) {
> +        return plugin;
> +    } else {
> +        warn_report("Unnamed plugin cannot use QPP, not supported in plugin "
> +                    "version. Please update plugin.");
> +        return NULL;
> +    }
> +}
> +

I don't see this function being used in this series.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2023-03-09 14:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 21:37 [PATCH 0/8] Inter-plugin interactions with QPP Andrew Fasano
2022-12-13 21:37 ` [PATCH 1/8] docs/devel: describe QPP API Andrew Fasano
2023-03-09 14:15   ` Alex Bennée
2022-12-13 21:37 ` [PATCH 2/8] plugins: version 2, require unique plugin names Andrew Fasano
2023-03-09 14:17   ` Alex Bennée
2022-12-13 21:37 ` [PATCH 3/8] plugins: add id_to_plugin_name Andrew Fasano
2023-03-09 14:45   ` Alex Bennée [this message]
2022-12-13 21:37 ` [PATCH 4/8] plugins: add core API functions for QPP callbacks Andrew Fasano
2023-03-09 16:09   ` Alex Bennée
2022-12-13 21:37 ` [PATCH 5/8] plugins: implement " Andrew Fasano
2023-03-09 16:17   ` Alex Bennée
2022-12-13 21:37 ` [PATCH 6/8] plugins: implement QPP import function Andrew Fasano
2023-03-09 16:26   ` Alex Bennée
2022-12-13 21:37 ` [PATCH 7/8] include/qemu: added macro for " Andrew Fasano
2022-12-13 21:37 ` [PATCH 8/8] tests: build and run QPP tests Andrew Fasano
2023-03-09 16:37   ` Alex Bennée

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=87r0tym18x.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=elysia.witham@ll.mit.edu \
    --cc=erdnaxe@crans.org \
    --cc=fasano@mit.edu \
    --cc=ma.mandourr@gmail.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).