u-boot-2016/common
Stefan Roese 7f5d8a4d8e UBI: Fix error code handling in ubi commands
Some ubi commands returned negative error codes, resulting in
the following error message on the prompt:

"exit not allowed from main input shell."

Negative error codes are not allowed.

This patch now changes the UBI code to return positive error codes.
Additionally "better" error codes are used, for example "ENOMEM" when
no memory is available for the UBI volume creation any more.

Also the output of some commands is enhanced:

Before:

=> ubi read 100000 testvol 100000
Volume testvol found at volume id 0
read 1048576 bytes from volume 0 to 100000(buf address)
=> ubi write 100000 testvol 1000
Volume testvol found at volume id 0

After:

=> ubi read 100000 testvol 100000
Read 1048576 bytes from volume testvol to 00100000
=> ubi write 100000 testvol 1000
4096 bytes written to volume testvol

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
2011-03-21 10:02:16 +01:00
..
bedbug.c
cmd_ambapp.c
cmd_bdinfo.c
cmd_bedbug.c
cmd_bmp.c cmd_bmp.c: message about compressed formats is debug info only. 2011-02-09 21:32:20 +01:00
cmd_boot.c
cmd_bootldr.c
cmd_bootm.c
cmd_cache.c
cmd_console.c
cmd_cplbinfo.c
cmd_cramfs.c
cmd_dataflash_mmc_mux.c
cmd_date.c
cmd_dcr.c
cmd_df.c
cmd_diag.c
cmd_display.c
cmd_dtt.c
cmd_echo.c
cmd_eeprom.c
cmd_elf.c
cmd_exit.c
cmd_ext2.c
cmd_fat.c
cmd_fdc.c
cmd_fdos.c
cmd_fdt.c
cmd_flash.c Fix build warnings in cmd_flash.c 2011-02-19 20:32:38 +01:00
cmd_fpga.c
cmd_help.c
cmd_i2c.c
cmd_ide.c cmd_ide: Fix an unused CONFIG_AU1X00 symbol to work as intended 2011-02-05 20:06:03 +09:00
cmd_immap.c
cmd_irq.c
cmd_itest.c itest: fix result of string compares 2011-02-15 21:45:55 +01:00
cmd_jffs2.c cmd_jffs2: Fix get_part_sector_size_nor() overflow bug 2011-01-19 00:04:43 +01:00
cmd_license.c
cmd_load.c
cmd_log.c
cmd_mac.c
cmd_mem.c unzip: return uncompressed size in `filesize', and print it. 2011-02-15 21:46:39 +01:00
cmd_mfsl.c
cmd_mgdisk.c
cmd_mii.c
cmd_misc.c
cmd_mmc.c
cmd_mp.c
cmd_mtdparts.c
cmd_nand.c NAND: add the ability to directly write yaffs image 2011-01-12 17:13:10 -06:00
cmd_net.c
cmd_nvedit.c
cmd_onenand.c
cmd_otp.c
cmd_pci.c
cmd_pcmcia.c
cmd_portio.c
cmd_reginfo.c
cmd_reiser.c
cmd_sata.c
cmd_scsi.c
cmd_setexpr.c
cmd_sf.c
cmd_source.c
cmd_spi.c
cmd_spibootldr.c
cmd_strings.c
cmd_terminal.c
cmd_test.c
cmd_tsi148.c
cmd_ubi.c UBI: Fix error code handling in ubi commands 2011-03-21 10:02:16 +01:00
cmd_ubifs.c
cmd_universe.c
cmd_usb.c Add USB host ethernet adapter support 2011-02-19 20:32:36 +01:00
cmd_version.c Print compiler and linker version with the version command 2011-02-02 21:56:39 +01:00
cmd_vfd.c
cmd_ximg.c
cmd_yaffs2.c
command.c
console.c
ddr_spd.c
dlmalloc.c
dlmalloc.src
env_common.c
env_dataflash.c
env_eeprom.c
env_embedded.c
env_flash.c
env_mgdisk.c
env_mmc.c
env_nand.c NAND: env: remember the flags used in the previous environment 2011-02-08 15:25:02 -06:00
env_nowhere.c
env_nvram.c
env_onenand.c
env_sf.c
exports.c
fdt_support.c
flash.c
hush.c
hwconfig.c Minor Coding Style Cleanup. 2011-02-02 22:36:10 +01:00
image.c
iomux.c
kallsyms.c
kgdb.c
kgdb_stubs.c
lcd.c lcd: align fb writing address for horizontal display offset 2011-01-27 00:20:59 +01:00
lynxkdi.c
main.c
Makefile
memsize.c
miiphyutil.c
modem.c
s_record.c
serial.c serial: Add Tegra2 serial port support 2011-02-21 08:30:55 +01:00
stdio.c
system_map.c
update.c
usb.c Add USB host ethernet adapter support 2011-02-19 20:32:36 +01:00
usb_kbd.c
usb_storage.c
xyzModem.c