<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs/fat/fat_write.c, branch v2018.07</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/fs/fat/fat_write.c?h=v2018.07</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/fs/fat/fat_write.c?h=v2018.07'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2018-05-07T13:34:12Z</updated>
<entry>
<title>SPDX: Convert all of our single license tags to Linux Kernel style</title>
<updated>2018-05-07T13:34:12Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-05-06T21:58:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=83d290c56fab2d38cd1ab4c4cc7099559c1d5046'/>
<id>urn:sha1:83d290c56fab2d38cd1ab4c4cc7099559c1d5046</id>
<content type='text'>
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>fs: fat: Drop CONFIG_SUPPORT_VFAT</title>
<updated>2018-01-22T21:43:31Z</updated>
<author>
<name>Tuomas Tynkkynen</name>
<email>tuomas@tuxera.com</email>
</author>
<published>2018-01-05T00:45:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8bad6cb176a0e92ac8e7771fb68e5e0713edbf8e'/>
<id>urn:sha1:8bad6cb176a0e92ac8e7771fb68e5e0713edbf8e</id>
<content type='text'>
fat.h unconditionally defines CONFIG_SUPPORT_VFAT (and has done since
2003), so as a result VFAT support is always enabled regardless of
whether a board config defines it or not. Drop this unnecessary option.

Signed-off-by: Tuomas Tynkkynen &lt;tuomas@tuxera.com&gt;
</content>
</entry>
<entry>
<title>fat write: Fixed a problem with the case of file names when writing files</title>
<updated>2018-01-10T13:05:51Z</updated>
<author>
<name>Jean-Jacques Hiblot</name>
<email>jjhiblot@ti.com</email>
</author>
<published>2017-12-21T11:49:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2c33b0c7d8deca7e9a907365a59fcbcde531c70d'/>
<id>urn:sha1:2c33b0c7d8deca7e9a907365a59fcbcde531c70d</id>
<content type='text'>
commit 21a24c3bf35b ("fs/fat: fix case for FAT shortnames") made it
possible that get_name() returns file names with some upper cases.
find_directory_entry() must be updated to take this account, and use
case-insensitive functions to compare file names.

Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.com&gt;
</content>
</entry>
<entry>
<title>fs/fat: Clean up open-coded sector &lt;-&gt; cluster conversions</title>
<updated>2017-09-15T13:03:15Z</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2017-09-09T17:16:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=265edc03d5a19550d92cbd6e10631d5a15bdd1d5'/>
<id>urn:sha1:265edc03d5a19550d92cbd6e10631d5a15bdd1d5</id>
<content type='text'>
Use the clust_to_sect() helper that was introduced earlier, and add an
inverse sect_to_clust(), plus update the various spots that open-coded
this conversion previously.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>fs/fat: fix case for FAT shortnames</title>
<updated>2017-09-15T13:03:14Z</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2017-09-09T17:15:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=21a24c3bf35bac83d66ce4a48eb0c7dd8a7227cb'/>
<id>urn:sha1:21a24c3bf35bac83d66ce4a48eb0c7dd8a7227cb</id>
<content type='text'>
Noticed when comparing our output to linux.  There are some lcase bits
which control whether filename and/or extension should be downcase'd.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reviewed-by: Łukasz Majewski &lt;lukma@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>fs: fat: fix fatwrite overflow calculation</title>
<updated>2017-08-26T18:56:07Z</updated>
<author>
<name>Reno Farnesi</name>
<email>nfarnesi4@gmail.com</email>
</author>
<published>2017-08-13T19:16:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=76216211f842677bac10000bfdbae1155172ddd6'/>
<id>urn:sha1:76216211f842677bac10000bfdbae1155172ddd6</id>
<content type='text'>
The overflow calculation was incorrect. Adding the start block of the
partition is not needed because the sectors are already relative to the
beginning of the partition. If you attempted to write a file smaller
than cur_part_info.start blocks on a full partition the old calculation
fails to catch the overflow. This would cause an infinite loop in the
determine_fatent function.

Old, incorrect calculation:

ending sector of new file = start sector + file size (in sectors)
last sector = partition start + total sectors on the partition

