18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __SUBCMD_EXEC_CMD_H
38c2ecf20Sopenharmony_ci#define __SUBCMD_EXEC_CMD_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciextern void exec_cmd_init(const char *exec_name, const char *prefix,
68c2ecf20Sopenharmony_ci			  const char *exec_path, const char *exec_path_env);
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciextern void set_argv_exec_path(const char *exec_path);
98c2ecf20Sopenharmony_ciextern const char *extract_argv0_path(const char *path);
108c2ecf20Sopenharmony_ciextern void setup_path(void);
118c2ecf20Sopenharmony_ciextern int execv_cmd(const char **argv); /* NULL terminated */
128c2ecf20Sopenharmony_ciextern int execl_cmd(const char *cmd, ...);
138c2ecf20Sopenharmony_ci/* get_argv_exec_path and system_path return malloc'd string, caller must free it */
148c2ecf20Sopenharmony_ciextern char *get_argv_exec_path(void);
158c2ecf20Sopenharmony_ciextern char *system_path(const char *path);
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#endif /* __SUBCMD_EXEC_CMD_H */
18