Lines Matching refs:cmdstr
257 void rosh_help(int type, const char *cmdstr) in rosh_help() argument
261 if ((cmdstr == NULL) || (strcmp(cmdstr, "") == 0)) { in rosh_help()
265 switch (cmdstr[0]) { in rosh_help()
273 printf(rosh_help_str_adv, cmdstr); in rosh_help()
279 if (cmdstr) in rosh_help()
280 printf("%s: %s: unknown command\n", APP_NAME, cmdstr); in rosh_help()
291 void rosh_error(const int ierrno, const char *cmdstr, const char *filestr) in rosh_error() argument
293 printf("--ERROR: %s '%s': ", cmdstr, filestr); in rosh_error()
335 int rosh_argcat(char *cmdstr, const int cmdlen, const int argc, char *argv[], in rosh_argcat() argument
341 cmdstr[0] = '\0'; /* Nullify string just to be sure */ in rosh_argcat()
347 memcpy(cmdstr + curpos, argv[i], arglen); in rosh_argcat()
353 cmdstr[(cmdlen - 1)] = 0; in rosh_argcat()
357 cmdstr[curpos] = ' '; in rosh_argcat()
359 cmdstr[curpos] = 0; in rosh_argcat()
364 if (cmdstr[curpos - 1] == ' ') in rosh_argcat()
365 cmdstr[--curpos] = 0; in rosh_argcat()
494 void rosh_echo(const char *cmdstr) in rosh_echo() argument
497 ROSH_DEBUG("CMD: '%s'\n", cmdstr); in rosh_echo()
498 bpos = rosh_search_nonsp(cmdstr, rosh_search_sp(cmdstr, 0)); in rosh_echo()
501 printf("'%s'\n", cmdstr + bpos); in rosh_echo()
1125 char cmdstr[ROSH_CMD_SZ]; in rosh_run() local
1128 len = rosh_argcat(cmdstr, ROSH_CMD_SZ, argc, argv, 0); in rosh_run()
1130 printf("--run: '%s'\n", cmdstr); in rosh_run()
1131 syslinux_run_command(cmdstr); in rosh_run()
1316 char cmdstr[ROSH_CMD_SZ]; in rosh_prompt() local
1332 if (fgets(cmdstr, ROSH_CMD_SZ, stdin)) { in rosh_prompt()
1333 argc = rosh_str2argv(&argv, cmdstr); in rosh_prompt()
1355 char cmdstr[ROSH_CMD_SZ]; in main() local
1356 rosh_argcat(cmdstr, ROSH_CMD_SZ, argc, argv, 1); in main()
1357 ROSH_DEBUG("arg='%s'\n", cmdstr); in main()