FreeCalypso > hg > freecalypso-sw
view loadtools/ltexit.c @ 884:353daaa6014d
gsm-fw/gpf/conf/gsmcomp.c: increased max partition in the voice-only config
The code we got from TCS211 had the maximum prim pool partition size set to
900 bytes in the voice-only config (no FAX_AND_DATA, no GPRS) and to 1600 bytes
in every other config. As it turns out, this "minimized" config breaks when
the AT command interface is used with %CPI enabled, as the responsible code in
ATI does an ACI_MALLOC of 1012 bytes. TI may have considered this case to be
unsupported usage (perhaps they didn't care about the combination of a
voice-only PS with AT command control), but we do want this use case to work
without crashing. Solution: I made the largest prim pool the same as it is
with FAX_AND_DATA: 3 partitions of 1600 bytes.
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Sat, 27 Jun 2015 07:31:30 +0000 |
parents | 134c047c1269 |
children |
line wrap: on
line source
/* * This module implements the loadtool exit command, along with its * options for jump-reboot and Iota power-off. */ #include <stdio.h> #include <string.h> #include <strings.h> #include <stdlib.h> static void exit_bare() { exit(0); } static void exit_gta02_cutpwr() { #ifdef GTA0x_AP_BUILD set_gta_modem_power_ctrl(0); #endif exit(0); } static void exit_iotaoff() { static char *poweroff_argv[2] = {"poweroff", 0}; tpinterf_make_cmd(poweroff_argv); tpinterf_send_cmd(); exit(0); } static void exit_jump0() { static char *jump0_argv[3] = {"jump", "0", 0}; tpinterf_make_cmd(jump0_argv); tpinterf_send_cmd(); exit(0); } void (*default_exit)() = exit_bare; static struct kwtab { char *kw; void (*func)(); } exit_modes[] = { {"bare", exit_bare}, {"gta02-cutpwr", exit_gta02_cutpwr}, {"iota-off", exit_iotaoff}, {"jump0", exit_jump0}, {0, 0} }; cmd_exit(argc, argv) char **argv; { struct kwtab *tp; if (argc < 2) default_exit(); for (tp = exit_modes; tp->kw; tp++) if (!strcmp(tp->kw, argv[1])) break; if (!tp->func) { fprintf(stderr, "error: \"%s\" is not an understood exit mode\n", argv[1]); return(-1); } tp->func(); } /* called from hwparam.c config file parser */ void set_default_exit_mode(arg, filename_for_errs, lineno_for_errs) char *arg; char *filename_for_errs; int lineno_for_errs; { char *cp; struct kwtab *tp; while (isspace(*arg)) arg++; if (!*arg) { fprintf(stderr, "%s line %d: exit-mode setting requires an argument\n", filename_for_errs, lineno_for_errs); exit(1); } for (cp = arg; *cp && !isspace(*cp); cp++) ; *cp = '\0'; for (tp = exit_modes; tp->kw; tp++) if (!strcmp(tp->kw, arg)) break; if (!tp->func) { fprintf(stderr, "%s line %d: \"%s\" is not an understood exit mode\n", filename_for_errs, lineno_for_errs, arg); exit(1); } default_exit = tp->func; }