diff options
| author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2019-09-03 14:05:55 +0200 |
|---|---|---|
| committer | Laurent Vivier <laurent@vivier.eu> | 2019-09-19 11:57:34 +0200 |
| commit | 31e404151bddbfd7215e471b5822ea2e96024e02 (patch) | |
| tree | f04d3747f1e342dd4ab96f695c51004be039537f /include/qemu/cutils.h | |
| parent | f75ca627234bbe69d0540dfceba35228d4eadacd (diff) | |
| download | focaccia-qemu-31e404151bddbfd7215e471b5822ea2e96024e02.tar.gz focaccia-qemu-31e404151bddbfd7215e471b5822ea2e96024e02.zip | |
cutils: Move size_to_str() from "qemu-common.h" to "qemu/cutils.h"
"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é <philmd@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Message-Id: <20190903120555.7551-1-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'include/qemu/cutils.h')
| -rw-r--r-- | include/qemu/cutils.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index 12301340a4..b54c847e0f 100644 --- a/include/qemu/cutils.h +++ b/include/qemu/cutils.h @@ -155,6 +155,8 @@ int qemu_strtosz(const char *nptr, const char **end, uint64_t *result); int qemu_strtosz_MiB(const char *nptr, const char **end, uint64_t *result); int qemu_strtosz_metric(const char *nptr, const char **end, uint64_t *result); +char *size_to_str(uint64_t val); + /* used to print char* safely */ #define STR_OR_NULL(str) ((str) ? (str) : "null") |