From 51d74220e22628126489527776af8c13e339c1ec Mon Sep 17 00:00:00 2001 From: dsmith Date: Mon, 20 Aug 2007 14:02:47 +0000 Subject: 2007-08-20 David Smith From Lai Jiangshan * common.c (parse_args): Make sure the '-c' and '-x' options can't be specified together. --- runtime/staprun/ChangeLog | 6 ++++++ runtime/staprun/common.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/runtime/staprun/ChangeLog b/runtime/staprun/ChangeLog index dd3eb90e..771e375d 100644 --- a/runtime/staprun/ChangeLog +++ b/runtime/staprun/ChangeLog @@ -1,3 +1,9 @@ +2007-08-20 David Smith + + From Lai Jiangshan + * common.c (parse_args): Make sure the '-c' and '-x' options can't + be specified together. + 2007-08-15 David Smith * staprun.c (main): Quit if effective uid is not root. diff --git a/runtime/staprun/common.c b/runtime/staprun/common.c index cbe88be0..9056c710 100644 --- a/runtime/staprun/common.c +++ b/runtime/staprun/common.c @@ -104,6 +104,11 @@ void parse_args(int argc, char **argv) "option only has an effect when the module is inserted.\n"); usage(argv[0]); } + + if (target_cmd && target_pid) { + err("You can't specify the '-c' and '-x' options together.\n"); + usage(argv[0]); + } } void usage(char *prog) -- cgit