Adding the partition start block number is not needed because sectors
are already relative to the start of the partition.

New calculation:

ending sector of new file = start sector + file size (in sectors)
last sector = total sectors on the partition

Signed-off-by: Reno Farnesi &lt;nfarnesi4@gmail.com&gt;
</content>
</entry>
<entry>
<title>fs/fat: merge readwrite get_fatent_value() with readonly get_fatent()</title>
<updated>2016-12-27T16:24:14Z</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2016-12-16T23:27:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b8948d2aef80717d3d2c4f37ec086ce3ea5ad24f'/>
<id>urn:sha1:b8948d2aef80717d3d2c4f37ec086ce3ea5ad24f</id>
<content type='text'>
get_fatent_value(...) flushes changed FAT entries to disk when fetching
the next FAT blocks, in every other aspect it is identical to
get_fatent(...).

Provide a stub implementation for flush_dirty_fat_buffer if
CONFIG_FAT_WRITE is not set. Calling flush_dirty_fat_buffer during read
only operation is fine as it checks if any buffers needs flushing.

Signed-off-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Reviewed-by: Benoît Thébaudeau &lt;benoit.thebaudeau.dev@gmail.com&gt;
</content>
</entry>
<entry>
<title>fs/fat: Avoid corruption of sectors following the FAT</title>
<updated>2016-12-27T16:24:13Z</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2016-12-16T23:27:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6c1a808052ba6a875df7aa450b6df4b199f3a281'/>
<id>urn:sha1:6c1a808052ba6a875df7aa450b6df4b199f3a281</id>
<content type='text'>
The FAT is read/flushed in segments of 6 (FATBUFBLOCKS) disk sectors. The
last segment may be less than 6 sectors, cap the length.

Signed-off-by: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Reviewed-by: Benoît Thébaudeau &lt;benoit.thebaudeau.dev@gmail.com&gt;
</content>
</entry>
<entry>
<title>fat: fatwrite: fix the command for FAT12</title>
<updated>2016-12-27T16:24:13Z</updated>
<author>
<name>Philipp Skadorov</name>
<email>philipp.skadorov@savoirfairelinux.com</email>
</author>
<published>2016-12-15T20:52:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=49abbd9cc309235895c9ff7ccb6ad75c40fca4a9'/>
<id>urn:sha1:49abbd9cc309235895c9ff7ccb6ad75c40fca4a9</id>
<content type='text'>
The u-boot command fatwrite empties FAT clusters from the beginning
till the end of the file.
Specifically for FAT12 it fails to detect the end of the file and goes
beyond the file bounds thus corrupting the file system.

Additionally, FAT entry chaining-up into a file is not implemented
for FAT12.

The users normally workaround this by re-formatting the partition as
FAT16/FAT32, like here:
https://github.com/FEDEVEL/openrex-uboot-v2015.10/issues/1

The patch fixes the bounds of a file and FAT12 entries chaining into
a file, including EOF markup.

Signed-off-by: Philipp Skadorov &lt;philipp.skadorov@savoirfairelinux.com&gt;
</content>
</entry>
<entry>
<title>fs/fat/fatwrite: Local variable as buffer to store dir_slot entries</title>
<updated>2016-11-29T01:09:45Z</updated>
<author>
<name>Tien Fong Chee</name>
<email>tfchee@altera.com</email>
</author>
<published>2016-07-28T06:08:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7aa1a6b71c9af4651f6b3a164c84096a84d24285'/>
<id>urn:sha1:7aa1a6b71c9af4651f6b3a164c84096a84d24285</id>
<content type='text'>
fill_dir_slot use get_contents_vfatname_block as a temporary buffer for
constructing a list of dir_slot entries. To save the memory and providing
correct type of memory for above usage, a local buffer with accurate size
declaration is introduced.

The local array size 640 is used because for long file name entry,
each entry use 32 bytes, one entry can store up to 13 characters.
The maximum number of entry possible is 20. So, total size is
32*20=640bytes.

Signed-off-by: Genevieve Chan &lt;ccheauya@altera.com&gt;
Signed-off-by: Tien Fong Chee &lt;tfchee@altera.com&gt;
</content>
</entry>
</feed>
