[Libguestfs] [PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include

Richard W.M. Jones
Sun, 03 Sep 2023 15:22:51 -0000

This is the first part of a pair of patch series which aim to let us
use nbdkit_parse_size (or rather, an equivalent common function) in
nbdcopy, so we can write:

  nbdcopy --request-size=32M ...

We can't do that now which was annoying me earlier in the week.

This commit creates a new function called human_size_parse which is
basically nbdkit_parse_size, and turns nbdkit_parse_size into a
wrapper around it.

Rich.