Re: [PATCH 5/9] Stick to -d for debug according to widely used convention

2014-05-30 Thread Daniel Lezcano

On 05/29/2014 12:17 AM, Amit Kucheria wrote:

Switch the dump option (which might be used infrequently) to use -m

Signed-off-by: Amit Kucheria 


Acked-by: Daniel Lezcano 


---
  idlestat.c | 14 +++---
  1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/idlestat.c b/idlestat.c
index 48e4166..a3b9363 100644
--- a/idlestat.c
+++ b/idlestat.c
@@ -946,7 +946,7 @@ struct cpuidle_cstates *physical_cluster_data(struct 
cpu_physical *s_phy)
  static void help(const char *cmd)
  {
fprintf(stderr,
-   "%s [-d|--dump] [-t ] -o|--output-file \n",
+   "%s [-m|--dump] [-t ] -o|--output-file \n",
basename(cmd));
  }

@@ -956,10 +956,10 @@ static void version(const char *cmd)
  }

  static struct option long_options[] = {
-   { "dump",no_argument,   0, 'd' },
-   { "debug",   no_argument,   0, 'g' },
+   { "debug",   no_argument,   0, 'd' },
{ "help",no_argument,   0, 'h' },
{ "iterations",  required_argument, 0, 'i' },
+   { "dump",no_argument,   0, 'm' },
{ "output-file", required_argument, 0, 'o' },
{ "duration",required_argument, 0, 't' },
{ "version", no_argument,   0, 'V' },
@@ -985,16 +985,13 @@ int getoptions(int argc, char *argv[], struct 
idledebug_options *options)

int optindex = 0;

-   c = getopt_long(argc, argv, "dghi:o:t:V",
+   c = getopt_long(argc, argv, "dhi:mo:t:V",
long_options, &optindex);
if (c == -1)
break;

switch (c) {
case 'd':
-   options->dump = true;
-   break;
-   case 'g':
options->debug = true;
break;
case 'h':
@@ -1004,6 +1001,9 @@ int getoptions(int argc, char *argv[], struct 
idledebug_options *options)
case 'i':
options->iterations = atoi(optarg);
break;
+   case 'm':
+   options->dump = true;
+   break;
case 'o':
options->filename = optarg;
break;




--
  Linaro.org │ Open source software for ARM SoCs

Follow Linaro:   Facebook |
 Twitter |
 Blog


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 5/9] Stick to -d for debug according to widely used convention

2014-05-28 Thread Amit Kucheria
Switch the dump option (which might be used infrequently) to use -m

Signed-off-by: Amit Kucheria 
---
 idlestat.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/idlestat.c b/idlestat.c
index 48e4166..a3b9363 100644
--- a/idlestat.c
+++ b/idlestat.c
@@ -946,7 +946,7 @@ struct cpuidle_cstates *physical_cluster_data(struct 
cpu_physical *s_phy)
 static void help(const char *cmd)
 {
fprintf(stderr,
-   "%s [-d|--dump] [-t ] -o|--output-file \n",
+   "%s [-m|--dump] [-t ] -o|--output-file \n",
basename(cmd));
 }
 
@@ -956,10 +956,10 @@ static void version(const char *cmd)
 }
 
 static struct option long_options[] = {
-   { "dump",no_argument,   0, 'd' },
-   { "debug",   no_argument,   0, 'g' },
+   { "debug",   no_argument,   0, 'd' },
{ "help",no_argument,   0, 'h' },
{ "iterations",  required_argument, 0, 'i' },
+   { "dump",no_argument,   0, 'm' },
{ "output-file", required_argument, 0, 'o' },
{ "duration",required_argument, 0, 't' },
{ "version", no_argument,   0, 'V' },
@@ -985,16 +985,13 @@ int getoptions(int argc, char *argv[], struct 
idledebug_options *options)
 
int optindex = 0;
 
-   c = getopt_long(argc, argv, "dghi:o:t:V",
+   c = getopt_long(argc, argv, "dhi:mo:t:V",
long_options, &optindex);
if (c == -1)
break;
 
switch (c) {
case 'd':
-   options->dump = true;
-   break;
-   case 'g':
options->debug = true;
break;
case 'h':
@@ -1004,6 +1001,9 @@ int getoptions(int argc, char *argv[], struct 
idledebug_options *options)
case 'i':
options->iterations = atoi(optarg);
break;
+   case 'm':
+   options->dump = true;
+   break;
case 'o':
options->filename = optarg;
break;
-- 
1.9.1


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev