disks/zpool_list: allow some more characters for pool list

not exhaustive of what zfs allows (space is missing), but this
can be done easily without problems

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-07-08 14:59:17 +02:00 committed by Dietmar Maurer
parent c3a4b5e2e1
commit 4f9096a211

View File

@ -64,7 +64,7 @@ fn parse_zpool_list_header(i: &str) -> IResult<&str, ZFSPoolInfo> {
let (i, (text, size, alloc, free, _, _,
frag, _, dedup, health,
_altroot, _eol)) = tuple((
take_while1(|c| char::is_alphanumeric(c)), // name
take_while1(|c| char::is_alphanumeric(c) || c == '-' || c == ':' || c == '_' || c == '.'), // name
preceded(multispace1, parse_optional_u64), // size
preceded(multispace1, parse_optional_u64), // allocated
preceded(multispace1, parse_optional_u64), // free