summaryrefslogtreecommitdiff
path: root/fs/ubifs/ubifs.c
AgeCommit message (Collapse)Author
2013-03-01fs: Use new numeric setenv functionsSimon Glass
Use setenv_ulong(), setenv_hex() and setenv_addr() in fs/ Signed-off-by: Simon Glass <sjg@chromium.org>
2012-09-10ubifs: Fix ubifsload when using ZLIBVeli-Pekka Peltola
Using ZLIB compression with UBIFS fails if last data node is not a size of UBIFS_BLOCK_SIZE (4096 bytes). Easiest way to test this is trying to read a file smaller than 4k: => ubifsload 41000000 /etc/fstab Loading file '/etc/fstab' to addr 0x41000000 with size 704 (0x000002c0)... UBIFS error (pid 0): read_block: bad data node (block 0, inode 2506) UBIFS error (pid 0): do_readpage: cannot read page 0 of inode 2506, error -22 Error reading file '/etc/fstab' /etc/fstab not found! exit not allowed from main input shell. => With this patch: => ubifsload 41000000 /etc/fstab Loading file '/etc/fstab' to addr 0x41000000 with size 704 (0x000002c0)... Done => Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> Cc: kmpark@infradead.org Tested-by: Andreas Bießmann <andreas.devel@googlemail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2012-09-03ubifs: Fix memory leak in ubifs_finddirStefan Roese
This patch fixes a memory leak in ubifs_finddir(). Signed-off-by: Stefan Roese <sr@denx.de> Cc: dev.ma.dma@gmail.com
2011-09-09UBIFS: fix warning: format '%lX' expects type 'long unsigned int'Wolfgang Denk
Commit 46d7274 "UBIFS: Change ubifsload to set the filesize variable" introduced the follwing compiler warning: ubifs.c: In function 'ubifs_load': ubifs.c:742: warning: format '%lX' expects type 'long unsigned int', but argument 3 has type 'u32' Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Bastian Ruppert <Bastian.Ruppert@Sewerin.de>
2011-09-09UBIFS: Change ubifsload to set the filesize variableBastian Ruppert
This is the same behaviour like tftp or fatload command. Signed-off-by: Bastian Ruppert <Bastian.Ruppert@Sewerin.de> CC: kmpark@infradead.org Acked-by: Detlev Zundel <dzu@denx.de>
2011-08-19ubifs: Fix bad free() sequence in ubifs_finddir()Wolfgang Denk
Free private_data member element before freeing file structure. This was causing malloc to crash. Also remove unnecessary variable assigments as file structure gets free'd as well. Signed-off-by: Rod Boyce <uboot@teamboyce.co.uk> Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2010-12-03ubifs.c: BUG: Error following linksRicardo Ribalda Delgado
The link_name variable is declared inside the if block and it is used outside it through the name pointer. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2010-12-03UBIFS: Change ubifsload to not read beyond the requested sizeStefan Roese
Until now ubifsload pads the destination with 0 up to a multiple of UBIFS_BLOCK_SIZE (4KiB) while reading a file to memory. This patch changes this behaviour to only read to the requested length. This is either the file length or the length/size provided as parameter to the ubifsload command. Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-29Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOCWolfgang Denk
By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2009-12-08common: delete CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOULHeiko Schocher
There is more and more usage of printing 64bit values, so enable this feature generally, and delete the CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL defines. Signed-off-by: Heiko Schocher <hs@denx.de>
2009-10-03Conditionally perform common relocation fixupsPeter Tyser
Add #ifdefs where necessary to not perform relocation fixups. This allows boards/architectures which support relocation to trim a decent chunk of code. Note that this patch doesn't add #ifdefs to architecture-specific code which does not support relocation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-09-28ubifs: Correct dereferencing of files-after-symlinksSimon Kagstrom
Files in directories which are symlinked to were not dereferenced correctly in last commit. E.g., with a symlink /boot/lnk -> /boot/real_dir loading /boot/lnk/uImage will fail. This patch fixes that by simply seeing to it that the target base directory has a slash after it. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Stefan Roese <sr@denx.de>
2009-09-23ubifs: Add support for looking up directory and relative symlinksSimon Kagstrom
This patch adds support for resolving symlinks to directories as well as relative symlinks. Symlinks are now always resolved during file lookup, so the load stage no longer needs to special-case them. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Stefan Roese <sr@denx.de>
2009-06-09ubifs: fix small error path mismatchDaniel Mack
In do_readpage(), don't free 'dn' if its allocation failed. Signed-off-by: Daniel Mack <daniel@caiaq.de>
2009-04-30ubifs: BUG: Blocks commpressed with zlibRicardo Ribalda Delgado
Blocks compressed with zlib dont have the full gzip header. Without this patch, block compressed with zlib cannot be readed! Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
2009-04-27ubifs: BUG realpath string must be ended with NULLRicardo Ribalda Delgado
If the memory used to copy the link_make is "dirty" the string wont be ended with NULL, throwing out multiple memory bugs. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es> Acked-by: Stefan Roese <sr@denx.de>
2009-03-20UBIFS: Missing offset relocation for compressor 'none'Michael Lawnick
On systems where U-Boot is linked to another address than it really lays (e.g. backup image), calls via function pointers must be fixed with a '+= gd->reloc_off'. This was not done for none_compr in ubifs_compressors_init() what leads to system crash on ubifsmount command. Signed-off-by: Michael Lawnick <ml.lawnick@gmx.de> Acked-by: Stefan Roese <sr@denx.de>
2009-03-20UBIFS: Implement read-only UBIFS support in U-BootStefan Roese
The U-Boot UBIFS implementation is largely a direct copy from the current Linux version (2.6.29-rc6). As already done in the UBI version we have an "abstraction layer" to redefine or remove some OS calls (e.g. mutex_lock() ...). This makes it possible to use the original Linux code with very little changes. And by this we can better update to later Linux versions. I removed some of the Linux features that are not used in the U-Boot version (e.g. garbage-collection, write support). Signed-off-by: Stefan Roese <sr@denx.de> CC: Artem Bityutskiy <dedekind@infradead.org> CC: Adrian Hunter <ext-Adrian.Hunter@nokia.com>