summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorjistone <jistone>2006-03-03 18:37:33 +0000
committerjistone <jistone>2006-03-03 18:37:33 +0000
commit77a5c1f9949be4bdf3ebc6fb969debd68a9ebd27 (patch)
treefce8b8d79cbfc5f7dd416463bd5929a43446bdd4 /tapsets.cxx
parent4090de8ca2717fd028548f06783582b7c6c74931 (diff)
downloadsystemtap-steved-77a5c1f9949be4bdf3ebc6fb969debd68a9ebd27.tar.gz
systemtap-steved-77a5c1f9949be4bdf3ebc6fb969debd68a9ebd27.tar.xz
systemtap-steved-77a5c1f9949be4bdf3ebc6fb969debd68a9ebd27.zip
2006-03-03 Josh Stone <joshua.i.stone@intel.com>
* main.cxx (main): search forward for dashes in the kernel release, to work properly with release names with more than one dash. * parse.cxx (eval_pp_conditional): ditto * tapsets.cxx (profile_derived_probe::profile_derived_probe): ditto * safety/safety.py (StaticSafety::__build_search_suffixes): ditto, and add copyright & GPL tag
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 2e2c933e..8337eff7 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -1,6 +1,6 @@
// tapset resolution
// Copyright (C) 2005, 2006 Red Hat Inc.
-// Copyright (C) 2005 Intel Corporation.
+// Copyright (C) 2005, 2006 Intel Corporation.
//
// This file is part of systemtap, and is free software. You can
// redistribute it and/or modify it under the terms of the GNU General
@@ -3355,9 +3355,9 @@ profile_derived_probe::profile_derived_probe (systemtap_session &s, probe* p, pr
string target_kernel_v;
// cut off any release code suffix
- string::size_type dash_rindex = s.kernel_release.rfind ('-');
- if (dash_rindex > 0 && dash_rindex != string::npos)
- target_kernel_v = s.kernel_release.substr (0, dash_rindex);
+ string::size_type dash_index = s.kernel_release.find ('-');
+ if (dash_index > 0 && dash_index != string::npos)
+ target_kernel_v = s.kernel_release.substr (0, dash_index);
else
target_kernel_v = s.kernel_release;