# HG changeset patch # User Michael Spacefalcon # Date 1402350792 0 # Node ID a2210b0361c11da8ac39a0255c13fc8eb6a2b434 # Parent 837ba1b4747838f2d34c74c144ccdfccfb0a5625 loadtools: implemented compal-stage setting in hw parameter files diff -r 837ba1b47478 -r a2210b0361c1 loadtools/hwparam.c --- a/loadtools/hwparam.c Mon Jun 09 21:31:47 2014 +0000 +++ b/loadtools/hwparam.c Mon Jun 09 21:53:12 2014 +0000 @@ -18,6 +18,28 @@ char hw_init_script[128]; static void +handle_compal_stage(arg, filename_for_errs, lineno_for_errs) + char *arg; + char *filename_for_errs; + int lineno_for_errs; +{ + char *cp; + + while (isspace(*arg)) + arg++; + if (!*arg) { + fprintf(stderr, + "%s line %d: compal-stage setting requires an argument\n", + filename_for_errs, lineno_for_errs); + exit(1); + } + for (cp = arg; *cp && !isspace(*cp); cp++) + ; + *cp = '\0'; + set_compalstage_short(arg); +} + +static void handle_init_script(arg, filename_for_errs, lineno_for_errs) char *arg; char *filename_for_errs; @@ -107,6 +129,7 @@ char *name; void (*func)(); } cmdtab[] = { + {"compal-stage", handle_compal_stage}, {"exit-mode", set_default_exit_mode}, {"flash", set_flash_device}, {"init-script", handle_init_script},