lkml.org 
[lkml]   [2020]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH][next] printk: ringbuffer: support dataless records
Date
On 2020-07-21, Sergey Senozhatsky <sergey.senozhatsky@gmail.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

\
 
 \ /
  Last update: 2020-07-21 12:31    [W:0.086 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site