summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2208c1b)
raw | patch | inline | side by side (parent: 2208c1b)
author | Matthias Eble <psychotrahe@users.sourceforge.net> | |
Sat, 7 Jul 2007 12:02:45 +0000 (12:02 +0000) | ||
committer | Matthias Eble <psychotrahe@users.sourceforge.net> | |
Sat, 7 Jul 2007 12:02:45 +0000 (12:02 +0000) |
print_revision now uses clean_revstring
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1752 f882894a-f735-0410-b71e-b25c423dba1c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1752 f882894a-f735-0410-b71e-b25c423dba1c
plugins/utils.c | patch | blob | history |
diff --git a/plugins/utils.c b/plugins/utils.c
index 7e1e58a20060187204b4fb523632c5d418465a2e..0e79fbdb5f13bb0bec9283d716ff97e10d8c06cc 100644 (file)
--- a/plugins/utils.c
+++ b/plugins/utils.c
clean_revstring (const char *revstring)
{
char plugin_revision[STRLEN];
- if (sscanf (revstring,"$Revision: %[0-9.]",plugin_revision) == 1)
+ plugin_revision[0] = 'v';
+ if (sscanf (revstring,"$Revision: %[0-9.]", plugin_revision + 1) == 1)
return strscpy (NULL, plugin_revision);
else
- return strscpy (NULL, "N/A");
+ return strscpy (NULL, "N/A");
}
void
{
char plugin_revision[STRLEN];
- if (sscanf (revision_string, "$Revision: %[0-9.]", plugin_revision) != 1)
- strncpy (plugin_revision, "N/A", STRLEN);
- printf ("%s (%s %s) %s\n",
- command_name, PACKAGE, VERSION, plugin_revision);
+ printf ("%s %s (%s %s)\n",
+ command_name, clean_revstring(revision_string), PACKAGE, VERSION);
}
const char *