• Home
  • Raw
  • Download

Lines Matching refs:cmd

34 	const char *cmd;  member
72 const char *cmd; member
79 if (!prefixcmp(var, "pager.") && !strcmp(var + 6, c->cmd)) in pager_command_config()
85 int check_pager_config(const char *cmd) in check_pager_config() argument
88 c.cmd = cmd; in check_pager_config()
97 if (!prefixcmp(var, "tui.") && !strcmp(var + 4, c->cmd)) in browser_command_config()
99 if (!prefixcmp(var, "gtk.") && !strcmp(var + 4, c->cmd)) in browser_command_config()
108 static int check_browser_config(const char *cmd) in check_browser_config() argument
111 c.cmd = cmd; in check_browser_config()
153 const char *cmd = (*argv)[0]; in handle_options() local
154 if (cmd[0] != '-') in handle_options()
162 if (!strcmp(cmd, "--help") || !strcmp(cmd, "--version")) in handle_options()
169 if (!strcmp(cmd, "-h")) { in handle_options()
174 if (!strcmp(cmd, "-v")) { in handle_options()
182 if (!prefixcmp(cmd, CMD_EXEC_PATH)) { in handle_options()
183 cmd += strlen(CMD_EXEC_PATH); in handle_options()
184 if (*cmd == '=') in handle_options()
185 perf_set_argv_exec_path(cmd + 1); in handle_options()
190 } else if (!strcmp(cmd, "--html-path")) { in handle_options()
193 } else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) { in handle_options()
195 } else if (!strcmp(cmd, "--no-pager")) { in handle_options()
199 } else if (!strcmp(cmd, "--perf-dir")) { in handle_options()
210 } else if (!prefixcmp(cmd, CMD_PERF_DIR)) { in handle_options()
211 setenv(PERF_DIR_ENVIRONMENT, cmd + strlen(CMD_PERF_DIR), 1); in handle_options()
214 } else if (!strcmp(cmd, "--work-tree")) { in handle_options()
224 } else if (!prefixcmp(cmd, CMD_WORK_TREE)) { in handle_options()
225 setenv(PERF_WORK_TREE_ENVIRONMENT, cmd + strlen(CMD_WORK_TREE), 1); in handle_options()
228 } else if (!strcmp(cmd, "--debugfs-dir")) { in handle_options()
238 } else if (!strcmp(cmd, "--buildid-dir")) { in handle_options()
248 } else if (!prefixcmp(cmd, CMD_DEBUGFS_DIR)) { in handle_options()
249 tracing_path_set(cmd + strlen(CMD_DEBUGFS_DIR)); in handle_options()
253 } else if (!strcmp(cmd, "--list-cmds")) { in handle_options()
258 printf("%s ", p->cmd); in handle_options()
262 } else if (!strcmp(cmd, "--list-opts")) { in handle_options()
271 } else if (!strcmp(cmd, "--debug")) { in handle_options()
282 fprintf(stderr, "Unknown option: %s\n", cmd); in handle_options()
378 use_browser = check_browser_config(p->cmd); in run_builtin()
381 use_pager = check_pager_config(p->cmd); in run_builtin()
424 const char *cmd = argv[0]; in handle_internal_command() local
432 argv[0] = cmd = argv0; in handle_internal_command()
440 argv[0] = cmd = "help"; in handle_internal_command()
445 if (strcmp(p->cmd, cmd)) in handle_internal_command()
453 struct strbuf cmd = STRBUF_INIT; in execv_dashed_external() local
457 strbuf_addf(&cmd, "perf-%s", argv[0]); in execv_dashed_external()
466 argv[0] = cmd.buf; in execv_dashed_external()
482 strbuf_release(&cmd); in execv_dashed_external()
528 const char *cmd; in main() local
535 cmd = perf_extract_argv0_path(argv[0]); in main()
536 if (!cmd) in main()
537 cmd = "perf-help"; in main()
552 if (!prefixcmp(cmd, "perf-")) { in main()
553 cmd += 5; in main()
554 argv[0] = cmd; in main()
556 fprintf(stderr, "cannot handle %s internally", cmd); in main()
559 if (!prefixcmp(cmd, "trace")) { in main()
588 cmd = argv[0]; in main()
616 cmd, argv[0]); in main()
620 cmd = argv[0] = help_unknown_cmd(cmd); in main()
627 cmd, strerror_r(errno, sbuf, sizeof(sbuf))); in main()