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>
This commit is contained in:
Robin Murphy
2014-01-06 17:38:36 +00:00
committed by Will Deacon
parent d06bc640e5
commit dfb8fd674f
+9
View File
@@ -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, \