diff options
author | Vic Yang <victoryang@chromium.org> | 2013-07-23 12:13:42 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-07-24 15:50:19 -0700 |
commit | 99e4a977986f67334f6b82a87f23f66cf88f4cb4 (patch) | |
tree | 3002343b1906ee1f4ae1a49599ccfad319e4a0db /core/host | |
parent | 5afcb815d60ed16c6bfe48ea9103223acb2e0e0d (diff) | |
download | chrome-ec-99e4a977986f67334f6b82a87f23f66cf88f4cb4.tar.gz |
Reboot emulator with execv()
With this, the emulator is able to reboot itself without the help of
run_host_test script. This makes it easier for development and also
speeds up the test.
BUG=chrome-os-partner:19235
TEST=Pass all tests
BRANCH=None
Change-Id: Ifa510442de19256c671ab91b6bc75fe9e8b9dc7b
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62969
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'core/host')
-rw-r--r-- | core/host/main.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/host/main.c b/core/host/main.c index e7b6718ac8..ed8985670b 100644 --- a/core/host/main.c +++ b/core/host/main.c @@ -18,8 +18,17 @@ #define CPUTS(outstr) cputs(CC_SYSTEM, outstr) #define CPRINTF(format, args...) cprintf(CC_SYSTEM, format, ## args) -int main(void) +const char *__prog_name; + +const char *__get_prog_name(void) { + return __prog_name; +} + +int main(int argc, char **argv) +{ + __prog_name = argv[0]; + register_test_end_hook(); flash_pre_init(); |