mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
option_parser: Fix inner bracket support with list of integers
Give the option parser the ability to handle tuples with inner brackets containing list of integers. The following example can now be handled correctly "option=[key@[v1-v2,v3,v4]]" which means the option is assigned a tuple with a key associated with a list of integers between the range v1 - v2, as well as v3 and v4. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
be79a80361
commit
a4f5ad6076
@@ -1942,7 +1942,7 @@ impl NumaConfig {
|
||||
.map_err(Error::ParseNuma)?
|
||||
.map(|v| v.0.iter().map(|e| *e as u8).collect());
|
||||
let distances = parser
|
||||
.convert::<Tuple<u64>>("distances")
|
||||
.convert::<Tuple<u64, u64>>("distances")
|
||||
.map_err(Error::ParseNuma)?
|
||||
.map(|v| {
|
||||
v.0.iter()
|
||||
|
||||
Reference in New Issue
Block a user