xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Don Slutz <dslutz@verizon.com>,
	xen-devel@lists.xen.org
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [RFC][PATCH v1 1/3] Add xen-hvm-param
Date: Tue, 02 Sep 2014 11:11:50 -0400	[thread overview]
Message-ID: <5405DE36.3090802@terremark.com> (raw)
In-Reply-To: <5405BC55.3030607@citrix.com>

On 09/02/14 08:47, Andrew Cooper wrote:
> On 02/09/14 13:07, Don Slutz wrote:
>> A tool to get and set hvm param.
>>
>> Signed-off-by: Don Slutz <dslutz@verizon.com>
>> ---
...
>> +    snprintf(hvm_param_name[HVM_PARAM_VMPORT_BUILD_NUMBER_VALUE],
>> +             sizeof(hvm_param_name[HVM_PARAM_VMPORT_BUILD_NUMBER_VALUE]),
>> +             "Vmport_Build_Number_Value");
>> +    snprintf(hvm_param_name[HVM_PARAM_VMPORT_RESET_TIME],
>> +             sizeof(hvm_param_name[HVM_PARAM_VMPORT_RESET_TIME]), "Vmport_Reset_Time");
> Surely all these snprintfs can be replaced with some compiler magic, to
> vastly reduce its complexity.
>
> static const char * hvm_param_names[] =
> {
>      "Callback_Irq",
>      "Store_Pfn",
>      ...
> };
>
> static const char *hvm_param_name(unsigned int param)
> {
>       return param < ARRAY_SIZE(hvm_param_names) ? hvm_param_names[param]
> : "Unknown";
> }

There might be. I just went with the fastest way to do this (an emacs 
macro...)


>
> It might also be nice to have a "dump all" option.

Yes.  How about if only domain id specified, all are dumpped?

     -Don Slutz

> ~Andrew
>
>

  reply	other threads:[~2014-09-02 15:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 12:07 [RFC][PATCH v1 0/3] Optional unit test tools for VMware tools support Don Slutz
2014-09-02 12:07 ` [RFC][PATCH v1 1/3] Add xen-hvm-param Don Slutz
2014-09-02 12:47   ` Andrew Cooper
2014-09-02 15:11     ` Don Slutz [this message]
2014-09-02 12:07 ` [RFC][PATCH v1 2/3] Add xen-vmware-guestinfo Don Slutz
2014-09-02 12:07 ` [RFC][PATCH v1 3/3] Add xen-list-vmware-guestinfo Don Slutz

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=5405DE36.3090802@terremark.com \
    --to=dslutz@verizon.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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).