Add INI option Main for custom binary.

This commit is contained in:
Sorgelig
2024-03-25 23:36:19 +08:00
parent 4b304b4941
commit e61b111858
6 changed files with 18 additions and 5 deletions

View File

@@ -610,7 +610,7 @@ char *getappname()
return dest;
}
void app_restart(const char *path, const char *xml)
void app_restart(const char *path, const char *xml, const char *exe)
{
sync();
fpga_core_reset(1);
@@ -620,8 +620,8 @@ void app_restart(const char *path, const char *xml)
offload_stop();
char *appname = getappname();
printf("restarting the %s\n", appname);
const char *appname = exe ? exe : getappname();
printf("restarting to %s\n", appname);
execl(appname, appname, path, xml, NULL);
printf("Something went wrong. Rebooting...\n");