mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-08 22:15:28 +00:00
util/cutils: Rename qemu_strtosz() to qemu_strtosz_MiB()
With qemu_strtosz(), no suffix means mebibytes. It's used rarely. I'm going to add a similar function where no suffix means bytes. Rename qemu_strtosz() to qemu_strtosz_MiB() to make the name qemu_strtosz() available for the new function. Backports commit e591591b323772eea733de6027f5e8b50692d0ff from qemu
This commit is contained in:
parent
f656cd91ec
commit
a3358798d6
|
@ -144,9 +144,9 @@ int qemu_strtou64(const char *nptr, const char **endptr, int base,
|
|||
#define QEMU_STRTOSZ_DEFSUFFIX_MB 'M'
|
||||
#define QEMU_STRTOSZ_DEFSUFFIX_KB 'K'
|
||||
#define QEMU_STRTOSZ_DEFSUFFIX_B 'B'
|
||||
int64_t qemu_strtosz(const char *nptr, char **end);
|
||||
int64_t qemu_strtosz_suffix(const char *nptr, char **end,
|
||||
const char default_suffix);
|
||||
int64_t qemu_strtosz_MiB(const char *nptr, char **end);
|
||||
int64_t qemu_strtosz_metric(const char *nptr, char **end);
|
||||
|
||||
#define K_BYTE (1ULL << 10)
|
||||
|
|
|
@ -203,7 +203,7 @@ int64_t qemu_strtosz_suffix(const char *nptr, char **end,
|
|||
return do_strtosz(nptr, end, default_suffix, 1024);
|
||||
}
|
||||
|
||||
int64_t qemu_strtosz(const char *nptr, char **end)
|
||||
int64_t qemu_strtosz_MiB(const char *nptr, char **end)
|
||||
{
|
||||
return qemu_strtosz_suffix(nptr, end, QEMU_STRTOSZ_DEFSUFFIX_MB);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue