summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/stapio.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/staprun/stapio.c')
-rw-r--r--runtime/staprun/stapio.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/runtime/staprun/stapio.c b/runtime/staprun/stapio.c
index ee30a1a1..3c8c4f7f 100644
--- a/runtime/staprun/stapio.c
+++ b/runtime/staprun/stapio.c
@@ -27,24 +27,23 @@ char *__name__ = "stapio";
int main(int argc, char **argv)
{
setup_signals();
-
parse_args(argc, argv);
if (buffer_size)
- dbug(1, "Using a buffer of %u bytes.\n", buffer_size);
+ dbug(1, "Using a buffer of %u MB.\n", buffer_size);
if (optind < argc) {
parse_modpath(argv[optind++]);
dbug(2, "modpath=\"%s\", modname=\"%s\"\n", modpath, modname);
}
- if (optind < argc) {
+ if (optind < argc) {
if (attach_mod) {
err("ERROR: Cannot have module options with attach (-A).\n");
usage(argv[0]);
} else {
- unsigned start_idx = 3; /* reserve three slots in modoptions[] */
- while (optind < argc && start_idx+1 < MAXMODOPTIONS)
+ unsigned start_idx = 3; /* reserve three slots in modoptions[] */
+ while (optind < argc && start_idx + 1 < MAXMODOPTIONS)
modoptions[start_idx++] = argv[optind++];
modoptions[start_idx] = NULL;
}
@@ -57,13 +56,7 @@ int main(int argc, char **argv)
if (init_stapio())
exit(1);
-
- initialized = 1;
- if (attach_mod) {
- /* already started */
- initialized++;
- }
-
+
if (stp_main_loop()) {
err("ERROR: Couldn't enter main loop. Exiting.\n");
exit(1);