aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@free.fr>2011-03-26 22:06:04 +0100
committerAmit Kucheria <amit.kucheria@linaro.org>2011-04-04 02:34:08 +0300
commit21c04d4cbf3760a033467f42d6d7907637aa3d18 (patch)
tree20d3e2927ce2ac11de0fb784768deca01cc5373f
parent20be678368dd5f219fe98b5f3ea8cc1ac0a59e41 (diff)
downloadpowerdebug-21c04d4cbf3760a033467f42d6d7907637aa3d18.tar.gz
split dump and display
Let's create a specific function to dump instead of managing with ncurses Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>Index: powerdebug/powerdebug.c Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
-rw-r--r--powerdebug.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/powerdebug.c b/powerdebug.c
index 7eb9c5e..bb024fc 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -341,6 +341,12 @@ int mainloop(struct powerdebug_options *options,
return 0;
}
+static int powerdebug_dump(struct powerdebug_options *options,
+ struct regulator_info *reg_info, int nr_reg)
+{
+ return 0;
+}
+
int main(int argc, char **argv)
{
struct powerdebug_options *options;
@@ -364,6 +370,13 @@ int main(int argc, char **argv)
return 1;
}
+ /* we just dump the informations */
+ if (options->dump) {
+ if (powerdebug_dump(options, regulators_info, numregulators))
+ return 1;
+ return 0;
+ }
+
if (mainloop(options, regulators_info, numregulators))
return 1;