Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for June 20, 2013
Pencil, Pencil, and Pencil
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
What about the good 'ol C macros __FILE__ and __LINE__ ? They would seem to pinpoint the problem rather exactly (given a particular kernel version)
Getting the message from the kernel
Posted Jun 21, 2007 6:44 UTC (Thu) by pfavr (subscriber, #38205)
If you get messages from the kernel - then __FILE__ and __LINE__ is the easiest way to get people grok the source.
People interested in looking up numbers on a list are probably building their own kernel anyway.
Using __FILE__ and __LINE__ will make sure the references are updated with changes to the kernel.
(and the source is the real documentation anyway :-)
Posted Jun 21, 2007 20:57 UTC (Thu) by jordanb (guest, #45668)
Posted Jul 2, 2007 9:19 UTC (Mon) by alext (guest, #7589)
Besides the error message is already going to have to be unique and therefore
anyone capable of looking at the code meaningfully won't have much trouble locating it.
The big use must be to allow external full explanations to exist that allow admin's etc to apply any known changes to config that get around the problem.
And as the start of the thread suggested, why is there so much resistance to potentially having something as simple as a call with a string and that string having a unique ID attached? It sounds like Linus being a bit precious rather than treating it like just adding a new hook to the code base for others to use in documenting behavior.
Posted Jun 21, 2007 6:45 UTC (Thu) by tzafrir (subscriber, #11501)
Also note that emmiting messages in a language different than English reduces the usefulness of a search engine as a reference guide for those cases.
(I'm not a native English speaker, but fluent enough)
Posted Jun 21, 2007 9:24 UTC (Thu) by james (subscriber, #1325)
In this day and age, I don't see why "making life easy for search engines and their users" shouldn't be a major design point.
Posted Jun 21, 2007 17:13 UTC (Thu) by cpeterso (guest, #305)
For a good example, Microsoft's compiler errors have IDs such as C2097 and linker errors have IDs such as LNK2019. Googling those error codes usually brings up exactly what you were looking for.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds