Lines Matching refs:argv
460 int kdb_set(int argc, const char **argv) in kdb_set() argument
469 argv[2] = argv[3]; in kdb_set()
479 if (strcmp(argv[1], "PROMPT") == 0 && in kdb_set()
486 if (strcmp(argv[1], "KDBDEBUG") == 0) { in kdb_set()
490 debugflags = simple_strtoul(argv[2], &cp, 0); in kdb_set()
491 if (cp == argv[2] || debugflags & ~KDB_DEBUG_FLAG_MASK) { in kdb_set()
493 argv[2]); in kdb_set()
506 return kdb_setenv(argv[1], argv[2]); in kdb_set()
544 int kdbgetaddrarg(int argc, const char **argv, int *nextarg, in kdbgetaddrarg() argument
578 symname = (char *)argv[*nextarg]; in kdbgetaddrarg()
609 diag = kdbgetularg(argv[*nextarg], &addr); in kdbgetaddrarg()
636 if ((argv[*nextarg][0] != '+') in kdbgetaddrarg()
637 && (argv[*nextarg][0] != '-')) { in kdbgetaddrarg()
643 positive = (argv[*nextarg][0] == '+'); in kdbgetaddrarg()
658 cp = (char *)argv[*nextarg]; in kdbgetaddrarg()
723 static int kdb_exec_defcmd(int argc, const char **argv);
752 static int kdb_defcmd(int argc, const char **argv) in kdb_defcmd() argument
793 mp->name = kdb_strdup(argv[1], GFP_KDB); in kdb_defcmd()
796 mp->usage = kdb_strdup(argv[2], GFP_KDB); in kdb_defcmd()
799 mp->help = kdb_strdup(argv[3], GFP_KDB); in kdb_defcmd()
803 strcpy(mp->usage, argv[2]+1); in kdb_defcmd()
807 strcpy(mp->help, argv[3]+1); in kdb_defcmd()
821 kdb_printf("Could not allocate new kdb_macro entry for %s\n", argv[1]); in kdb_defcmd()
834 static int kdb_exec_defcmd(int argc, const char **argv) in kdb_exec_defcmd() argument
845 if (strcmp(kp->name, argv[0]) == 0) in kdb_exec_defcmd()
850 argv[0]); in kdb_exec_defcmd()
858 argv = NULL; in kdb_exec_defcmd()
970 static char *argv[MAXARGC]; in kdb_parse() local
1017 argv[argc++] = cpp; in kdb_parse()
1053 int result = kdb_defcmd2(cmdstr, argv[0]); in kdb_parse()
1056 *(argv[0]) = '\0'; in kdb_parse()
1060 if (argv[0][0] == '-' && argv[0][1] && in kdb_parse()
1061 (argv[0][1] < '0' || argv[0][1] > '9')) { in kdb_parse()
1063 ++argv[0]; in kdb_parse()
1071 if (tp->minlen && (strlen(argv[0]) <= tp->minlen) && in kdb_parse()
1072 (strncmp(argv[0], tp->name, tp->minlen) == 0)) in kdb_parse()
1075 if (strcmp(argv[0], tp->name) == 0) in kdb_parse()
1086 if (strncmp(argv[0], tp->name, strlen(tp->name)) == 0) in kdb_parse()
1098 result = (*tp->func)(argc-1, (const char **)argv); in kdb_parse()
1107 if (argv[argc]) in kdb_parse()
1108 *(argv[argc]) = '\0'; in kdb_parse()
1125 if (kdbgetaddrarg(0, (const char **)argv, &nextarg, in kdb_parse()
1130 kdb_printf("%s = ", argv[0]); in kdb_parse()
1166 static int kdb_reboot(int argc, const char **argv) in kdb_reboot() argument
1595 static int kdb_md(int argc, const char **argv) in kdb_md() argument
1617 if (strcmp(argv[0], "mdr") == 0) { in kdb_md()
1622 } else if (isdigit(argv[0][2])) { in kdb_md()
1623 bytesperword = (int)(argv[0][2] - '0'); in kdb_md()
1631 if (!argv[0][3]) in kdb_md()
1633 else if (argv[0][3] == 'c' && argv[0][4]) { in kdb_md()
1635 repeat = simple_strtoul(argv[0] + 4, &p, 10); in kdb_md()
1640 } else if (strcmp(argv[0], "md") == 0) in kdb_md()
1642 else if (strcmp(argv[0], "mds") == 0) in kdb_md()
1644 else if (strcmp(argv[0], "mdp") == 0) { in kdb_md()
1666 diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, in kdb_md()
1674 diag = kdbgetularg(argv[nextarg], &val); in kdb_md()
1684 diag = kdbgetularg(argv[nextarg+1], &val); in kdb_md()
1690 if (strcmp(argv[0], "mdr") == 0) { in kdb_md()
1739 if (strcmp(argv[0], "mds") == 0) { in kdb_md()
1793 static int kdb_mm(int argc, const char **argv) in kdb_mm() argument
1802 if (argv[0][2] && !isdigit(argv[0][2])) in kdb_mm()
1809 diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); in kdb_mm()
1815 diag = kdbgetaddrarg(argc, argv, &nextarg, &contents, NULL, NULL); in kdb_mm()
1822 width = argv[0][2] ? (argv[0][2] - '0') : (KDB_WORD_SIZE); in kdb_mm()
1836 static int kdb_go(int argc, const char **argv) in kdb_go() argument
1851 diag = kdbgetaddrarg(argc, argv, &nextarg, in kdb_go()
1881 static int kdb_rd(int argc, const char **argv) in kdb_rd() argument
1951 static int kdb_rm(int argc, const char **argv) in kdb_rm() argument
1967 rname = argv[1]; in kdb_rm()
1971 diag = kdbgetu64arg(argv[2], ®64); in kdb_rm()
2018 static int kdb_sr(int argc, const char **argv) in kdb_sr() argument
2027 __handle_sysrq(*argv[1], check_mask); in kdb_sr()
2043 static int kdb_ef(int argc, const char **argv) in kdb_ef() argument
2054 diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); in kdb_ef()
2067 static int kdb_lsmod(int argc, const char **argv) in kdb_lsmod() argument
2114 static int kdb_env(int argc, const char **argv) in kdb_env() argument
2131 static int kdb_dmesg(int argc, const char **argv) in kdb_dmesg() argument
2147 lines = simple_strtol(argv[1], &cp, 0); in kdb_dmesg()
2151 adjust = simple_strtoul(argv[2], &cp, 0); in kdb_dmesg()
2218 static int kdb_disable_nmi(int argc, const char *argv[]) in kdb_disable_nmi() argument
2291 static int kdb_cpu(int argc, const char **argv) in kdb_cpu() argument
2304 diag = kdbgetularg(argv[1], &cpunum); in kdb_cpu()
2387 static int kdb_ps(int argc, const char **argv) in kdb_ps() argument
2398 mask = argc ? argv[1] : kdbgetenv("PS"); in kdb_ps()
2424 static int kdb_pid(int argc, const char **argv) in kdb_pid() argument
2434 if (strcmp(argv[1], "R") == 0) { in kdb_pid()
2437 diag = kdbgetularg(argv[1], &val); in kdb_pid()
2456 static int kdb_kgdb(int argc, const char **argv) in kdb_kgdb() argument
2464 static int kdb_help(int argc, const char **argv) in kdb_help() argument
2488 static int kdb_kill(int argc, const char **argv) in kdb_kill() argument
2497 sig = simple_strtol(argv[1], &endp, 0); in kdb_kill()
2506 pid = simple_strtol(argv[2], &endp, 0); in kdb_kill()
2548 static int kdb_summary(int argc, const char **argv) in kdb_summary() argument
2590 static int kdb_per_cpu(int argc, const char **argv) in kdb_per_cpu() argument
2599 diag = kdbgetaddrarg(argc, argv, &nextarg, &symaddr, NULL, NULL); in kdb_per_cpu()
2604 diag = kdbgetularg(argv[2], &bytesperword); in kdb_per_cpu()
2614 diag = kdbgetularg(argv[3], &whichcpu); in kdb_per_cpu()
2660 static int kdb_grep_help(int argc, const char **argv) in kdb_grep_help() argument