From: Eric van Tassell <evt@evtM17x.(none)>
---
display.c | 1 -
powerdebug.c | 6 +++---
tree_mgr.c | 6 ++++++
utils.c | 1 -
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/display.c b/display.c
index c97b45d..2872ed5 100644
--- a/display.c
+++ b/display.c
@@ -624,6 +624,5 @@ int display_register_ex(int win, struct display_ops *ops,
void *v)
return -1;
windata[win].pvdata = v;
- printf("%s: win = %d, v = %p\n", __func__, win, v);
return 0;
}
diff --git a/powerdebug.c b/powerdebug.c
index 6fe4b19..d292106 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -135,6 +135,7 @@ int getoptions(int argc, char *argv[], struct
powerdebug_options *options)
case 'P':
options->pwrdms = true;
options->selectedwindow = PWRDM;
+ break;
case 'V':
options->vdds = true;
options->selectedwindow = VDD;
@@ -183,7 +184,6 @@ int getoptions(int argc, char *argv[], struct
powerdebug_options *options)
options->regulators = options->clocks = options->sensors
= options->pwrdms = options->vdds = options->gpios
= true;
-
if (options->selectedwindow == -1)
options->selectedwindow = CLOCK;
@@ -274,13 +274,13 @@ int main(int argc, char **argv)
printf("failed to initialize sensors\n");
options->sensors = false;
}
- pwrdm = tree_mgr_new(PWRDM, "\nPower Domain Information:\n*******\n\n");
+ pwrdm = tree_mgr_new(PWRDM, "Power Domain Information:");
if (!pwrdm) {
printf("failed to initialize pwrdms\n");
options->pwrdms = false;
}
- vdd = tree_mgr_new(VDD, "\nVoltage Domain Information:\n*********\n\n");
+ vdd = tree_mgr_new(VDD, "Voltage Domain Information:");
if (!vdd) {
printf("failed to initialize vdds\n");
options->vdds = false;
diff --git a/tree_mgr.c b/tree_mgr.c
index 9588a2a..be8e682 100644
--- a/tree_mgr.c
+++ b/tree_mgr.c
@@ -31,6 +31,7 @@
#include "delimi.h"
#include "dirtree.h"
#include "regfield.h"
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
static int tree_mgr_dump_cb(struct tree *t, void *data)
{
@@ -56,8 +57,13 @@ static int tree_mgr_dump_cb(struct tree *t, void *data)
int tree_mgr_dump(struct tree_mgr *t)
{
+ char buf[80];
printf("%s", t->dump_header);
+ memset(buf, 0, 80);
+ memset(buf, '*', MIN(80, strlen(t->dump_header)));
+ printf("\n%s\n\n", buf);
+
return tree_for_each(t->tree, tree_mgr_dump_cb, NULL);
}
diff --git a/utils.c b/utils.c
index 35a61a5..8321603 100644
--- a/utils.c
+++ b/utils.c
@@ -120,6 +120,5 @@ char *get_cfg_file(int ix)
else
BAIL_OUT(("unknown SOC, cannot determine config file"));
- printf("%s: ret = %s\n", __func__, ret);
return ret;
}
--
1.7.9.5
_______________________________________________
linaro-dev mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/linaro-dev