mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
option_parser: Support having "=" inside option values
This is particularly helpful as the cloud-init DMI serial number encoding scheme uses "=" and ";" for key value pairs. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
4a04d1f8f2
commit
6ccf037972
@ -77,7 +77,7 @@ impl OptionParser {
|
||||
}
|
||||
|
||||
for option in split_commas_outside_brackets(input)?.iter() {
|
||||
let parts: Vec<&str> = option.split('=').collect();
|
||||
let parts: Vec<&str> = option.splitn(2, '=').collect();
|
||||
|
||||
match self.options.get_mut(parts[0]) {
|
||||
None => return Err(OptionParserError::UnknownOption(parts[0].to_owned())),
|
||||
|
Loading…
Reference in New Issue
Block a user