diff options
author | Robin Murphy <Robin.Murphy@arm.com> | 2014-01-06 17:38:36 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-06-01 16:39:54 +0100 |
commit | dfb8fd674f5fba45932df92b2045a42d291477d8 (patch) | |
tree | 57018fb27439424bb8ddee33f4eda0eea078a503 | |
parent | d06bc640e568ec33bf06f40b62f7d0ac6ce102da (diff) | |
download | kvmtool-dfb8fd674f5fba45932df92b2045a42d291477d8.tar.gz |
kvm tools: support unsigned int options
Add support for unsigned int command-line options by implementing the
OPT_UINTEGER macro.
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | include/kvm/parse-options.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/kvm/parse-options.h b/include/kvm/parse-options.h index 09a5fca7..b03f1512 100644 --- a/include/kvm/parse-options.h +++ b/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, \ |