Re: Externalize SLIT table

Christoph Hellwig
2004-11-06T11:50:29Z

On Fri, Nov 05, 2004 at 10:44:49AM -0600, Jack Steiner wrote:
> > > + for (i = 0; i < numnodes; i++)
> > > + len += sprintf(buf + len, "%s%d", i ? " " : "", node_distance(nid, i));
> >
> > Can this overflow the space allocated for buf?
>
>
> Good point. I think we are ok for now. AFAIK, the largest cpu count
> currently supported is 512. That gives a max string of 2k (max of 3
> digits + space per cpu).

I always wondered why sysfs doesn't use the seq_file interface that makes
life easier in the rest of them kernel.