summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authordsmith <dsmith>2006-11-02 17:27:43 +0000
committerdsmith <dsmith>2006-11-02 17:27:43 +0000
commitea3f75ae405de85514beb3e560abdef6b61c4bbe (patch)
treeb4b0d7feb9353acee2d91cff1947fd98021d7df8 /main.cxx
parent4b2c4ab54948e7fa504171baa255b4314e0a5467 (diff)
downloadsystemtap-steved-ea3f75ae405de85514beb3e560abdef6b61c4bbe.tar.gz
systemtap-steved-ea3f75ae405de85514beb3e560abdef6b61c4bbe.tar.xz
systemtap-steved-ea3f75ae405de85514beb3e560abdef6b61c4bbe.zip
2006-11-02 David Smith <dsmith@redhat.com>
* main.cxx (main): Added '-r' check. If the user changes the kernel release to compile against, make sure pass 5 isn't performed (since the resulting module won't be installable).
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.cxx b/main.cxx
index 6cb5ffcb..47cedd19 100644
--- a/main.cxx
+++ b/main.cxx
@@ -181,6 +181,7 @@ main (int argc, char * const argv [])
string cmdline_script; // -e PROGRAM
string script_file; // FILE
bool have_script = false;
+ bool release_changed = false;
// Initialize defaults
systemtap_session s;
@@ -312,6 +313,7 @@ main (int argc, char * const argv [])
case 'r':
s.kernel_release = string (optarg);
+ release_changed = true;
break;
case 'k':
@@ -373,6 +375,13 @@ main (int argc, char * const argv [])
usage (s, 1);
}
+ if (s.last_pass > 4 && release_changed)
+ {
+ cerr << ("Warning: changing last pass to 4 since the kernel release"
+ " has changed.") << endl;
+ s.last_pass = 4;
+ }
+
for (int i = optind; i < argc; i++)
{
if (! have_script)