[libblockdev 2/3] Add a test for the maximum representable size.
Vratislav Podzimek
vpodzime at redhat.com
Thu Sep 4 07:23:29 UTC 2014
On Wed, 2014-09-03 at 11:41 -0400, mulhern wrote:
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
> src/utils/test_sizes.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/utils/test_sizes.c b/src/utils/test_sizes.c
> index 805cd40..064df90 100644
> --- a/src/utils/test_sizes.c
> +++ b/src/utils/test_sizes.c
> @@ -20,6 +20,10 @@ int main () {
> human = bd_utils_size_human_readable ((16.4356 GiB));
> puts (human);
> g_free(human);
> + /* G_MAXUINT64 = 2^64 - 1 which is less by one than 16 EiB. */
> + human = bd_utils_size_human_readable (G_MAXUINT64);
> + puts (human);
> + g_free(human);
>
> g_printf ("10 KiB == %"G_GUINT64_FORMAT"\n", bd_utils_size_from_spec ("10 KiB", &error_message));
>
> if (error_message)
ACK.
--
Vratislav Podzimek
Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list