9
0
Fork 0
barebox/commands
Krzysztof Halasa c5baa0edc4 Fix error handling with malloc, memalign etc. Introduce xmemalign().
The idea is to panic() when there is no memory available for normal
operation. Exception: code which can consume arbitrary amount of RAM
(example: files allocated in ramfs) must report error instead of panic().

This patch also fixes code which didn't check for NULL from malloc() etc.

Usage: malloc(), memalign() return NULL when out of RAM.
xmalloc(), xmemalign() always return non-NULL or panic().

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-07 10:21:22 +01:00
..
Kconfig LED: Add trigger command 2010-12-20 09:57:36 +01:00
Makefile LED: Add trigger command 2010-12-20 09:57:36 +01:00
bmp.c doc: add documentation for 'bmp' 2010-11-01 16:23:08 +01:00
bootm.c Remove m68k support 2010-11-17 09:18:25 +01:00
cat.c doc: unify documentation for 'cat' 2010-11-01 16:23:08 +01:00
cd.c doc: unify documentation for 'cd' 2010-11-01 16:23:08 +01:00
clear.c doc: add documentation for 'clear' 2010-11-01 16:23:08 +01:00
cp.c doc: unify documentation for 'cp' 2010-11-01 16:23:09 +01:00
crc.c Cosmetic fixes, including format attributes for printf() and friends. 2010-12-21 09:02:40 +01:00
dfu.c doc: add documentation for 'dfu' 2010-11-01 16:23:08 +01:00
echo.c doc: add documentation for 'echo' 2010-11-01 16:23:08 +01:00
edit.c Fix error handling with malloc, memalign etc. Introduce xmemalign(). 2011-01-07 10:21:22 +01:00
exec.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
export.c doc: unify documentation for 'export' 2010-11-01 16:23:09 +01:00
false.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
flash.c Cosmetic fixes, including format attributes for printf() and friends. 2010-12-21 09:02:40 +01:00
go.c Cosmetic fixes, including format attributes for printf() and friends. 2010-12-21 09:02:40 +01:00
gpio.c Fix a typo in the GPIO doc 2010-12-21 16:03:40 +01:00
help.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
i2c.c commands: add i2c commands 2010-05-26 10:34:58 +02:00
insmod.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
led.c LED: Add led command 2010-12-20 09:57:36 +01:00
linux16.c linux16: fix cmd_tbl_t as struct command 2010-11-17 12:14:55 +08:00
loadb.c Cosmetic fixes, including format attributes for printf() and friends. 2010-12-21 09:02:40 +01:00
loadenv.c doc: unify documentation for 'loadenv' 2010-11-02 14:07:32 +01:00
loads.c remove strange flush_cache functions 2010-10-21 22:21:25 +02:00
login.c add login support 2010-09-20 08:57:22 +02:00
ls.c Cosmetic fixes, including format attributes for printf() and friends. 2010-12-21 09:02:40 +01:00
lsmod.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
mem.c commands/mem.c: make locally used function static 2010-10-21 22:21:25 +02:00
meminfo.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
memtest.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
menu.c Cosmetic fixes, including format attributes for printf() and friends. 2010-12-21 09:02:40 +01:00
mkdir.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
mount.c doc: unify documentation for 'mount' 2010-11-02 14:07:32 +01:00
nand.c Make some help comments less confusing 2010-03-18 08:11:06 +01:00
net.c net: remove old network stack 2010-06-17 08:28:25 +02:00
partition.c doc: unify documentation for 'delpart' 2010-11-01 16:23:09 +01:00
passwd.c add passwd command 2010-09-20 08:57:22 +02:00
printenv.c doc: unify documentation for 'printenv' 2010-11-02 14:07:32 +01:00
pwd.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
readline.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
reginfo.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
reset.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
rm.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
rmdir.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
saveenv.c doc: unify documentation for 'saveenv' 2010-11-02 17:55:16 +01:00
setenv.c doc: unify documentation for 'setenv' 2010-11-02 17:55:17 +01:00
sleep.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
test.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
timeout.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
trigger.c LED: Add trigger command 2010-12-20 09:57:36 +01:00
true.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
ubi.c Add UBI commands: ubiattach, ubidetach, ubimkvol, ubirmvol 2010-07-05 15:07:51 +02:00
umount.c remove typedef cmd_tbl_t and replace it with struct command 2010-02-01 17:25:32 +01:00
unlzo.c add unlzo support 2010-03-30 14:14:58 +02:00
version.c version_string: sparse fixes 2010-10-21 22:21:24 +02:00
xyzModem.c xyzModem.c: fix 'dummy' is used uninitialized in this function warning 2010-12-21 10:23:41 +01:00