Print the return value of the engine in case of TizenRT.
Since TizenRT doesn't have any commands to get the return value of a process, added a debug print line that shows the return value. JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
This commit is contained in:
@@ -482,6 +482,21 @@ jerry_cmd_main (int argc, char *argv[])
|
||||
return ret_code;
|
||||
} /* jerry_cmd_main */
|
||||
|
||||
/**
|
||||
* Run JerryScript and print its return value.
|
||||
*/
|
||||
static int
|
||||
jerry(int argc, char *argv[])
|
||||
{
|
||||
int ret_code = jerry_cmd_main(argc, argv);
|
||||
|
||||
#ifdef CONFIG_DEBUG_VERBOSE
|
||||
jerry_port_log(JERRY_LOG_LEVEL_DEBUG, "JerryScript result: %d\n", ret_code);
|
||||
#endif
|
||||
|
||||
return ret_code;
|
||||
} /* jerry */
|
||||
|
||||
/**
|
||||
* Aborts the program.
|
||||
*/
|
||||
@@ -554,6 +569,6 @@ int main (int argc, FAR char *argv[])
|
||||
int jerry_main (int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
tash_cmd_install("jerry", jerry_cmd_main, TASH_EXECMD_SYNC);
|
||||
tash_cmd_install("jerry", jerry, TASH_EXECMD_SYNC);
|
||||
return 0;
|
||||
} /* main */
|
||||
|
||||
Reference in New Issue
Block a user