summaryrefslogtreecommitdiff
path: root/api/api.c
Commit message (Collapse)AuthorAgeLines
* Fix FreeBSD loader API so that it works on both 32-bit and 64-bit targets.Stanislav Galabov2016-05-21-29/+29
| | | | | | Specifically tested on MIPS under QEMU (works with all combination of bit-ness and endian-ness) Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
* dm: Drop the block_dev_desc_t typedefSimon Glass2016-03-14-1/+1
| | | | | | | | | Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* api: Export API structure address as an environment variableStanislav Galabov2016-03-08-0/+1
| | | | | | | | | | This patch makes the U-Boot api export its structure address as an environment variable, so it can be used to directly hint FreeBSD's loader of api's location. The relevant FreeBSD loader change is currently under review at: https://reviews.freebsd.org/D5492 Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-18/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* api: export LCD device to external appsChe-Liang Chiou2011-11-15-0/+47
| | | | | | | | | | This patch exports LCD info-query and bitmap-rendering functions to external apps. This patch is tested on a Seaboard. Because the LCD driver is not yet upstreamed, the test was done in a local downstream repo. Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
* do_reset: unify duplicate prototypesMike Frysinger2010-11-28-3/+0
| | | | | | | The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* api: remove un-needed ifdef CONFIG_API already handle by the MakefileJean-Christophe PLAGNIOL-VILLARD2009-05-15-5/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rename CFG_ENV macros to CONFIG_ENVJean-Christophe PLAGNIOL-VILLARD2008-09-10-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* environment: cleanup prototype declarations of env functions.Wolfgang Denk2008-05-14-2/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Revert "Change env_get_char from a global function ptr to a function."Wolfgang Denk2008-05-12-0/+1
| | | | | This reverts commit c0559be371b2a64b1a817088c3308688e2182f93 which is known to break booting from dataflash and NAND.
* API: remove duplicate syscall checkJean-Christophe PLAGNIOL-VILLARD2008-05-12-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Change env_get_char from a global function ptr to a function.Joakim Tjernlund2008-04-17-1/+0
| | | | | | This avoids an early global data reference. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
* Coding Style cleanup; update CHANGELOGWolfgang Denk2008-01-10-6/+6
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* API for external applications.Rafal Jaworowski2008-01-09-0/+670
This is an API for external (standalone) applications running on top of U-Boot, and is meant to be more extensible and robust than the existing jumptable mechanism. It is similar to UNIX syscall approach. See api/README for more details. Included is the demo application using this new framework (api_examples). Please note this is still an experimental feature, and is turned off by default. Signed-off-by: Rafal Jaworowski <raj@semihalf.com>