Quantcast
Channel: lkml.org : Shesha Sreenivasamurthy
Viewing all articles
Browse latest Browse all 1267

Re: printk: what is going on with additional newlines?

$
0
0
Linus Torvalds writes: (Summary) wrote:

[...]

What about using the seq_buf*() then?
They do have the nice property that because we use them for various /proc files, there are some helper functions in addition to just the puts/printt/vprintf.
puts/printt/vprintf.
Ie seq_buf_putmem_hex().
Ie seq_buf_putmem_hex().
And yeah, you can just do
And yeah, you can just do
char buffer[80];
struct seq_buf s;
struct seq_buf s;
seq_buf_init(&s, buffer, sizeof(buffer));
seq_buf_init(&s, buffer, sizeof(buffer));
if you want to use a stack buffer for a single line.

Viewing all articles
Browse latest Browse all 1267

Trending Articles