Mercurial > hg > Game > Cerium
diff TaskManager/kernel/main.cc @ 736:1b225972ae88 draft
cut printf
author | hiroki@localhost.localdomain |
---|---|
date | Sun, 27 Dec 2009 20:39:33 +0900 |
parents | 07351a5a51c9 |
children | 8cd123d2f3ca |
line wrap: on
line diff
--- a/TaskManager/kernel/main.cc Fri Dec 25 20:20:40 2009 +0900 +++ b/TaskManager/kernel/main.cc Sun Dec 27 20:39:33 2009 +0900 @@ -40,12 +40,6 @@ machineNum = atoi(argv[++i]); } else if (strcmp(argv[i], "-p") == 0) { profile = 1; - } else if (strcmp(argv[i], "-help") == 0) { - if (usr_help_str) { - printf("%s", usr_help_str); - } - printf("%s", help_str); - return EXIT_SUCCESS; } } @@ -54,6 +48,15 @@ manager->set_TMend(defaultTMend); + for (int i = 1; argv[i]; ++i) { + if (strcmp(argv[i], "-help") == 0) { + if (usr_help_str) { + manager->get_scheduler()->printf("%s", usr_help_str); + } + manager->get_scheduler()->printf("%s", help_str); + return EXIT_SUCCESS; + } + } if (profile) manager->start_profile(); if (TMmain(manager, argc, argv) < 0) {