Let's create a specific function to dump instead of managing with ncurses Signed-off-by: Daniel Lezcano <daniel.lezc...@free.fr>Index: powerdebug/powerdebug.c =================================================================== --- powerdebug.c | 13 +++++++++++++ 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; -- 1.7.1 _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev