summaryrefslogtreecommitdiff
path: root/fs/yaffs2
AgeCommit message (Collapse)Author
2011-12-10fs/yaffs2/yaffs_guts.c: Fix GCC 4.6 compile warning (and bug)Wolfgang Denk
Fix: yaffs_guts.c: In function 'yaffs_GarbageCollectBlock': yaffs_guts.c:2761:6: warning: variable 'retVal' set but not used [-Wunused-but-set-variable] Here GCC actually detected a bug. The code was always returning OK instead of the previously set retrun code. Fix that. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: William Juul <wiljuul@cisco.com> Cc: Scott Wood <scottwood@freescale.com> Acked-by: William Juul <wiljuul@cisco.com>
2011-11-16Fix warnings in yaffsSimon Glass
Sorry if this is already fixed somewhere - I could not find it. This fixes the warnings show below. yaffs_tagscompat.c: In function 'yaffs_TagsCompatabilityReadChunkWithTagsFromNAND': yaffs_tagscompat.c:151: warning: dereferencing pointer 'tu' does break strict-aliasing rules yaffs_tagscompat.c:150: warning: dereferencing pointer 'tu' does break strict-aliasing rules yaffs_tagscompat.c:149: warning: dereferencing pointer 'tu' does break strict-aliasing rules yaffs_tagscompat.c:148: warning: dereferencing pointer 'tu' does break strict-aliasing rules yaffs_tagscompat.c:147: warning: dereferencing pointer 'tu' does break strict-aliasing rules yaffs_tagscompat.c:146: warning: dereferencing pointer 'tu' does break strict-aliasing rules yaffs_tagscompat.c:145: warning: dereferencing pointer 'tu' does break strict-aliasing rules yaffs_tagscompat.c:144: warning: dereferencing pointer 'tu' does break strict-aliasing rules yaffs_tagscompat.c:141: note: initialized from here Signed-off-by: Simon Glass <sjg@chromium.org>
2011-11-16fs/yaffs2/yaffs_guts.c: Fix some GCC 4.6 warningsAnatolij Gustschin
Fix: yaffs_guts.c: In function 'yaffs_CheckChunkErased': yaffs_guts.c:854:6: warning: variable 'result' set but not used yaffs_guts.c: In function 'yaffs_UpdateObjectHeader': yaffs_guts.c:3463:6: warning: variable 'result' set but not used yaffs_guts.c: In function 'yaffs_GrabChunkCache': yaffs_guts.c:3774:6: warning: variable 'pushout' set but not used yaffs_guts.c: In function 'yaffs_Scan': yaffs_guts.c:5237:6: warning: variable 'result' set but not used yaffs_guts.c: In function 'yaffs_CheckObjectDetailsLoaded': yaffs_guts.c:5748:6: warning: variable 'alloc_failed' set but not used yaffs_guts.c:5747:6: warning: variable 'result' set but not used yaffs_guts.c: In function 'yaffs_ScanBackwards': yaffs_guts.c:5808:6: warning: variable 'deleted' set but not used yaffs_guts.c:5806:6: warning: variable 'result' set but not used yaffs_guts.c: In function 'yaffs_GetObjectName': yaffs_guts.c:6657:7: warning: variable 'result' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-10-27GCC4.6: Squash warnings in yaffs_guts.cMarek Vasut
yaffs_guts.c: In function 'yaffs_ReadDataFromFile': yaffs_guts.c:4461:8: warning: 'chunk' may be used uninitialized in this function yaffs_guts.c:4462:8: warning: 'start' may be used uninitialized in this function yaffs_guts.c: In function 'yaffs_WriteDataToFile': yaffs_guts.c:4581:8: warning: 'chunk' may be used uninitialized in this function yaffs_guts.c:4582:8: warning: 'start' may be used uninitialized in this function yaffs_guts.c: In function 'yaffs_ResizeFile': yaffs_guts.c:4816:8: warning: 'newSizeOfPartialChunk' may be used uninitialized in this function yaffs_guts.c:4817:8: warning: 'newFullChunks' may be used uninitialized in this function Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org> Cc: William Juul <william.juul@tandberg.com>
2011-10-27GCC4.6: Drop dead code from yaffs_guts.cMarek Vasut
Drop yaffs_DeleteWorker(): yaffs_guts.c:1556:12: warning: 'yaffs_DeleteWorker' defined but not used Drop yaffs_VerifyTnodeWorker(): yaffs_guts.c:600:12: warning: 'yaffs_VerifyTnodeWorker' defined but not used Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org>
2011-10-15punt unused clean/distclean targetsMike Frysinger
The top level Makefile does not do any recursion into subdirs when cleaning, so these clean/distclean targets in random arch/board dirs never get used. Punt them all. MAKEALL didn't report any errors related to this that I could see. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-09-10YAFFS2: fs/yaffs2/yaffs_guts.c - fix build warningsWolfgang Denk
Fix these: yaffs_guts.c: In function 'yaffs_ReadDataFromFile': yaffs_guts.c:4622: warning: pointer targets in passing argument 3 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c:4622: warning: pointer targets in passing argument 4 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c: In function 'yaffs_WriteDataToFile': yaffs_guts.c:4745: warning: pointer targets in passing argument 3 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c:4745: warning: pointer targets in passing argument 4 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c: In function 'yaffs_ResizeFile': yaffs_guts.c:4968: warning: pointer targets in passing argument 3 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c:4968: warning: pointer targets in passing argument 4 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c: In function 'yaffs_GutsInitialise': yaffs_guts.c:7235: warning: assignment from incompatible pointer type yaffs_guts.c: In function 'yaffs_CreateNewObject': yaffs_guts.c:2143: warning: 'tn' may be used uninitialized in this function yaffs_guts.c: In function 'yaffs_MknodObject': yaffs_guts.c:2258: warning: 'str' may be used uninitialized in this function Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-09-10YAFFS2: fs/yaffs2/yaffs_guts.c - fix build warningsWolfgang Denk
Fix these: yaffs_guts.c: At top level: yaffs_guts.c:400: warning: 'yaffs_SkipFullVerification' defined but not used Testing shows no changes of the image sizes. Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-09-10YAFFS2: fs/yaffs2/yaffs_nand.[hc] - fix build warningsWolfgang Denk
Fix these: yaffs_guts.c: In function 'yaffs_Scan': yaffs_guts.c:5436: warning: pointer targets in passing argument 4 of 'yaffs_QueryInitialBlockState' differ in signedness yaffs_guts.c: In function 'yaffs_ScanBackwards': yaffs_guts.c:6017: warning: pointer targets in passing argument 4 of 'yaffs_QueryInitialBlockState' differ in signedness yaffs_nand.c: In function 'yaffs_QueryInitialBlockState': yaffs_nand.c:109: warning: pointer targets in passing argument 4 of 'dev->queryNANDBlock' differ in signedness yaffs_nand.c:113: warning: pointer targets in passing argument 4 of 'yaffs_TagsCompatabilityQueryNANDBlock' differ in signedness Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-09-10YAFFS2: fs/yaffs2/Makefile - fix build warningsWolfgang Denk
Drop the "-DNO_Y_INLINE" setting to fix these: yaffs_guts.h:806: warning: 'yaffs_GetBlockInfo' defined but not used Impact on image size is negligible - for the VCMA9 board the text segment size grew from 496353 to 496357 bytes (i. e. 0.0008%); total image size even remained constant. Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-09-10YAFFS2: fs/yaffs2/yaffscfg.c - fix build warningsWolfgang Denk
Fix these: yaffscfg.c: In function 'cmd_yaffs_mread_file': yaffscfg.c:316: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'char *' yaffscfg.c: In function 'cmd_yaffs_ls': yaffscfg.c:371: warning: format '%7d' expects type 'int', but argument 3 has type 'off_t' Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-11-17Switch from archive libraries to partial linkingSebastien Carlier
Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
2008-08-21Make the YAFFS filesystem workRemy Bohmer
Recently the YAFFS filesystem support has been added to U-boot. However, just enabling CONFIG_YAFFS2 is not enough to get it working. ymount will generate an exception (when dereferencing mtd->readoob()), because the genericDevice is a null pointer. Further, a lot of logging is produced while using YAFFS fs, so logging should also be disabled. Both issues are solved by this patch. With this patch and CONFIG_YAFFS2 enabled, I get a readable filesystem in U-boot, as well as in Linux. Tested on a Atmel AT91SAM9261EK board. Signed-off-by: Remy Bohmer <linux@bohmer.net> Acked-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-14Coding Style cleanup, update CHANGELOGWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-12moving files from yaffs2/direct/ to yaffs2/ and deleting all symlinksWilliam Juul
Signed-off-by: William Juul <william.juul@tandberg.com>
2008-08-12Clean out unneeded filesWilliam Juul
Signed-off-by: William Juul <william.juul@tandberg.com>
2008-08-12Create symlinks from yaffs2/direct to yaffs2William Juul
Signed-off-by: William Juul <william.juul@tandberg.com>
2008-08-12Incorporate yaffs2 into U-bootWilliam Juul
To use YAFFS2 define CONFIG_YAFFS2 Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12YAFFS2 importWilliam Juul
Direct import of yaffs as a tarball as of 20071113 from their public CVS-web at http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs2/ The code can also be imported on the command line with: export CVSROOT=:pserver:anonymous@cvs.aleph1.co.uk:/home/aleph1/cvs cvs logon (Hit return when asked for a password) cvs checkout yaffs2 Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Stig Olsen <stig.olsen@tandberg.com>