[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87lfjdw468.fsf@jogness.linutronix.de>
Date: Tue, 21 Jul 2020 12:36:55 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc: Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Marco Elver <elver@...gle.com>, kexec@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] printk: ringbuffer: support dataless records
On 2020-07-21, Sergey Senozhatsky <sergey.senozhatsky@...il.com> wrote:
>> @@ -1402,7 +1396,9 @@ static int prb_read(struct printk_ringbuffer *rb, u64 seq,
>> /* Copy text data. If it fails, this is a data-less record. */
>> if (!copy_data(&rb->text_data_ring, &desc.text_blk_lpos, desc.info.text_len,
>> r->text_buf, r->text_buf_size, line_count)) {
>> - return -ENOENT;
>> + /* Report an error if there should have been data. */
>> + if (desc.info.text_len != 0)
>> + return -ENOENT;
>> }
>
> If this is a dataless record then should copy_data() return error?
You are correct. That makes more sense. I will send a v2.
John Ogness
Powered by blists - more mailing lists