Interesting, because when I was looking at the original patch (looked at
the lore link before reading your reply), I thought to myself "this looks
exactly like what I did for trace_printk formats", which the above file is
where it is shown. I'm curious if this work was inspired by that?
Anyway, there is something wrong at the moment. The output looks fine
with cat. But "less" says that it is a binary format and the output
is a bit messy:
Hmm, that's usually the case when lseek gets messed up. Not sure how that
happened.
$> less /proc/printk_formats
"/proc/printk_formats" may be a binary file. See it anyway?
vmlinux,^A3Warning: unable to open an initial console.
^@vmlinux,^A3Failed to execute %s (error %d)
^@vmlinux,^A6Kernel memory protection disabled.
^@vmlinux,^A3Starting init: %s exists but couldn't execute it (error %d)
That is for now. I still have to think about it. And I am also curious
about what others thing about this idea.
I'm not against the idea. I don't think it belongs in /proc. Perhaps
debugfs is a better place to put it.