From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH 07/12] move options structure to function scope
Date: Sat, 02 Aug 2014 22:47:18 +0900 [thread overview]
Message-ID: <20140802134718.GA1018@swordfish> (raw)
In-Reply-To: 1406980457-19077-8-git-send-email-kerolasa@iki.fi
[-- Attachment #1: Type: text/plain, Size: 2491 bytes --]
On (08/02/14 12:54), Sami Kerola wrote:
> Date: Sat, 2 Aug 2014 12:54:12 +0100
> From: Sami Kerola <kerolasa(a)iki.fi>
> To: powertop(a)lists.01.org
> Subject: [Powertop] [PATCH 07/12] move options structure to function scope
> X-Mailer: git-send-email 2.0.3
>
> Signed-off-by: Sami Kerola <kerolasa(a)iki.fi>
> ---
> src/main.cpp | 35 ++++++++++++++++++-----------------
> 1 file changed, 18 insertions(+), 17 deletions(-)
>
> diff --git a/src/main.cpp b/src/main.cpp
> index 99a985f..910fe5c 100644
> --- a/src/main.cpp
> +++ b/src/main.cpp
> @@ -69,23 +69,6 @@ int debug_learning = 0;
> unsigned time_out = 20;
> int leave_powertop = 0;
>
> -static const struct option long_options[] =
> -{
> - /* These options set a flag. */
> - {"debug", no_argument, &debug_learning, 'd'},
> - {"version", no_argument, NULL, 'V'},
> - {"help",no_argument, NULL, 'u'}, /* u for usage */
> - {"calibrate",no_argument, NULL, 'c'},
> - {"auto-tune",no_argument, NULL, 'a'},
> - {"html", optional_argument, NULL, 'h'},
> - {"csv", optional_argument, NULL, 'C'},
> - {"extech", optional_argument, NULL, 'e'},
> - {"time", optional_argument, NULL, 't'},
> - {"iteration", optional_argument, NULL, 'i'},
> - {"workload", optional_argument, NULL, 'w'},
> - {"quiet", no_argument, NULL, 'q'},
> - {NULL, 0, NULL, 0}
> -};
>
> static void print_version()
> {
> @@ -370,6 +353,24 @@ int main(int argc, char **argv)
> char workload[4096] = {0,};
> int iterations = 1, auto_tune = 0;
>
> + static const struct option long_options[] =
> + {
> + /* These options set a flag. */
> + {"debug", no_argument, &debug_learning, 'd'},
> + {"version", no_argument, NULL, 'V'},
> + {"help",no_argument, NULL, 'u'}, /* u for usage */
> + {"calibrate",no_argument, NULL, 'c'},
> + {"auto-tune",no_argument, NULL, 'a'},
> + {"html", optional_argument, NULL, 'h'},
> + {"csv", optional_argument, NULL, 'C'},
> + {"extech", optional_argument, NULL, 'e'},
> + {"time", optional_argument, NULL, 't'},
> + {"iteration", optional_argument, NULL, 'i'},
> + {"workload", optional_argument, NULL, 'w'},
> + {"quiet", no_argument, NULL, 'q'},
> + {NULL, 0, NULL, 0}
> + };
what for?
-ss
> set_new_handler(out_of_memory);
>
> setlocale (LC_ALL, "");
> --
> 2.0.3
>
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>
next reply other threads:[~2014-08-02 13:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-02 13:47 Sergey Senozhatsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-08-05 21:30 [Powertop] [PATCH 07/12] move options structure to function scope Sami Kerola
2014-08-05 12:46 Sergey Senozhatsky
2014-08-04 23:41 Alexandra Yates
2014-08-03 11:46 Sergey Senozhatsky
2014-08-03 9:34 Sami Kerola
2014-08-03 3:52 Sergey Senozhatsky
2014-08-02 22:20 Sami Kerola
2014-08-02 11:54 Sami Kerola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140802134718.GA1018@swordfish \
--to=powertop@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.