Lines Matching refs:pg_name

257     char *pg_name;  in msh_exec_module()  local
270 pg_name = (char *) rt_malloc(length + 3); in msh_exec_module()
271 if (pg_name == RT_NULL) in msh_exec_module()
275 rt_memcpy(pg_name, cmd_line, cmd_length); in msh_exec_module()
276 pg_name[cmd_length] = '\0'; in msh_exec_module()
278 if (strstr(pg_name, ".mo") != RT_NULL || strstr(pg_name, ".MO") != RT_NULL) in msh_exec_module()
281 fd = open(pg_name, O_RDONLY, 0); in msh_exec_module()
286 rt_snprintf(pg_name, length - 1, "/bin/%.*s", cmd_length, cmd_line); in msh_exec_module()
287 fd = open(pg_name, O_RDONLY, 0); in msh_exec_module()
295 strcat(pg_name, ".mo"); in msh_exec_module()
296 fd = open(pg_name, O_RDONLY, 0); in msh_exec_module()
301 rt_snprintf(pg_name, length - 1, "/bin/%.*s.mo", cmd_length, cmd_line); in msh_exec_module()
302 fd = open(pg_name, O_RDONLY, 0); in msh_exec_module()
310 dlmodule_exec(pg_name, cmd_line, size); in msh_exec_module()
318 rt_free(pg_name); in msh_exec_module()
373 static char *_msh_exec_search_path(const char *path, const char *pg_name) in _msh_exec_search_path() argument
376 ssize_t pg_len = strlen(pg_name); in _msh_exec_search_path()
400 strcat(path_buffer, pg_name); in _msh_exec_search_path()
427 static char *_msh_exec_search_env(const char *pg_name) in _msh_exec_search_env() argument
459 result = _msh_exec_search_path(search_path, pg_name); in _msh_exec_search_env()
484 char *pg_name; in _msh_exec_lwp() local
500 pg_name = _msh_exec_search_path("", argv[0]); in _msh_exec_lwp()
501 if (pg_name) in _msh_exec_lwp()
514 pg_name = _msh_exec_search_path("/bin", argv[0]); in _msh_exec_lwp()
515 if (pg_name) in _msh_exec_lwp()
521 pg_name = _msh_exec_search_env(argv[0]); in _msh_exec_lwp()
522 if (pg_name) in _msh_exec_lwp()
532 ret = exec(pg_name, debug, argc, argv); in _msh_exec_lwp()
533 rt_free(pg_name); in _msh_exec_lwp()