summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorkevinrs <kevinrs>2005-12-12 21:50:47 +0000
committerkevinrs <kevinrs>2005-12-12 21:50:47 +0000
commit5519d363a7b3d3f184285b19c7298a3788908f84 (patch)
tree3fff30547e407d8735cee48a94286cd7036eeef7 /main.cxx
parente0ab3ee9f3d94de9644c76b4ebcd3a7738c58522 (diff)
downloadsystemtap-steved-5519d363a7b3d3f184285b19c7298a3788908f84.tar.gz
systemtap-steved-5519d363a7b3d3f184285b19c7298a3788908f84.tar.xz
systemtap-steved-5519d363a7b3d3f184285b19c7298a3788908f84.zip
2005-12-12 Kevin Stafford <krstaffo@us.ibm.com>
* main.cxx (main): Added arch directory to the existing kernel-version-sensitive search path.
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/main.cxx b/main.cxx
index 1ecefa2e..8e7b882e 100644
--- a/main.cxx
+++ b/main.cxx
@@ -304,20 +304,28 @@ main (int argc, char * const argv [])
// syntax errors already printed
rc ++;
- // Construct kernel-versioning search path
+ // Construct arch / kernel-versioning search path
vector<string> version_suffixes;
const string& kvr = s.kernel_release;
- // add full kernel-version-release (2.6.NN-FOOBAR)
+ const string& arch = s.architecture;
+ // add full kernel-version-release (2.6.NN-FOOBAR) + arch
+ version_suffixes.push_back ("/" + kvr + "/" + arch);
version_suffixes.push_back ("/" + kvr);
- // add kernel version (2.6.NN)
+ // add kernel version (2.6.NN) + arch
string::size_type dash_rindex = kvr.rfind ('-');
- if (dash_rindex > 0 && dash_rindex != string::npos)
+ if (dash_rindex > 0 && dash_rindex != string::npos) {
+ version_suffixes.push_back ("/" + kvr.substr (0, dash_rindex) + "/" + arch);
version_suffixes.push_back ("/" + kvr.substr (0, dash_rindex));
- // add kernel family (2.6)
+ }
+ // add kernel family (2.6) + arch
string::size_type dot_index = kvr.find ('.');
string::size_type dot2_index = kvr.find ('.', dot_index+1);
- if (dot2_index > 0 && dot2_index != string::npos)
+ if (dot2_index > 0 && dot2_index != string::npos) {
+ version_suffixes.push_back ("/" + kvr.substr (0, dot2_index) + "/" + arch);
version_suffixes.push_back ("/" + kvr.substr (0, dot2_index));
+ }
+ // add architecture search path
+ version_suffixes.push_back("/" + arch);
// add empty string as last element
version_suffixes.push_back ("");