summaryrefslogtreecommitdiff
path: root/common/cmd_ubifs.c
Commit message (Collapse)AuthorAgeLines
* mtd, ubi, ubifs: resync with Linux-3.14Heiko Schocher2014-08-25-1/+1
| | | | | | | | | | | | | | | | | | | | resync ubi subsystem with linux: commit 455c6fdbd219161bd09b1165f11699d6d73de11c Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun Mar 30 20:40:15 2014 -0700 Linux 3.14 A nice side effect of this, is we introduce UBI Fastmap support to U-Boot. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Tom Rini <trini@ti.com> Cc: Marek Vasut <marex@denx.de> Cc: Sergey Lapin <slapin@ossfans.org> Cc: Scott Wood <scottwood@freescale.com> Cc: Joerg Krause <jkrause@posteo.de>
* common: commands: make commands staticJeroen Hofstee2014-07-18-4/+8
| | | | | | | Since most commands are not public, make them static. This prevents warnings that no common prototype is available. Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* ubifs: fix checkpatch warningKaricheri, Muralidharan2014-02-21-9/+0
| | | | | | | | Fix the following checkpatch warning:- WARNING: externs should be avoided in .c files Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
* cmd_ubifs: normalize 'file not found' errorsTim Harvey2013-11-08-4/+8
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.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>
* Convert cmd_usage() calls in common to use a return valueSimon Glass2012-03-06-5/+5
| | | | | | | | | Change all files in common/ to use CMD_RET_USAGE instead of calling cmd_usage() directly. I'm not completely sure about this patch since the code since impact is small (100 byte or so on ARM) and it might need splitting into smaller patches. But for now here it is. Signed-off-by: Simon Glass <sjg@chromium.org>
* UBI/UBIFS: Automatically unmount UBIFS volume upon UBI partition changeStefan Roese2010-12-03-6/+20
| | | | | | | Automatically unmount UBIFS partition when user changes the UBI device. Otherwise the following UBIFS commands will crash. Signed-off-by: Stefan Roese <sr@denx.de>
* UBIFS: Change "ubifs mount" to "ubifsmount" in ubifsls outputStefan Roese2010-12-03-1/+1
| | | | Signed-off-by: Stefan Roese <sr@denx.de>
* UBIFS: Add ubifsumount command to unmount an active volumeStefan Roese2010-12-03-0/+31
| | | | | | | This new ubifsumount command allows the user to unmount a previously mounted UBIFS volume. Signed-off-by: Stefan Roese <sr@denx.de>
* various cmd_* files: fixed layout a little bitFrans Meulenbroeks2010-08-09-2/+4
| | | | | | | | | | Most of the files have U_BOOT_CMD on a separate line, but a few didn't and had the first line on the same line as U_BOOT_CMD. This changes these files by adding a line break and a tab Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
* cmd_usage(): simplify return code handlingWolfgang Denk2010-07-24-16/+9
| | | | | | | | | | | | | | | | Lots of code use this construct: cmd_usage(cmdtp); return 1; Change cmd_usage() let it return 1 - then we can replace all these ocurrances by return cmd_usage(cmdtp); This fixes a few places with incorrect return code handling, too. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Command improvements for ubifsSimon Kagstrom2009-07-09-5/+21
| | | | | | | | | Check that an argument is passed to ubifsmount and that addresses and sizes are actually numbers for ubifsload. Also improve the instructions a bit. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Stefan Roese <sr@denx.de>
* General help message cleanupWolfgang Denk2009-06-12-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of the help messages were not really helpful; for example, many commands that take no arguments would not print a correct synopsis line, but "No additional help available." which is not exactly wrong, but not helpful either. Commit ``Make "usage" messages more helpful.'' changed this partially. But it also became clear that lots of "Usage" and "Help" messages (fields "usage" and "help" in struct cmd_tbl_s respective) were actually redundant. This patch cleans this up - for example: Before: => help dtt dtt - Digital Thermometer and Thermostat Usage: dtt - Read temperature from digital thermometer and thermostat. After: => help dtt dtt - Read temperature from Digital Thermometer and Thermostat Usage: dtt Signed-off-by: Wolfgang Denk <wd@denx.de>
* more command usage cleanupMike Frysinger2009-04-04-3/+3
| | | | | | Fix up a few dangling commands like in "Command usage cleanup" commit. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* UBIFS: Add UBIFS commandsStefan Roese2009-03-20-0/+132
This patchset adds these UBIFS related commands: - ubifsmount Mount an UBIFS volume - ubifsls List a directory of the mounted UBIFS volume - ubifsload Load a file from the mounted UBIFS volume to memory Signed-off-by: Stefan Roese <sr@denx.de>