summaryrefslogtreecommitdiffstats
path: root/common/cmd_ubifs.c
Commit message (Collapse)AuthorAgeFilesLines
* UBI/UBIFS: Automatically unmount UBIFS volume upon UBI partition changeStefan Roese2010-12-031-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-031-1/+1
| | | | Signed-off-by: Stefan Roese <sr@denx.de>
* UBIFS: Add ubifsumount command to unmount an active volumeStefan Roese2010-12-031-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-091-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-241-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-041-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-091-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-121-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-041-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-201-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>
OpenPOWER on IntegriCloud