+
+ {
+ /* Do not compress the panic log unless kernel debugging
+ * is disabled - the panic log isn't synced to NVRAM if
+ * debugging is enabled, and the panic log is valuable
+ * whilst debugging
+ */
+ if (!panicDebugging)
+ {
+ unsigned int bufpos;
+
+ /* Now call the compressor */
+ bufpos = packAsc (debug_buf, (unsigned int) (debug_buf_ptr - debug_buf) );
+ /* If compression was successful, use the compressed length */
+ if (bufpos)
+ {
+ debug_buf_ptr = debug_buf + bufpos;
+ }
+ }
+ /* Truncate if the buffer is larger than a certain magic
+ * size - this really ought to be some appropriate fraction
+ * of the NVRAM image buffer, and is best done in the
+ * savePanicInfo() or PESavePanicInfo() calls
+ */
+ pi_size = debug_buf_ptr - debug_buf;
+ pi_size = PESavePanicInfo( debug_buf, ((pi_size > 2040) ? 2040 : pi_size));
+ }