cutils: Support 'P' and 'E' suffixes in strtosz()

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Kevin Wolf 2013-06-05 14:19:27 +02:00 committed by Stefan Hajnoczi
parent a23818f4ff
commit 5e00984aef
5 changed files with 20 additions and 12 deletions

View file

@ -267,6 +267,10 @@ static int64_t suffix_mul(char suffix, int64_t unit)
return unit * unit * unit;
case STRTOSZ_DEFSUFFIX_TB:
return unit * unit * unit * unit;
case STRTOSZ_DEFSUFFIX_PB:
return unit * unit * unit * unit * unit;
case STRTOSZ_DEFSUFFIX_EB:
return unit * unit * unit * unit * unit * unit;
}
return -1;
}