[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proposal: cpuinfo(1)



On Thu, Jan 10, 2002 at 05:29:51PM -0600, Manoj Srivastava wrote:
> Hi,
> 
> 	First, a nit:
> ======================================================================
> static void
> grep_cputypes(const char *prefix, int len)
> ======================================================================
> 
> Should be
> ======================================================================
> static void
> grep_cputypes(const char *prefix, size_t len)
> ======================================================================
> 
> 	Just a nit, but it silences the warning:

I did that first but then reversed it.
Ok, back to the initial version, thanks for spotting it.

> 	Secondly, why are you passing the length explicitly in the
>  call to grep_cputypes? The following implementation removes the
>  requirement (and I often miscount, in my old age.

Expclicitly passing it gives a const expression, but if counting
is a problem (:)) I can change it - cpuinfo should really be used in
any fastpath..

> 	Am I missing a reason to allow the caller to specify a subset
>  of the prefix as relevant for comparison?

No - at least that was not intended.

	Christoph

-- 
Of course it doesn't work. We've performed a software upgrade.



Reply to: