summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d0ff85d)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
static char *to_kmg(unsigned int val)
{
char *buf = malloc(32);
static char *to_kmg(unsigned int val)
{
char *buf = malloc(32);
- char post[] = { 0, 'K', 'M', 'G', 'P', 0 };
+ char post[] = { 0, 'K', 'M', 'G', 'P', 'E', 0 };
case 'g':
case 'G':
return 1024 * 1024 * 1024;
case 'g':
case 'G':
return 1024 * 1024 * 1024;
+ case 'e':
+ case 'E':
+ return 1024 * 1024 * 1024 * 1024UL;
* 2^10 base right now.
*/
const unsigned int thousand = 1024;
* 2^10 base right now.
*/
const unsigned int thousand = 1024;
- char postfix[] = { 'K', 'M', 'G', 'P' };
+ char postfix[] = { 'K', 'M', 'G', 'P', 'E' };
num /= thousand;
num += carry;
i++;
num /= thousand;
num += carry;
i++;