[coreboot] libpayload: Add LAR walking support
Jordan Crouse
jordan.crouse at amd.com
Sat Apr 26 17:09:43 CEST 2008
On 26/04/08 12:22 +0200, Peter Stuge wrote:
> ..like this. :)
>
>
> > + return (struct larent *) &_larent;
> > +}
>
> Is it/will it become a problem that this function is not re-entrant?
Possibly. The question is if we are interested in handling "nested" LARs
or not. Personally, I have thought about it a great deal, and I don't see
an advantage to it - why nest a LAR within a LAR when you can nest a regular
AR, or a CPIO or such. But in this code so far, I've left open the
possiblity of nested LARs. In that case, this might be a issue.
This is obviously modeled on readdir(), which says:
The data returned by readdir() may be overwritten by subsequent calls
to readdir() for the same directory stream.
So we should probably do it by stream if we are to have nested LARs.
The problem is that the MAX_PATHLEN for LAR names is 1024, so struct
larent * is pretty big, and so having a copy of it in every LAR
structure would be unfortunate.
Jordan
--
Jordan Crouse
Systems Software Development Engineer
Advanced Micro Devices, Inc.
More information about the coreboot
mailing list