On Thu, Apr 25, 2002 at 08:50:45PM -0600, Ronald G Minnich wrote:
> 
> consider this case. We drop from linux back into linuxbios. If linuxbios
> knows it is a reboot, it can just add to the log buffer instead of
> resetting it. Otherwise, linuxbios might have to assume that the log
> buffer is invalid every time it is started.

There's probably clever ways to detect a valid log buffer, and figure out 
where the end is, using magic numbers.  That might avoid 
requiring knowledge of reboot vs. powercycle.  For instance, record a 
magic number at the beginning to mark the buffer as valid.  Then (assuming 
it's a circular buffer), force placement of a tag every X bytes that 
identifies (a) you're still reading valid entries, (b) this was log 
message yyy (yyy increments).  If you're parsing the buffer and yyy goes 
backwards, you know where the buffer wrapped.

Reply via email to