Lines Matching refs:cmd

46 	const char *cmd;  member
101 const char *cmd; member
108 return (strstarts(var, header) && !strcmp(var + strlen(header), c->cmd)); in same_cmd_with_prefix()
120 static int check_pager_config(const char *cmd) in check_pager_config() argument
124 c.cmd = cmd; in check_pager_config()
144 static int check_browser_config(const char *cmd) in check_browser_config() argument
148 c.cmd = cmd; in check_browser_config()
202 const char *cmd = (*argv)[0]; in handle_options() local
203 if (cmd[0] != '-') in handle_options()
211 if (!strcmp(cmd, "--help") || !strcmp(cmd, "--version")) in handle_options()
218 if (!strcmp(cmd, "-h")) { in handle_options()
223 if (!strcmp(cmd, "-v")) { in handle_options()
228 if (!strcmp(cmd, "-vv")) { in handle_options()
237 if (strstarts(cmd, CMD_EXEC_PATH)) { in handle_options()
238 cmd += strlen(CMD_EXEC_PATH); in handle_options()
239 if (*cmd == '=') in handle_options()
240 set_argv_exec_path(cmd + 1); in handle_options()
245 } else if (!strcmp(cmd, "--html-path")) { in handle_options()
248 } else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) { in handle_options()
250 } else if (!strcmp(cmd, "--no-pager")) { in handle_options()
254 } else if (!strcmp(cmd, "--debugfs-dir")) { in handle_options()
264 } else if (!strcmp(cmd, "--buildid-dir")) { in handle_options()
274 } else if (strstarts(cmd, CMD_DEBUGFS_DIR)) { in handle_options()
275 tracing_path_set(cmd + strlen(CMD_DEBUGFS_DIR)); in handle_options()
279 } else if (!strcmp(cmd, "--list-cmds")) { in handle_options()
284 printf("%s ", p->cmd); in handle_options()
288 } else if (!strcmp(cmd, "--list-opts")) { in handle_options()
297 } else if (!strcmp(cmd, "--debug")) { in handle_options()
307 } else if (!strcmp(cmd, "--debug-file")) { in handle_options()
320 fprintf(stderr, "Unknown option: %s\n", cmd); in handle_options()
341 use_browser = check_browser_config(p->cmd); in run_builtin()
344 use_pager = check_pager_config(p->cmd); in run_builtin()
386 const char *cmd = argv[0]; in handle_internal_command() local
392 argv[0] = cmd = "help"; in handle_internal_command()
399 if (strcmp(p->cmd, cmd)) in handle_internal_command()
407 char *cmd; in execv_dashed_external() local
411 if (asprintf(&cmd, "perf-%s", argv[0]) < 0) in execv_dashed_external()
421 argv[0] = cmd; in execv_dashed_external()
439 zfree(&cmd); in execv_dashed_external()
461 const char *cmd; in main() local
472 cmd = extract_argv0_path(argv[0]); in main()
473 if (!cmd) in main()
474 cmd = "perf-help"; in main()
498 if (strstarts(cmd, "perf-")) { in main()
499 cmd += 5; in main()
500 argv[0] = cmd; in main()
506 cmd -= 5; in main()
507 argv[0] = cmd; in main()
509 if (strstarts(cmd, "trace")) { in main()
536 cmd = argv[0]; in main()
563 commands[i].cmd, in main()
564 strlen(commands[i].cmd)); in main()
566 cmd = argv[0] = help_unknown_cmd(cmd, &main_cmds); in main()
569 if (!cmd) in main()
575 if (cmd) { in main()
577 cmd, str_error_r(errno, sbuf, sizeof(sbuf))); in main()