Lines Matching defs:argv
207 static int32_t BShellParamCmdLs(BShellHandle shell, int32_t argc, char *argv[])
213 if (strcmp(argv[i], "-r") == 0) {
216 input = argv[i];
254 static int32_t BShellParamCmdCat(BShellHandle shell, int32_t argc, char *argv[])
260 char *realParameter = GetRealParameter(shell, argv[1], buffer, buffSize);
267 static int32_t BShellParamCmdCd(BShellHandle shell, int32_t argc, char *argv[])
271 SetParamShellPrompt(shell, argv[1]);
287 static int32_t BShellParamCmdGet(BShellHandle shell, int32_t argc, char *argv[])
294 char *realParameter = GetRealParameter(shell, (argc == 1) ? "" : argv[1], buffer, buffSize);
315 static int32_t BShellParamCmdSet(BShellHandle shell, int32_t argc, char *argv[])
325 char *realParameter = GetRealParameter(shell, argv[1], buffer, buffSize);
327 BShellEnvOutput(shell, "Set parameter %s %s fail\n", argv[1], argv[2]); // 2 value param
330 int ret = SystemSetParameter(realParameter, argv[2]); // 2 value param
332 BShellEnvOutput(shell, "Set parameter %s %s success\n", realParameter, argv[2]); // 2 value param
334 BShellEnvOutput(shell, "Set parameter %s %s fail! errNum is:%d!\n", realParameter, argv[2], ret); // 2 param
339 static int32_t BShellParamCmdSave(BShellHandle shell, int32_t argc, char *argv[])
353 static int32_t BShellParamCmdWait(BShellHandle shell, int32_t argc, char *argv[])
364 value = argv[2]; // 2 value param
367 timeout = atoi(argv[3]); // 3 timeout param
371 char *realParameter = GetRealParameter(shell, argv[1], buffer, buffSize);
373 BShellEnvOutput(shell, "Wait parameter %s fail\n", argv[1]);
379 BShellEnvOutput(shell, "Wait parameter %s success\n", argv[1]);
381 BShellEnvOutput(shell, "Wait parameter %s fail! errNum is:%d!\n", argv[1], ret);
386 static int32_t BShellParamCmdDump(BShellHandle shell, int32_t argc, char *argv[])
390 if (strcmp(argv[1], "verbose") == 0) {
394 int index = StringToInt(argv[1], 0);
402 static int32_t BShellParamCmdPwd(BShellHandle shell, int32_t argc, char *argv[])
411 static void GetUserInfo(ParamShellExecArgs *execArg, int32_t argc, char *argv[])
416 if (strcmp(argv[i], "-p") == 0 && ((i + 1) < argc)) {
417 execArg->parameter = argv[i + 1];
419 } else if (strcmp(argv[i], "-u") == 0 && ((i + 1) < argc)) {
420 execArg->uid = DecodeUid(argv[i + 1]);
423 } else if (strcmp(argv[i], "-g") == 0 && ((i + 1) < argc)) {
424 execArg->gid = DecodeGid(argv[i + 1]);
427 } else if (strcmp(argv[i], "-c") == 0) {
465 static int32_t BShellParamCmdShell(BShellHandle shell, int32_t argc, char *argv[])
475 GetUserInfo(&args, argc, argv);