Re: [PATCH] printk: don't unconditionally shortcut print_time()

From: Sergey Senozhatsky
Date: Mon Dec 03 2018 - 21:56:23 EST


On (12/02/18 14:02), Tetsuo Handa wrote:
>
> @@ -1541,11 +1545,13 @@ int do_syslog(int type, char __user *buf, int len, int source)
> } else {
> u64 seq = syslog_seq;
> u32 idx = syslog_idx;
> + bool f = syslog_partial ? syslog_time : printk_time;
^^^^^^

> while (seq < log_next_seq) {
> struct printk_log *msg = log_from_idx(idx);
>
> - error += msg_print_text(msg, true, NULL, 0);
> + error += msg_print_text(msg, true, f, NULL, 0);
^^^^

> + f = printk_time;
^^^

> idx = log_next(idx);
> seq++;

Can we please have something better than 'f'?

-ss