On 9/3/19 8:05 AM, Philippe Mathieu-Daudé wrote:
> "qemu/cutils.h" contains various qemu_strtosz_*() functions
> useful to convert strings to size. It seems natural to have
> the opposite usage (from size to string) there too.
>
> The function definition is already in util/cutils.c.
>
> Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com>
> ---
> There are only 5 users, is it worthwhile renaming it qemu_sztostrt()?
(On the other hand, "size_to_str" is easy to read and "sztostrt" looks
like someone sneezed with their hand on the keyboard.)
> Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com>
> ---
> block/qapi.c | 2 +-
> include/qemu-common.h | 1 -
> include/qemu/cutils.h | 2 ++
> qapi/string-output-visitor.c | 2 +-
> 4 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/block/qapi.c b/block/qapi.c
> index 15f1030264..7ee2ee065d 100644
> --- a/block/qapi.c
> +++ b/block/qapi.c
> @@ -23,7 +23,7 @@
> */
>
> #include "qemu/osdep.h"
> -#include "qemu-common.h"
> +#include "qemu/cutils.h"
I guess that's a more targeted inclusion. (That was the last thing we
needed in there?)
Seems proper. It must be an oversight to begin with that we declared it
in qemu-common but defined it in cutils.
Reviewed-by: John Snow <js...@redhat.com>