← Back to team overview

linaro-pm-wg team mailing list archive

[Bug 1307896] Re: Output Format of PowerDebug is messed up on Samsung Arndale Board

 

A simple patch will do. My git diff goes below -

diff --git a/regulator.c b/regulator.c
index 9cd89fd..045cceb 100644
--- a/regulator.c
+++ b/regulator.c
@@ -127,7 +127,7 @@ static int regulator_display_cb(struct tree *t, void *data)
        if (!strlen(reg->name))
                return 0;
 
-       if (asprintf(&buf, "%-11s %-11s %-11s %-11s %-11d %-11d %-11d %-12d",
+       if (asprintf(&buf, "%-25s %-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)
@@ -147,7 +147,7 @@ static int regulator_print_header(void)
        char *buf;
        int ret;
 
-       if (asprintf(&buf, "%-11s %-11s %-11s %-11s %-11s %-11s %-11s %-12s",
+       if (asprintf(&buf, "%-25s %-11s %-11s %-11s %-11s %-11s %-11s %-12s",
                     "Name", "Status", "State", "Type", "Users", "Microvolts",
                     "Min u-volts", "Max u-volts") < 0)
                return -1;

-- 
You received this bug notification because you are a member of Linaro
Powerdebug Commits, which is subscribed to Linaro PMWG Powerdebug.
Matching subscriptions: powerdebug commits
https://bugs.launchpad.net/bugs/1307896

Title:
  Output Format of PowerDebug is messed up on Samsung Arndale Board

Status in Powerdebug - a tool to help ARM developers:
  New

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 manage notifications about this bug go to:
https://bugs.launchpad.net/linaro-powerdebug/+bug/1307896/+subscriptions


References