qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Corey Bryant <coreyb@linux.vnet.ibm.com>
Cc: stefanb@linux.vnet.ibm.com, qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] QMP: Remove duplicate TPM type from query-tpm
Date: Thu, 21 Mar 2013 08:25:43 -0400	[thread overview]
Message-ID: <20130321082543.7b606e68@doriath> (raw)
In-Reply-To: <1363797289-5865-1-git-send-email-coreyb@linux.vnet.ibm.com>

On Wed, 20 Mar 2013 12:34:48 -0400
Corey Bryant <coreyb@linux.vnet.ibm.com> wrote:

> 
> Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>

Applied both patches to the qmp branch 'passthough' typo fix as
spotted by Markus.

Thanks.

> ---
>  hmp.c            |    8 ++++----
>  qapi-schema.json |   12 ++++--------
>  tpm/tpm.c        |    9 ++++-----
>  3 files changed, 12 insertions(+), 17 deletions(-)
> 
> diff --git a/hmp.c b/hmp.c
> index b0a861c..d319897 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -631,11 +631,11 @@ void hmp_info_tpm(Monitor *mon, const QDict *qdict)
>                         c, TpmModel_lookup[ti->model]);
>  
>          monitor_printf(mon, "  \\ %s: type=%s",
> -                       ti->id, TpmType_lookup[ti->type]);
> +                       ti->id, TpmTypeOptionsKind_lookup[ti->options->kind]);
>  
> -        switch (ti->tpm_options->kind) {
> -        case TPM_TYPE_OPTIONS_KIND_TPM_PASSTHROUGH_OPTIONS:
> -            tpo = ti->tpm_options->tpm_passthrough_options;
> +        switch (ti->options->kind) {
> +        case TPM_TYPE_OPTIONS_KIND_PASSTHROUGH:
> +            tpo = ti->options->passthrough;
>              monitor_printf(mon, "%s%s%s%s",
>                             tpo->has_path ? ",path=" : "",
>                             tpo->has_path ? tpo->path : "",
> diff --git a/qapi-schema.json b/qapi-schema.json
> index fdaa9da..5505bbf 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -3403,13 +3403,12 @@
>  #
>  # A union referencing different TPM backend types' configuration options
>  #
> -# @tpm-passthough-options: TPMPassthroughOptions describing the TPM
> -#                          passthrough configuration options
> +# @passthough: The configuration options for the TPM passthrough type
>  #
>  # Since: 1.5
>  ##
>  { 'union': 'TpmTypeOptions',
> -   'data': { 'tpm-passthrough-options' : 'TPMPassthroughOptions' } }
> +   'data': { 'passthrough' : 'TPMPassthroughOptions' } }
>  
>  ##
>  # @TpmInfo:
> @@ -3420,17 +3419,14 @@
>  #
>  # @model: The TPM frontend model
>  #
> -# @type: The TPM (backend) type being used
> -#
> -# @tpm-options: The TPM (backend) type configuration options
> +# @options: The TPM (backend) type configuration options
>  #
>  # Since: 1.5
>  ##
>  { 'type': 'TPMInfo',
>    'data': {'id': 'str',
>             'model': 'TpmModel',
> -           'type': 'TpmType',
> -           'tpm-options': 'TpmTypeOptions' } }
> +           'options': 'TpmTypeOptions' } }
>  
>  ##
>  # @query-tpm:
> diff --git a/tpm/tpm.c b/tpm/tpm.c
> index ffd2495..ae00eae 100644
> --- a/tpm/tpm.c
> +++ b/tpm/tpm.c
> @@ -257,14 +257,13 @@ static TPMInfo *qmp_query_tpm_inst(TPMBackend *drv)
>  
>      res->id = g_strdup(drv->id);
>      res->model = drv->fe_model;
> -    res->type = drv->ops->type;
> -    res->tpm_options = g_new0(TpmTypeOptions, 1);
> +    res->options = g_new0(TpmTypeOptions, 1);
>  
> -    switch (res->type) {
> +    switch (drv->ops->type) {
>      case TPM_TYPE_PASSTHROUGH:
> -        res->tpm_options->kind = TPM_TYPE_OPTIONS_KIND_TPM_PASSTHROUGH_OPTIONS;
> +        res->options->kind = TPM_TYPE_OPTIONS_KIND_PASSTHROUGH;
>          tpo = g_new0(TPMPassthroughOptions, 1);
> -        res->tpm_options->tpm_passthrough_options = tpo;
> +        res->options->passthrough = tpo;
>          if (drv->path) {
>              tpo->path = g_strdup(drv->path);
>              tpo->has_path = true;

      parent reply	other threads:[~2013-03-21 12:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 16:34 [Qemu-devel] [PATCH 1/2] QMP: Remove duplicate TPM type from query-tpm Corey Bryant
2013-03-20 16:34 ` [Qemu-devel] [PATCH 2/2] QMP: TPM QMP and man page documentation updates Corey Bryant
2013-03-20 21:39   ` Eric Blake
2013-03-21  7:21   ` Markus Armbruster
2013-03-20 21:37 ` [Qemu-devel] [PATCH 1/2] QMP: Remove duplicate TPM type from query-tpm Eric Blake
2013-03-21  7:19 ` Markus Armbruster
2013-03-21 12:25 ` Luiz Capitulino [this message]

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=20130321082543.7b606e68@doriath \
    --to=lcapitulino@redhat.com \
    --cc=armbru@redhat.com \
    --cc=coreyb@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.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).