Re: [Qemu-devel] [PATCH v9 2/9] include: Add a lookup table of sizes

2018-09-21 Thread Leonid Bloch
On 9/21/18 3:17 PM, Alberto Garcia wrote: On Tue 18 Sep 2018 05:29:16 PM CEST, Leonid Bloch wrote: Adding a lookup table for the powers of two, with the appropriate size prefixes. This is needed when a size has to be stringified, in which case something like '(1 * KiB)' would become a literal

Re: [Qemu-devel] [PATCH v9 2/9] include: Add a lookup table of sizes

2018-09-21 Thread Alberto Garcia
On Tue 18 Sep 2018 05:29:16 PM CEST, Leonid Bloch wrote: > Adding a lookup table for the powers of two, with the appropriate size > prefixes. This is needed when a size has to be stringified, in which > case something like '(1 * KiB)' would become a literal '(1 * (1L << > 10))' string. Powers of

[Qemu-devel] [PATCH v9 2/9] include: Add a lookup table of sizes

2018-09-18 Thread Leonid Bloch
Adding a lookup table for the powers of two, with the appropriate size prefixes. This is needed when a size has to be stringified, in which case something like '(1 * KiB)' would become a literal '(1 * (1L << 10))' string. Powers of two are used very often for sizes, so such a table will also make