A kernel message catalog
Posted Aug 7, 2008 9:20 UTC (Thu) by
dark (subscriber, #8483)
Parent article:
A kernel message catalog
I notice that "XPRAM_MAX_DEVS" in the check became "32" in the tag
description. This means that if XPRAM_MAX_DEVS changes, someone will have
to remember to update its value in any descriptions that use it. I think
this will get painful.
In this case it's not that hard because XPRAM_MAX_DEVS is defined as a
literal number 32 and is defined in the same file, so you could put a
comment there saying what descriptions need to be updated if its value
changes. In the general case, such limits might live in separate header
files, their values might be architecture-dependent or depend on other
limits, etc. It will be difficult to keep descriptions in sync with the
code if they often contain such values.
I think the right thing to do for this particular message is to put
XPRAM_MAX_DEVS into the printk itself ("%d is not a valid number of XPRAM
devices, should be between 1 and %d") and then have the description say
something like "must be in the specified range". Will this approach work
in general?
(
Log in to post comments)