Re: [PATCH v3] perf tools: New function to parse string representingsize in bytes

From: Ingo Molnar
Date: Sun Nov 15 2009 - 06:04:50 EST



* Hitoshi Mitake <mitake@xxxxxxxxxxxxxxxxxxxxx> wrote:

> > > + length = atoll(str) * unit;
> >
> > we might want to take a naming clue here and name this new function as
> > atoll_exp(), to signal that it works like atoll, just with an extension
> > for KB/MB/GB/etc. expressions?
>
> Hm, how about "atoll_byteunit()"?
> This may have no ambiguity.

I'd suggest to name it in a generic way, in case we want to add other
convenience conversions, hm?

Perhaps simply perf_atoll() - an extended version that understands byte
units (and potentially more in the future).

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/