1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 15:21:37 +03:00

Constify option table and add missing option

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2014-07-30 15:38:54 -04:00
parent 6fc5a40438
commit 5d459d6b07
2 changed files with 16 additions and 15 deletions

View File

@ -1244,6 +1244,7 @@ static int parse_argv(int argc, char *argv[]) {
{ "to-pattern", required_argument, NULL, ARG_DOT_TO_PATTERN }, { "to-pattern", required_argument, NULL, ARG_DOT_TO_PATTERN },
{ "fuzz", required_argument, NULL, ARG_FUZZ }, { "fuzz", required_argument, NULL, ARG_FUZZ },
{ "no-pager", no_argument, NULL, ARG_NO_PAGER }, { "no-pager", no_argument, NULL, ARG_NO_PAGER },
{ "no-man", no_argument, NULL, ARG_NO_MAN },
{ "host", required_argument, NULL, 'H' }, { "host", required_argument, NULL, 'H' },
{ "machine", required_argument, NULL, 'M' }, { "machine", required_argument, NULL, 'M' },
{} {}

View File

@ -164,21 +164,21 @@ static void help(void) {
} }
static int parse_args(int argc, char *argv[]) { static int parse_args(int argc, char *argv[]) {
static struct option options[] = { static const struct option options[] = {
{"rel", no_argument, NULL, 'r'}, {"rel", no_argument, NULL, 'r'},
{"freq", required_argument, NULL, 'f'}, {"freq", required_argument, NULL, 'f'},
{"samples", required_argument, NULL, 'n'}, {"samples", required_argument, NULL, 'n'},
{"pss", no_argument, NULL, 'p'}, {"pss", no_argument, NULL, 'p'},
{"output", required_argument, NULL, 'o'}, {"output", required_argument, NULL, 'o'},
{"init", required_argument, NULL, 'i'}, {"init", required_argument, NULL, 'i'},
{"no-filter", no_argument, NULL, 'F'}, {"no-filter", no_argument, NULL, 'F'},
{"cmdline", no_argument, NULL, 'C'}, {"cmdline", no_argument, NULL, 'C'},
{"control-group", no_argument, NULL, 'c'}, {"control-group", no_argument, NULL, 'c'},
{"help", no_argument, NULL, 'h'}, {"help", no_argument, NULL, 'h'},
{"scale-x", required_argument, NULL, 'x'}, {"scale-x", required_argument, NULL, 'x'},
{"scale-y", required_argument, NULL, 'y'}, {"scale-y", required_argument, NULL, 'y'},
{"entropy", no_argument, NULL, 'e'}, {"entropy", no_argument, NULL, 'e'},
{NULL, 0, NULL, 0} {}
}; };
int c; int c;