Re: [PATCH v2 1/6] printk: initialize syslog_prev and console_prev

From: Alex Elder
Date: Fri Jul 18 2014 - 09:38:29 EST


On 07/18/2014 05:43 AM, Petr Mládek wrote:
> On Thu 2014-07-17 09:09:06, Alex Elder wrote:
>> Two global variables, "syslog_prev" and "console_prev", maintain a
>> copy of the flags value used in the log record most recently
>> formatted for syslog or the console, respectively.

. . .

>> @@ -2148,7 +2148,7 @@ again:
>> /* messages are gone, move to first one */
>> console_seq = log_first_seq;
>> console_idx = log_first_idx;
>> - console_prev = 0;
>> + console_prev = LOG_NEWLINE;
>> } else {
>> len = 0;
>> }
>
> It would make sense to add '\n' if we skip something and the previous
> copied line was continuous. This would change the behavior, so we
> should do this in separate patch.

I'm working up a v3 of this series and have inserted a patch
that implements this at the beginning.

> Anyway, it makes sense to reset the flag to LOG_NEWLINE.
>
> Reviewed-by: Petr Mladek <pmladek@xxxxxxx>

Thanks a lot.

-Alex

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/