aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Kucheria <amit.kucheria@linaro.org>2014-06-01 21:33:24 +0530
committerAmit Kucheria <amit.kucheria@linaro.org>2014-06-03 19:19:31 +0530
commitee7f9aa52f5d0d12133b0767882471dd08b5d8b4 (patch)
tree53a712f109672ab8f525714646461fa10d22be11
parent37a681fa82ce7280433a3f5817c39f1d0aee7f6b (diff)
kick the dump option off to use -z and release -m for later
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--idlestat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/idlestat.c b/idlestat.c
index 998f62d..233d554 100644
--- a/idlestat.c
+++ b/idlestat.c
@@ -948,7 +948,7 @@ struct cpuidle_cstates *physical_cluster_data(struct cpu_physical *s_phy)
static void help(const char *cmd)
{
fprintf(stderr,
- "\nUsage:\n%s -o|--output-file <file> [-m|--dump]"
+ "\nUsage:\n%s -o|--output-file <file> [-z|--dump]"
" [-t|--duration <seconds>] [-i|--iterations <number>]"
" [-d|--debug]\n",
basename(cmd));
@@ -975,10 +975,10 @@ int getoptions(int argc, char *argv[], struct program_options *options)
{ "debug", no_argument, NULL, 'd' },
{ "help", no_argument, NULL, 'h' },
{ "iterations", required_argument, NULL, 'i' },
- { "dump", no_argument, NULL, 'm' },
{ "output-file", required_argument, NULL, 'o' },
{ "duration", required_argument, NULL, 't' },
{ "version", no_argument, NULL, 'V' },
+ { "dump", no_argument, NULL, 'z' },
{ 0, 0, 0, 0 }
};
int c;
@@ -990,7 +990,7 @@ int getoptions(int argc, char *argv[], struct program_options *options)
int optindex = 0;
- c = getopt_long(argc, argv, ":dhi:mo:t:V",
+ c = getopt_long(argc, argv, ":dhi:o:t:Vz",
long_options, &optindex);
if (c == -1)
break;
@@ -1006,9 +1006,6 @@ int getoptions(int argc, char *argv[], struct program_options *options)
case 'i':
options->iterations = atoi(optarg);
break;
- case 'm':
- options->dump = true;
- break;
case 'o':
options->filename = optarg;
break;
@@ -1019,6 +1016,9 @@ int getoptions(int argc, char *argv[], struct program_options *options)
version(argv[0]);
exit(0);
break;
+ case 'z':
+ options->dump = true;
+ break;
case 0: /* getopt_long() set a variable, just keep going */
break;
case ':': /* missing option argument */