|
|
Log in / Subscribe / Register

Why not filename and line number?

Why not filename and line number?

Posted Sep 30, 2010 16:22 UTC (Thu) by felixfix (subscriber, #242)
In reply to: Why not filename and line number? by epa
Parent article: Organizing kernel messages

You have direct control over the format. You don't have direct control over the line number. It is even arguable that changing the format does change the message. New content needs a new external description. It may indicate circumstances which caused the message have changed.


to post comments

Why not filename and line number?

Posted Oct 1, 2010 9:50 UTC (Fri) by epa (subscriber, #39769) [Link] (1 responses)

It wouldn't be a good situation, however, for all kernel messages to become set in stone because people are relying on the CRC32 of the format string, so that even spelling mistakes and typos can never be corrected. If you think that line number is something unpredictable, perhaps show "foo.c:N" for the Nth occurrence of printk() in file foo.c. Then it would be fairly robust against code jiggling; only a real change to the code's functionality would cause the number to change.

Why not filename and line number?

Posted Oct 7, 2010 19:47 UTC (Thu) by gvy (guest, #11981) [Link]

Seems you haven't actually read the history part of the article, all of that was discussed already (and outlined there).


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds