From 35cef6eb2ca0629235b2d413b952ae2bb2e56631 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 4 Jan 2008 16:34:36 +0000 Subject: [PATCH] Switch to SVN revision numbering, so that the version is always up-to-date. git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5089 7894878c-1315-0410-8ee3-d5d059ff63e0 --- eeprom/decode-dimms.pl | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/eeprom/decode-dimms.pl b/eeprom/decode-dimms.pl index dbfe75b..08caded 100755 --- a/eeprom/decode-dimms.pl +++ b/eeprom/decode-dimms.pl @@ -47,7 +47,11 @@ use strict; use POSIX; use Fcntl qw(:DEFAULT :seek); use vars qw($opt_html $opt_body $opt_bodyonly $opt_igncheck $use_sysfs - @vendors %decode_callback); + @vendors %decode_callback $revision); + +$revision = '$Revision$ ($Date$)'; +$revision =~ s/\$\w+: (.*?) \$/$1/g; +$revision =~ s/ \([^()]*\)//; @vendors = ( ["AMD", "AMI", "Fairchild", "Fujitsu", @@ -389,6 +393,19 @@ sub printh ($$) # print header w/ given text } } +sub printc ($) # print comment +{ + my ($comment) = @_; + if ($opt_html) { + $comment =~ s//\>/sg; + $comment =~ s/\n/
\n/sg; + print "\n"; + } else { + print "# $comment\n"; + } +} + # Parameter: bytes 0-63 sub decode_sdr_sdram($) { @@ -1036,10 +1053,10 @@ if ($opt_body) "\n"; } +printc "$0 version $revision"; printh 'Memory Serial Presence Detect Decoder', 'By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner, -Jean Delvare and others -Version 2.10.2'; +Jean Delvare and others'; my $dimm_count=0;