- 05 1月, 2012 1 次提交
-
-
由 Sergei Shtylyov 提交于
The VFAT short alias checksum read from a long file name is only overwritten when another long file name appears in a directory list. Until then it renders short file names invisible that have the same checksum. Reset the checksum on first match. Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: NMartin Mueller <martin.mueller5@de.bosch.com>
-
- 18 12月, 2011 1 次提交
-
-
由 Andreas Bießmann 提交于
The DIRENTSPERBLOCK utilizes sizeof() which will return a size_t which has no fixed size. Therefor use correct length modifer for printf() statement to prevent compiler warnings. This patch fixes following warning: ---8<--- fat.c: In function 'do_fat_read': fat.c:879: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int' --->8--- Signed-off-by: NAndreas Bießmann <biessmann@corscience.de> cc: Mike Frysinger <vapier@gentoo.org> cc: Thomas Chou <thomas@wytron.com.tw> cc: rjones@nexus-tech.net cc: kharris@nexus-tech.net Acked-by: NMike Frysinger <vapier@gentoo.org>
-
- 08 11月, 2011 1 次提交
-
-
由 Wolfgang Denk 提交于
Fix: fat.c: In function 'fat_register_device': fat.c:74:19: warning: variable 'info' set but not used [-Wunused-but-set-variable] Signed-off-by: NWolfgang Denk <wd@denx.de>
-
- 28 10月, 2011 2 次提交
-
-
由 J. Vijayanand 提交于
ATTR_VFAT condition requires multiple bits to be set but the present condition checking in do_fat_read() & get_dentfromdir() ends up passing on even a single bit being set. Signed-off-by: NJ. Vijayanand <vijayanand.jayaraman@in.bosch.com> Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
-
由 Wolfgang Denk 提交于
Commit c30a15e5 "FAT: Add FAT write feature" introduced a compiler warning. Fix this. Signed-off-by: NWolfgang Denk <wd@denx.de> Cc: Donggeun Kim <dg77.kim@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com>
-
- 27 10月, 2011 1 次提交
-
-
由 Donggeun Kim 提交于
In some cases, saving data in RAM as a file with FAT format is required. This patch allows the file to be written in FAT formatted partition. The usage is similar with reading a file. First, fat_register_device function is called before file_fat_write function in order to set target partition. Then, file_fat_write function is invoked with desired file name, start ram address for writing data, and file size. Signed-off-by: NDonggeun Kim <dg77.kim@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
-
- 02 10月, 2011 4 次提交
-
-
由 Sergei Shtylyov 提交于
Currently in do_fat_read() when reading FAT sectors, we have to divide down LINEAR_PREFETCH_SIZE by the sector size, whereas it's defined as 2 sectors worth of bytes. In order to avoid redundant multiplication/division, introduce #define PREFETCH_BLOCKS instead of #define LINEAR_PREFETCH_SIZE. Signed-off-by: NSergei Shtylyov <sshtylyov@mvista.com>
-
由 Sergei Shtylyov 提交于
The root directory cluster field only exists in a FAT32 boot sector, so the 'root_cluster' variable in do_fat_read() contains garbage in case of FAT12/16. Make it contain 0 instead as this is what is passed to get_vfatname() in that case anyway. Signed-off-by: NSergei Shtylyov <sshtylyov@mvista.com>
-
由 Sergei Shtylyov 提交于
The code multiples the FAT size in sectors by the sector size and then tries to compare that to the number of sectors in the 'getsize' variable. While fixing this, also change the initial value of 'getsize' as the division of FATBUFSIZE by the sector size gets us FATBUFBLOCKS. Signed-off-by: NSergei Shtylyov <sshtylyov@mvista.com>
-
由 Sergei Shtylyov 提交于
Apple iPod nanos have sector sizes of 2 or 4 KiB, which crashes U-Boot when it tries to read the boot sector into 512-byte buffer situated on stack. Make the FAT code indifferent to the sector size. Signed-off-by: NSergei Shtylyov <sshtylyov@mvista.com>
-
- 02 4月, 2011 1 次提交
-
-
由 Erik Hansen 提交于
Fat directory handling didn't check reaching the end of the root directory. It relied on a stop condition based on a directory entry with a name starting with a '\0' character. This check in itself is wrong ('\0' indicates free entry, not end_of_directory) but outside the scope of this fix. For FAT32, the end of the rootdir is reached when the end of the cluster chain is reached. The code didn't check this condition and started to read an incorrect cluster. This caused a subsequent read request of a sector outside the range of the usb stick in use. On its turn, the usb stick protested with a stall handshake. Both FAT32 and non-FAT32 (FAT16/FAT12) end or rootdir checks have been put in. Signed-off-by: NErik Hansen <erik@makarta.com>
-
- 20 10月, 2010 1 次提交
-
-
由 Stefano Babic 提交于
Last commit 3831530da was intended "explicitly specify FAT12/16 root directory parsing buffer size, instead of relying on cluster size". Howver, the underlying function requires the size of the buffer in blocks, not in bytes, and instead of passing a double sector size a request for 1024 blocks is sent. This generates a buffer overflow with overwriting of other structure (in the case seen, USB structures were overwritten). Signed-off-by: NStefano Babic <sbabic@denx.de> CC: Mikhail Zolotaryov <lebon@lebon.org.ua>
-
- 13 10月, 2010 1 次提交
-
-
由 Mikhail Zolotaryov 提交于
The U-Boot code has the following bugs related to the processing of Long File Name (LFN) entries scattered across several clusters/sectors : 1) get_vfatname() function is designed to gather scattered LFN entries by cluster chain processing - that doesn't work for FAT12/16 root directory. In other words, the function expects the following input data: 1.1) FAT32 directory (which is cluster chain based); OR 1.2) FAT12/16 non-root directory (which is also cluster chain based); OR 1.3) FAT12/16 root directory (allocated as contiguous sectors area), but all necessary information MUST be within the input buffer of filesystem cluster size (thus cluster-chain jump is never initiated). In order to accomplish the last condition, root directory parsing code in do_fat_read() uses the following trick: read-out cluster-size block, process only first sector (512 bytes), then shift 512 forward, read-out cluster-size block and so on. This works great unless cluster size is equal to 512 bytes (in a case you have a small partition), or long file name entries are scattered across three sectors, see 4) for details. 2) Despite of the fact that get_vfatname() supports FAT32 root directory browsing, do_fat_read() function doesn't send current cluster number correctly, so root directory look-up doesn't work correctly. 3) get_vfatname() doesn't gather scattered entries correctly also is the case when all LFN entries are located at the end of the source cluster, but real directory entry (which must be returned) is at the only beginning of the next one. No error detected, the resulting directory entry returned contains a semi-random information (wrong size, wrong start cluster number and so on) i.e. the entry is not accessible. 4) LFN (VFAT) allows up to 20 entries (slots) each containing 26 bytes (13 UTF-16 code units) to represent a single long file name i.e. up to 520 bytes. U-Boot allocates 256 bytes buffer instead, i.e. 10 or more LFN slots record may cause buffer overflow / memory corruption. Also, it's worth to mention that 20+1 slots occupy 672 bytes space which may take more than one cluster of 512 bytes (medium-size FAT32 or small FAT16 partition) - get_vfatname() function doesn't support such case as well. The patch attached fixes these problems in the following way: - keep using 256 bytes buffer for a long file name, but safely prevent a possible buffer overflow (skip LFN processing, if it contains 10 or more slots). - explicitly specify FAT12/16 root directory parsing buffer size, instead of relying on cluster size. The value used is a double sector size (to store current sector and the next one). This fixes the first problem and increases performance on big FAT12/16 partitions; - send current cluster number (FAT32) to get_vfatname() during root directory processing; - use LFN counter to seek the real directory entry in get_vfatname() - fixes the third problem; - skip deleted entries in the root directory (to prevent bogus buffer overflow detection and LFN counter steps). Note: it's not advised to split up the patch, because a separate part may operate incorrectly. Signed-off-by: NMikhail Zolotaryov <lebon@lebon.org.ua>
-
- 25 7月, 2010 3 次提交
-
-
由 Wolfgang Denk 提交于
- reformat - throw out macros like FAT_DPRINT and FAT_DPRINT - remove dead code Signed-off-by: NWolfgang Denk <wd@denx.de>
-
由 Wolfgang Denk 提交于
On FAT32, instead of fetching the cluster numbers from the FAT, the code assumed (incorrectly) that the clusters for the root directory were allocated contiguously. In the result, only the first cluster could be accessed. At the typical cluster size of 8 sectors this caused all accesses to files after the first 128 entries to fail - "fatls" would terminate after 128 files (usually displaying a bogus file name, occasionally even crashing the system), and "fatload" would fail to find any files that were not in the first directory cluster. Signed-off-by: NWolfgang Denk <wd@denx.de>
-
由 Wolfgang Denk 提交于
"Superfloppy" format (in U-Boot called PBR) did not work for FAT32 as the file system type string is at a different location. Add support for FAT32. Signed-off-by: NWolfgang Denk <wd@denx.de>
-
- 28 5月, 2010 1 次提交
-
-
由 Thomas Chou 提交于
The nios-32 arch is obsolete and broken. So it is removed. Signed-off-by: NThomas Chou <thomas@wytron.com.tw>
-
- 13 6月, 2009 1 次提交
-
-
由 Tom Rix 提交于
The static function compare_sign is only used to compare the fs_type string and does not do anything more than what strncmp does. The addition of the trailing '\0' to fs_type, while legal, is not needed because the it is never printed out and strncmp does not depend on NULL terminated strings. Signed-off-by: NTom Rix <Tom.Rix@windriver.com>
-
- 04 4月, 2009 1 次提交
-
-
由 unsik Kim 提交于
Mflash is fusion memory device mainly targeted consumer eletronic and mobile phone. Internally, it have nand flash and other hardware logics and supports some different operation (ATA, IO, XIP) modes. IO mode is custom mode for the host that doesn't have IDE interface. (Many mobile targeted SoC doesn't have IDE bus) This driver support mflash IO mode. Followings are brief descriptions about IO mode. 1. IO mode based on ATA protocol and uses some custom command. (read confirm, write confirm) 2. IO mode uses SRAM bus interface. Signed-off-by: Nunsik Kim <donari75@gmail.com>
-
- 28 1月, 2009 1 次提交
-
-
由 Wolfgang Denk 提交于
Fix based on suggestion by David Hawkins <dwh@ovro.caltech.edu>. Signed-off-by: NWolfgang Denk <wd@denx.de>
-
- 24 1月, 2009 1 次提交
-
-
由 Bryan Wu 提交于
A couple of buffers in the fat code are declared as an array of bytes. But it is then cast up to a structure with 16bit and 32bit members. Since GCC assumes structure alignment here, we have to force the buffers to be aligned according to the structure usage. Signed-off-by: NBryan Wu <bryan.wu@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
- 10 12月, 2008 1 次提交
-
-
由 Sonic Zhang 提交于
The FAT file system driver should also handle FAT on SATA devices. Signed-off-by: NSonic Zhang <Sonic.Zhang@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
- 05 12月, 2008 1 次提交
-
-
由 Remy Bohmer 提交于
This code contains some non-ascii characters in comment lines and code. Most editors do not display those characters properly and editing those files results always in diffs at these places which are usually not required to be changed at all. This is error prone. So, remove those weird characters and replace them by normal C-style equivalents for which the proper defines were already in the header. Signed-off-by: NRemy Bohmer <linux@bohmer.net>
-
- 31 8月, 2008 1 次提交
-
-
Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
-
- 03 3月, 2008 1 次提交
-
-
由 michael 提交于
This fixes the cluster size tests in the FAT32 file system. The current implementation of VFAT support doesn't work if the referred cluster has an offset > 16bit representation, causing "fatload" and "fatls" commands etc. to fail. Signed-off-by: Nmichael trimarchi <trimarchi@gandalf.sssup.it>
-
- 15 2月, 2008 1 次提交
-
-
由 Andy Fleming 提交于
A #if statement in fat.c depended on CONFIG_MMC, instead of defined(CONFIG_MMC). This meant CONFIG_MMC needed to be defined as "1" rather than just defined. Now it's better. Signed-off-by: NAndy Fleming <afleming@freescale.com>
-
- 10 1月, 2008 1 次提交
-
-
由 Andy Fleming 提交于
Way back in August I merged Heiko's patch: 566a494f: [PCS440EP] upgrade the PCS440EP board with Jon's CONFIG_COMMANDS patches. This was done in commit: 6bf6f114 However, in the process, I left out some of Heiko's good changes. Now Heiko's and Jon's patches are properly merged in fat_register_device() Signed-off-by: NAndy Fleming <afleming@freescale.com>
-
- 07 8月, 2007 1 次提交
-
-
由 Wolfgang Denk 提交于
[pointed out by Roderik Wildenburg] Signed-off-by: NWolfgang Denk <wd@denx.de>
-
- 10 7月, 2007 1 次提交
-
-
由 Jon Loeliger 提交于
Signed-off-by: NJon Loeliger <jdl@freescale.com>
-
- 04 7月, 2007 1 次提交
-
-
由 Jon Loeliger 提交于
This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: NJon Loeliger <jdl@freescale.com>
-
- 23 6月, 2007 1 次提交
-
-
由 Heiko Schocher 提交于
- Show on the Status LEDs, some States of the board. - Get the MAC addresses from the EEProm - use PREBOOT - use the CF on the board. - check the U-Boot image in the Flash with a SHA1 checksum. - use dynamic TLB entries generation for the SDRAM Signed-off-by: NHeiko Schocher <hs@denx.de>
-
- 18 5月, 2007 1 次提交
-
-
由 Peter Pearse 提交于
-
- 09 5月, 2007 1 次提交
-
-
由 Peter Pearse 提交于
-
- 13 10月, 2005 1 次提交
-
-
由 Wolfgang Denk 提交于
-
- 06 8月, 2005 1 次提交
-
-
由 Wolfgang Denk 提交于
Patch by Shlomo Kut, 13 Dec 2004
-
- 17 12月, 2004 1 次提交
-
-
由 stroese 提交于
-
- 30 9月, 2004 1 次提交
-
-
由 wdenk 提交于
- Added support for both 8 and 16 bit mode access to System ACE CF through MPU. - Fixed missing System ACE CF device during get FAT partition info in fat_register_device function. - Enabled System ACE CF support on ML300. * Patch by Sean Chang, 09 Aug 2004: Synch defines for saveenv and do_saveenv functions so they get compiled under the same statement.
-
- 15 3月, 2004 1 次提交
-
-
由 wdenk 提交于
- Fix Gigabit Ethernet support for 440GX - Add Gigabit Ethernet Support to MII PHY utilities * Patch by Brad Kemp, 12 Mar 2004: Fixes for drivers/cfi_flash.c: - Better support for x8/x16 implementations - Added failure for AMD chips attempting to use CFG_FLASH_USE_BUFFER_WRITE - Added defines for AMD command and address constants * Patch by Leon Kukovec, 12 Mar 2004: Fix get_dentfromdir() to correctly handle deleted dentries * Patch by George G. Davis, 11 Mar 2004: Remove hard coded network settings in TI OMAP1610 H2 default board config * Patch by George G. Davis, 11 Mar 2004: add support for ADS GraphicsClient+ board.
-
- 27 2月, 2004 1 次提交
-
-
由 wdenk 提交于
NS9750 DevBoard added * Patch by Pierre AUBERT, 24 Feb 2004 add USB support for MPC5200 * Patch by Steven Scholz, 24 Feb 2004: - fix MII commands to use values from last command * Patch by Torsten Demke, 24 Feb 2004: Add support for the eXalion platform (SPSW-8240, F-30, F-300)
-
- 24 2月, 2004 1 次提交
-
-
由 wdenk 提交于
Add support for NET+50 CPU and ModNET50 board * Patch by Sam Song, 10 Feb 2004: Fix typos in cfi_flash.c * Patch by Leon Kukovec, 10 Feb 2004 Fixed long dir entry slot id calculation in get_vfatname * Patch by Robin Gilks, 10 Feb 2004: add "itest" command (operators: -eq, -ne, -lt, -gt, -le, -ge, ==, !=, <>, <, >, <=, >=)
-