From ea3f75ae405de85514beb3e560abdef6b61c4bbe Mon Sep 17 00:00:00 2001 From: dsmith Date: Thu, 2 Nov 2006 17:27:43 +0000 Subject: 2006-11-02 David Smith * 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). --- main.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'main.cxx') 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) -- cgit