diff options
author | kevinrs <kevinrs> | 2005-12-12 21:50:47 +0000 |
---|---|---|
committer | kevinrs <kevinrs> | 2005-12-12 21:50:47 +0000 |
commit | 5519d363a7b3d3f184285b19c7298a3788908f84 (patch) | |
tree | 3fff30547e407d8735cee48a94286cd7036eeef7 /main.cxx | |
parent | e0ab3ee9f3d94de9644c76b4ebcd3a7738c58522 (diff) | |
download | systemtap-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.cxx | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -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 (""); |