linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robin.murphy@arm.com (Robin Murphy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] kvmtool: Support unsigned int options
Date: Tue, 17 Dec 2013 18:31:13 +0000	[thread overview]
Message-ID: <1387305074-29421-2-git-send-email-robin.murphy@arm.com> (raw)
In-Reply-To: <1387305074-29421-1-git-send-email-robin.murphy@arm.com>

Add support for unsigned int command-line options by implementing the
OPT_UINTEGER macro.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
---
 tools/kvm/include/kvm/parse-options.h |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/kvm/include/kvm/parse-options.h b/tools/kvm/include/kvm/parse-options.h
index 09a5fca..b03f151 100644
--- a/tools/kvm/include/kvm/parse-options.h
+++ b/tools/kvm/include/kvm/parse-options.h
@@ -109,6 +109,15 @@ struct option {
 	.help = (h)                         \
 }
 
+#define OPT_UINTEGER(s, l, v, h)            \
+{                                           \
+	.type = OPTION_UINTEGER,            \
+	.short_name = (s),                  \
+	.long_name = (l),                   \
+	.value = check_vtype(v, unsigned int *), \
+	.help = (h)                         \
+}
+
 #define OPT_U64(s, l, v, h)                 \
 {                                           \
 	.type = OPTION_U64,                 \
-- 
1.7.9.5

  reply	other threads:[~2013-12-17 18:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 18:31 [PATCH 0/2] kvmtool: Enable overriding Generic Timer frequency Robin Murphy
2013-12-17 18:31 ` Robin Murphy [this message]
2013-12-17 18:31 ` [PATCH 2/2] kvmtool/arm: Add option to override " Robin Murphy
2013-12-17 20:39   ` Alexander Graf
2013-12-18 13:44     ` Robin Murphy
2013-12-18 14:07       ` Alexander Graf
2013-12-18 16:11         ` Robin Murphy

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=1387305074-29421-2-git-send-email-robin.murphy@arm.com \
    --to=robin.murphy@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).