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

2018-09-24 Thread Leonid Bloch
On 9/24/18 5:09 PM, Eric Blake wrote: > On 9/21/18 12:23 PM, 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 << 1

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

2018-09-24 Thread Eric Blake
On 9/21/18 12:23 PM, 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 two are used very often

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

2018-09-24 Thread Alberto Garcia
On Fri 21 Sep 2018 07:23:03 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 tw

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

2018-09-21 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 i