summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-09-17 20:35:41 -0400
committerDave Brolley <brolley@redhat.com>2009-09-17 20:35:41 -0400
commit8afee8bbf045e858dae186d40653293c99dbbcdd (patch)
treed170c0b3e060f8534ecbd2783074b4838dcf812c /main.cxx
parent8150f846586bb04d05f51e4f17e86c00347cb7b6 (diff)
downloadsystemtap-steved-8afee8bbf045e858dae186d40653293c99dbbcdd.tar.gz
systemtap-steved-8afee8bbf045e858dae186d40653293c99dbbcdd.tar.xz
systemtap-steved-8afee8bbf045e858dae186d40653293c99dbbcdd.zip
Check for unprivileged options conflicts on the server side.
Gneral work on options in the client and server.
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx46
1 files changed, 5 insertions, 41 deletions
diff --git a/main.cxx b/main.cxx
index c2331a3e..8e3c9399 100644
--- a/main.cxx
+++ b/main.cxx
@@ -381,42 +381,6 @@ checkOptions (systemtap_session &s)
cerr << "You can't specify -g and --unprivileged together." << endl;
optionsConflict = true;
}
- if (s.include_path.size () > 1)
- {
- cerr << "You can't specify -I and --unprivileged together." << endl;
- optionsConflict = true;
- }
- if (s.runtime_path != string(PKGDATADIR) + "/runtime")
- {
- cerr << "You can't use -R to specify an alternate runtime path when --unprivileged is specified." << endl;
- optionsConflict = true;
- }
- if (s.kernel_build_tree.substr(0, 13) != "/lib/modules/")
- {
- cerr << "You can't use -r to specify a kernel release which is not installed when --unprivileged is specified." << endl;
- optionsConflict = true;
- }
- if (! s.macros.empty ())
- {
- cerr << "You can't specify -D and --unprivileged together." << endl;
- optionsConflict = true;
- }
-
- if (getenv ("SYSTEMTAP_TAPSET"))
- {
- cerr << "The environment variable SYSTEMTAP_TAPSET can not be defined when --unprivileged is specified." << endl;
- optionsConflict = true;
- }
- if (getenv ("SYSTEMTAP_RUNTIME"))
- {
- cerr << "The environment variable SYSTEMTAP_RUNTIME can not be defined when --unprivileged is specified." << endl;
- optionsConflict = true;
- }
- if (getenv ("SYSTEMTAP_DEBUGINFO_PATH"))
- {
- cerr << "The environment variable SYSTEMTAP_DEBUGINFO_PATH can not be defined when --unprivileged is specified." << endl;
- optionsConflict = true;
- }
}
if (!s.kernel_symtab_path.empty())
@@ -621,17 +585,17 @@ main (int argc, char * const argv [])
break;
case 'p':
- if (s.listing_mode)
- {
- cerr << "Listing (-l) mode implies pass 2." << endl;
- usage (s, 1);
- }
s.last_pass = (int)strtoul(optarg, &num_endptr, 10);
if (*num_endptr != '\0' || s.last_pass < 1 || s.last_pass > 5)
{
cerr << "Invalid pass number (should be 1-5)." << endl;
usage (s, 1);
}
+ if (s.listing_mode && s.last_pass != 2)
+ {
+ cerr << "Listing (-l) mode implies pass 2." << endl;
+ usage (s, 1);
+ }
break;
case 'I':