From 61713fc607d52cbde5b359367913484c2a9186ac Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 7 Sep 2008 14:22:53 +0000 Subject: [PATCH] * More verbose usage text. * Parse the command line options posixly correct. Running command lines that contained options was broken before. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27358 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/system/kernel/time_stats.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/tests/system/kernel/time_stats.cpp b/src/tests/system/kernel/time_stats.cpp index 9b9bd7e214..e2ce169c91 100644 --- a/src/tests/system/kernel/time_stats.cpp +++ b/src/tests/system/kernel/time_stats.cpp @@ -32,7 +32,16 @@ extern const char* __progname; static const char* kUsage = - "Usage: %s [ -h ] [ -o ] [ -s ] \n" + "Usage: %s [ ] \n" + "Executes the given command line and print an analysis of\n" + "the user and kernel times of all threads that ran during that time.\n" + "\n" + "Options:\n" + " -h, --help - Print this usage info.\n" + " -o - Print the results to file .\n" + " -s - Also perform a scheduling analysis over the time the\n" + " child process ran. This requires that scheduler kernel\n" + " tracing had been enabled at compile time.\n" ; @@ -487,7 +496,7 @@ main(int argc, const char* const* argv) }; opterr = 0; // don't print errors - int c = getopt_long(argc, (char**)argv, "ho:s", sLongOptions, NULL); + int c = getopt_long(argc, (char**)argv, "+ho:s", sLongOptions, NULL); if (c == -1) break;