|| ||Matthew Wilcox <firstname.lastname@example.org>|
|| ||[PROPOSAL] MODULE_VERSION macro|
|| ||Thu, 27 Mar 2003 20:14:39 +0000|
|| ||Rusty Russell <email@example.com>|
A common question one needs to ask is "What version of that driver are
you using?". It's not always immediately obvious where to find that
information, even if you have the source in front of you. Some examples..
drivers/net/tulip/tulip_core.c:18:#define DRV_VERSION "1.1.13"
drivers/scsi/sym53c8xx.c:88:#define SCSI_NCR_DRIVER_NAME "sym53c8xx-1.7.3c-20010512"
drivers/scsi/aic7xxx_old.c:256:#define AIC7XXX_C_VERSION "5.2.6"
drivers/serial/8250.c:2159:MODULE_DESCRIPTION("Generic 8250/16x50 serial driver $Revision: 1.90 $");
And I'm sure there are worse examples. My proposal is simple:
#define MODULE_VERSION(version) \
static const char __module_version \
__attribute__((section(".init.version"), unused)) = version
and add the .init.version section to vmlinux.lds in the `freed after
The tools can catch up to use this kind of thing later; we need to
standardise the source code to use this first.
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/