From: Matthew Wilcox <willy@debian.org>
To: linux-kernel@vger.kernel.org
Cc: Rusty Russell <rusty@rustcorp.com.au>
Subject: [PROPOSAL] MODULE_VERSION macro
Date: Thu, 27 Mar 2003 20:14:39 +0000 [thread overview]
Message-ID: <20030327201439.GA1586@parcelfarce.linux.theplanet.co.uk> (raw)
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/net/e100/e100_main.c:140:char e100_driver_version[]="2.1.29-k4";
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
init' section.
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
next reply other threads:[~2003-03-27 20:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-27 20:14 Matthew Wilcox [this message]
2003-03-28 0:25 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030327201439.GA1586@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®