Creating a common structure initialization pattern for struct option

This patch tries to creates a common structure initialization
within the cpupower tool.

Previously the ``struct option`` was initialized
using `designated initializer` technique which was
not needed. There were conflicting initialization methods seen with

bench/main.c & others.

Signed-off-by: Sriram Raghunathan <sriram@marirs.net.in>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Sriram Raghunathan
2015-10-23 09:52:45 +02:00
committed by Rafael J. Wysocki
parent 19c9fb896f
commit 57ab3b0872
7 changed files with 31 additions and 35 deletions

View File

@@ -22,11 +22,11 @@
#define NORM_FREQ_LEN 32
static struct option set_opts[] = {
{ .name = "min", .has_arg = required_argument, .flag = NULL, .val = 'd'},
{ .name = "max", .has_arg = required_argument, .flag = NULL, .val = 'u'},
{ .name = "governor", .has_arg = required_argument, .flag = NULL, .val = 'g'},
{ .name = "freq", .has_arg = required_argument, .flag = NULL, .val = 'f'},
{ .name = "related", .has_arg = no_argument, .flag = NULL, .val='r'},
{"min", required_argument, NULL, 'd'},
{"max", required_argument, NULL, 'u'},
{"governor", required_argument, NULL, 'g'},
{"freq", required_argument, NULL, 'f'},
{"related", no_argument, NULL, 'r'},
{ },
};