This is good idea, but I believe LOG_BUF_LEN needs to be a power of
2. A bitmask is used in several places to wrap around the end of the
ring buffer. For example
#define LOG_BUF_MASK (LOG_BUF_LEN-1)
printk() {
....
log_buf[(log_start+log_size) & LOG_BUF_MASK] = *p;
}
I think LOG_BUF_LEN could be defined to round up (or down) at compile
time, but my post-lunch-sleepy brain can't think of the trick to do
it.
robert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/