[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/4] utils: Deprecate hex-with-suffix sizes
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 3/4] utils: Deprecate hex-with-suffix sizes |
Date: |
Thu, 11 Feb 2021 23:59:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 2/11/21 9:44 PM, Eric Blake wrote:
> Supporting '0x20M' looks odd, particularly since we have a 'B' suffix
> that is ambiguous for bytes, as well as a less-frequently-used 'E'
> suffix for extremely large exibytes. In practice, people using hex
> inputs are specifying values in bytes (and would have written
> 0x2000000, or possibly relied on default_suffix in the case of
> qemu_strtosz_MiB), and the use of scaling suffixes makes the most
> sense for inputs in decimal (where the user would write 32M). But
> rather than outright dropping support for hex-with-suffix, let's
> follow our deprecation policy. Sadly, since qemu_strtosz() does not
> have an Err** parameter, and plumbing that in would be a much larger
> task, we instead go with just directly emitting the deprecation
> warning to stderr.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> docs/system/deprecated.rst | 8 ++++++++
> util/cutils.c | 10 +++++++++-
> 2 files changed, 17 insertions(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
- [PATCH v2 0/4] improve do_strtosz precision, Eric Blake, 2021/02/11
- [PATCH v2 1/4] utils: Enhance testsuite for do_strtosz(), Eric Blake, 2021/02/11
- [PATCH v2 2/4] utils: Improve qemu_strtosz() to have 64 bits of precision, Eric Blake, 2021/02/11
- [PATCH v2 3/4] utils: Deprecate hex-with-suffix sizes, Eric Blake, 2021/02/11
- [PATCH v2 4/4] utils: Deprecate inexact fractional suffix sizes, Eric Blake, 2021/02/11
- Re: [PATCH v2 0/4] improve do_strtosz precision, Eric Blake, 2021/02/22