mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 20:33:54 -06:00
utils: provide size_to_str()
Moving the algorithm from print_type_size() into size_to_str() so that other component can also leverage it. With that, refactor print_type_size(). The assert() in that logic is removed though, since even UINT64_MAX would not overflow. Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1494562661-9063-3-git-send-email-peterx@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
99e15582de
commit
22951aaaeb
3 changed files with 32 additions and 16 deletions
|
@ -145,6 +145,7 @@ void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size);
|
|||
int parse_debug_env(const char *name, int max, int initial);
|
||||
|
||||
const char *qemu_ether_ntoa(const MACAddr *mac);
|
||||
char *size_to_str(uint64_t val);
|
||||
void page_size_init(void);
|
||||
|
||||
/* returns non-zero if dump is in progress, otherwise zero is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue