Lines Matching refs:clopts
55 void dtop_load_default_options(struct cli_opts *clopts) in dtop_load_default_options() argument
57 memset(clopts, 0, sizeof(struct cli_opts)); in dtop_load_default_options()
59 clopts->priority = DEFAULT_NICE; in dtop_load_default_options()
72 int dtop_parse_cli_opts(struct cli_opts *clopts, int argc, char **argv) in dtop_parse_cli_opts() argument
76 if (!clopts || !*argv) { in dtop_parse_cli_opts()
84 clopts->print_cl = OPT_CHOSE; in dtop_parse_cli_opts()
93 clopts->priority = strtol(optarg, 0, 10); in dtop_parse_cli_opts()
94 if (clopts->priority > 19 || clopts->priority < -20) { in dtop_parse_cli_opts()
102 clopts->poll_per = strtol(optarg, 0, 10); in dtop_parse_cli_opts()
103 if (clopts->poll_per <= 0) { in dtop_parse_cli_opts()
111 clopts->poll_time = strtol(optarg, 0, 10); in dtop_parse_cli_opts()
112 clopts->poll_time_selected = POLL_TIME_SELECTED; in dtop_parse_cli_opts()
113 if (clopts->poll_time <= 0) { in dtop_parse_cli_opts()
122 clopts->file_name = optarg; in dtop_parse_cli_opts()
123 clopts->print_csv = OPT_CHOSE; in dtop_parse_cli_opts()
131 clopts->snapshot_file = optarg; in dtop_parse_cli_opts()
142 if (clopts->poll_time == 0) { in dtop_parse_cli_opts()
143 if (clopts->print_csv == 1) in dtop_parse_cli_opts()
144 clopts->poll_time = POLL_NOT_SPECIFIED; in dtop_parse_cli_opts()
146 clopts->poll_time = POLL_TIME_DEFAULT; in dtop_parse_cli_opts()
148 if (clopts->poll_per == 0) in dtop_parse_cli_opts()
149 clopts->poll_per = DEFAULT_POLL_INTERVAL; in dtop_parse_cli_opts()