Fix pyexec_file calls.

This commit is contained in:
Scott Shawcroft 2016-12-09 22:49:44 -08:00
parent b6f1eebab3
commit cd09726904
2 changed files with 4 additions and 5 deletions

View File

@ -175,7 +175,7 @@ soft_reset:
if (!safeboot) { if (!safeboot) {
// run boot.py // run boot.py
int ret = pyexec_file("boot.py"); int ret = pyexec_file("boot.py", NULL);
if (ret & PYEXEC_FORCED_EXIT) { if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit; goto soft_reset_exit;
} }
@ -200,7 +200,7 @@ soft_reset:
} else { } else {
main_py = mp_obj_str_get_str(MP_STATE_PORT(machine_config_main)); main_py = mp_obj_str_get_str(MP_STATE_PORT(machine_config_main));
} }
int ret = pyexec_file(main_py); int ret = pyexec_file(main_py, NULL);
if (ret & PYEXEC_FORCED_EXIT) { if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit; goto soft_reset_exit;
} }
@ -374,4 +374,3 @@ STATIC void mptask_create_main_py (void) {
f_write(&fp, fresh_main_py, sizeof(fresh_main_py) - 1 /* don't count null terminator */, &n); f_write(&fp, fresh_main_py, sizeof(fresh_main_py) - 1 /* don't count null terminator */, &n);
f_close(&fp); f_close(&fp);
} }

View File

@ -539,7 +539,7 @@ soft_reset:
const char *boot_py = "boot.py"; const char *boot_py = "boot.py";
FRESULT res = f_stat(boot_py, NULL); FRESULT res = f_stat(boot_py, NULL);
if (res == FR_OK) { if (res == FR_OK) {
int ret = pyexec_file(boot_py); int ret = pyexec_file(boot_py, NULL);
if (ret & PYEXEC_FORCED_EXIT) { if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit; goto soft_reset_exit;
} }
@ -602,7 +602,7 @@ soft_reset:
} }
FRESULT res = f_stat(main_py, NULL); FRESULT res = f_stat(main_py, NULL);
if (res == FR_OK) { if (res == FR_OK) {
int ret = pyexec_file(main_py); int ret = pyexec_file(main_py, NULL);
if (ret & PYEXEC_FORCED_EXIT) { if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit; goto soft_reset_exit;
} }