162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef __SUBCMD_EXEC_CMD_H 362306a36Sopenharmony_ci#define __SUBCMD_EXEC_CMD_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciextern void exec_cmd_init(const char *exec_name, const char *prefix, 662306a36Sopenharmony_ci const char *exec_path, const char *exec_path_env); 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciextern void set_argv_exec_path(const char *exec_path); 962306a36Sopenharmony_ciextern const char *extract_argv0_path(const char *path); 1062306a36Sopenharmony_ciextern void setup_path(void); 1162306a36Sopenharmony_ciextern int execv_cmd(const char **argv); /* NULL terminated */ 1262306a36Sopenharmony_ciextern int execl_cmd(const char *cmd, ...); 1362306a36Sopenharmony_ci/* get_argv_exec_path and system_path return malloc'd string, caller must free it */ 1462306a36Sopenharmony_ciextern char *get_argv_exec_path(void); 1562306a36Sopenharmony_ciextern char *system_path(const char *path); 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#endif /* __SUBCMD_EXEC_CMD_H */ 18