diff options
author | fche <fche> | 2006-01-28 02:42:08 +0000 |
---|---|---|
committer | fche <fche> | 2006-01-28 02:42:08 +0000 |
commit | b0ee93c4ceec6ee4d44c611cd968386faa233c1c (patch) | |
tree | 2bf71dc5e9cddd931fda85d8531f5a8e1cffba0a /main.cxx | |
parent | 5ee1c56b3508b67910a8196724f3df2182d55efd (diff) | |
download | systemtap-steved-b0ee93c4ceec6ee4d44c611cd968386faa233c1c.tar.gz systemtap-steved-b0ee93c4ceec6ee4d44c611cd968386faa233c1c.tar.xz systemtap-steved-b0ee93c4ceec6ee4d44c611cd968386faa233c1c.zip |
2006-01-27 Frank Ch. Eigler <fche@elastic.org>
* main.cxx: Make "-v" (verbose) flag a counter.
* stap.1.in: Document this.
* session.h: Corresponding changes.
* {elaborate,buildrun,tapsets,translate}.cxx: Update all uses of
verbose flag to compare it to sensible level for value of message.
Diffstat (limited to 'main.cxx')
-rw-r--r-- | main.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -57,7 +57,7 @@ usage (systemtap_session& s) << endl << "Options:" << endl << " -- no more options after this" << endl - << " -v verbose" << (s.verbose ? " [set]" : "") << endl + << " -v increase verbosity [" << s.verbose << "]" << endl << " -h show help" << endl << " -V show version" << endl << " -k keep temporary directory" << endl @@ -120,7 +120,7 @@ main (int argc, char * const argv []) (void) uname (& buf); s.kernel_release = string (buf.release); s.architecture = string (buf.machine); - s.verbose = false; + s.verbose = 0; s.guru_mode = false; s.bulk_mode = false; s.unoptimized = false; @@ -156,7 +156,7 @@ main (int argc, char * const argv []) exit (0); case 'v': - s.verbose = true; + s.verbose ++; break; case 'p': @@ -284,7 +284,7 @@ main (int argc, char * const argv []) else s.tmpdir = tmpdir; - if (s.verbose) + if (s.verbose>1) clog << "Created temporary directory \"" << s.tmpdir << "\"" << endl; } @@ -345,7 +345,7 @@ main (int argc, char * const argv []) rc ++; // GLOB_NOMATCH is acceptable - if (s.verbose) + if (s.verbose>1) clog << "Searched '" << dir << "', " << "match count " << globbuf.gl_pathc << endl; @@ -467,7 +467,7 @@ main (int argc, char * const argv []) } times (& tms_after); - if (s.verbose) clog << "Pass 2: analyzed user script. " + if (s.verbose) clog << "Pass 2: analyzed script: " << s.probes.size() << " probe(s), " << s.functions.size() << " function(s), " << s.globals.size() << " global(s) in " @@ -554,9 +554,9 @@ main (int argc, char * const argv []) { string cleanupcmd = "rm -rf "; cleanupcmd += s.tmpdir; - if (s.verbose) clog << "Running " << cleanupcmd << endl; + if (s.verbose>1) clog << "Running " << cleanupcmd << endl; int status = system (cleanupcmd.c_str()); - if (status != 0 && s.verbose) + if (status != 0 && s.verbose>1) clog << "Cleanup command failed, status: " << status << endl; } } |