Output Format of PowerDebug is messed up on Samsung Arndale Board
Bug #1307896 reported by
Mohammad Merajul Islam Molla
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro PMWG Powerdebug |
New
|
Undecided
|
Unassigned |
Bug Description
This issue reproduces with powerdebug 0.7.1 (latest code from git). While displaying information about "Regulators" output becomes really messy (zig zag) on Samsung Arndale Board (Exynos 5250, Cortex A-15). It looks like the output field size "11" for printing regulator name is not enough.
asprintf(&buf, "%-11s %-11s %-11s %-11s %-11s %-11s %-11s %-12s", ...)
Some regularots have longer names. Hence proposing to increase this limit to a higher value, i.e. 25.
To post a comment you must log in.
A simple patch will do. My git diff goes below -
diff --git a/regulator.c b/regulator.c display_ cb(struct tree *t, void *data) reg->name) )
return 0;
index 9cd89fd..045cceb 100644
--- a/regulator.c
+++ b/regulator.c
@@ -127,7 +127,7 @@ static int regulator_
if (!strlen(
- if (asprintf(&buf, "%-11s %-11s %-11s %-11s %-11d %-11d %-11d %-12d",
reg->name, reg->status, reg->state, reg->type,
reg->num_ users, reg->microvolts, reg->min_ microvolts,
reg->max_ microvolts) < 0) print_header( void)
+ if (asprintf(&buf, "%-25s %-11s %-11s %-11s %-11d %-11d %-11d %-12d",
@@ -147,7 +147,7 @@ static int regulator_
char *buf;
int ret;
- if (asprintf(&buf, "%-11s %-11s %-11s %-11s %-11s %-11s %-11s %-12s",
"Name", "Status", "State", "Type", "Users", "Microvolts",
"Min u-volts", "Max u-volts") < 0)
return -1;
+ if (asprintf(&buf, "%-25s %-11s %-11s %-11s %-11s %-11s %-11s %-12s",