<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs/fat/fat_write.c, branch v2020.01</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=v2020.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/fs/fat/fat_write.c?h=v2020.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2019-05-28T22:55:09Z</updated>
<entry>
<title>fs: fat: allocate a new cluster for root directory of fat32</title>
<updated>2019-05-28T22:55:09Z</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2019-05-24T05:10:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cd2d727fff7ea4c69db49d7ee63bd791f91acd26'/>
<id>urn:sha1:cd2d727fff7ea4c69db49d7ee63bd791f91acd26</id>
<content type='text'>
Contrary to fat12/16, fat32 can have root directory at any location
and its size can be expanded.
Without this patch, root directory won't grow properly and so we will
eventually fail to add files under root directory. Please note that this
can happen even if you delete many files as deleted directory entries
are not reclaimed but just marked as "deleted" under the current
implementation.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Tested-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>fs: fat: flush a directory cluster properly</title>
<updated>2019-05-28T22:55:08Z</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2019-05-24T05:10:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9c709c7b4177d063733070c7256f0b8635996d65'/>
<id>urn:sha1:9c709c7b4177d063733070c7256f0b8635996d65</id>
<content type='text'>
When a long name directory entry is created, multiple directory entries
may be occupied across a directory cluster boundary. Since only one
directory cluster is cached in a directory iterator, a first cluster must
be written back to device before switching over a second cluster.

Without this patch, some added files may be lost even if you don't see
any failures on write operation.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Tested-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>fs: fat: write to non-cluster-aligned root directory</title>
<updated>2019-05-28T22:55:08Z</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2019-05-24T05:10:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a9f6706cf0ba330281ae7d6a0af65cc26ffb7d25'/>
<id>urn:sha1:a9f6706cf0ba330281ae7d6a0af65cc26ffb7d25</id>
<content type='text'>
With the commit below, fat now correctly handles a file read under
a non-cluster-aligned root directory of fat12/16.
Write operation should be fixed in the same manner.

Fixes: commit 9b18358dc05d ("fs: fat: fix reading non-cluster-aligned
       root directory")
Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Cc: Anssi Hannula &lt;anssi.hannula@bitwise.fi&gt;
Tested-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>fs: fat: correct file name normalization</title>
<updated>2019-05-28T17:57:52Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-05-12T07:59:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7b437807ee0a051f46d329e868e0295299026b75'/>
<id>urn:sha1:7b437807ee0a051f46d329e868e0295299026b75</id>
<content type='text'>
File names may not contain control characters (&lt; 0x20).
Simplify the coding.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>fs: fat: fix link error when building with DEBUG=1</title>
<updated>2019-02-28T19:21:46Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-02-25T18:42:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7274b7638a3ed03f64faff185253b2bccf557877'/>
<id>urn:sha1:7274b7638a3ed03f64faff185253b2bccf557877</id>
<content type='text'>
When compiling with DEBUG=1 an error
fs/fat/fat_write.c:831: undefined reference to `__aeabi_ldivmod'
occurred.

We should use do_div() instead of the modulus operator.

filesize and cur_pos cannot be negative. So let's use u64 to avoid
warnings.

Fixes: cb8af8af5ba0 ("fs: fat: support write with non-zero offset")
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>fs: fat: Fix warning in normalize_longname()</title>
<updated>2018-10-16T14:44:12Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-09-30T14:33:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=819c80f528f8529bb88d912efb141f5fd0ecef53'/>
<id>urn:sha1:819c80f528f8529bb88d912efb141f5fd0ecef53</id>
<content type='text'>
As observed with clang:
fs/fat/fat_write.c:1024:13: warning: comparison of constant 128
      with expression of type 'char' is always false
      [-Wtautological-constant-out-of-range-compare]
                if ((0x80 &lt;= c) &amp;&amp; (c &lt;= 0xff))
                     ~~~~ ^  ~
fs/fat/fat_write.c:1024:25: warning: comparison of constant 255
      with expression of type 'char' is always true
      [-Wtautological-constant-out-of-range-compare]
                if ((0x80 &lt;= c) &amp;&amp; (c &lt;= 0xff))
                                    ~ ^  ~~~~

Fixes: 25bb9dab14f4 ("fs: fat: check and normalize file name")
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</content>
</entry>
<entry>
<title>fs: fat: fix set_cluster()</title>
<updated>2018-10-06T18:09:41Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2018-10-02T07:30:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f105fe7bc5ed6b6075f258eb54ea36c11a963f7b'/>
<id>urn:sha1:f105fe7bc5ed6b6075f258eb54ea36c11a963f7b</id>
<content type='text'>
Avoid CoverityScan warning SIGN_EXTENSION by changing the type of
parameter size of set_cluster().

Avoid leaking stack content when writing an incomplete last sector.

Reported-by: Coverity (CID: 184096)
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>fs: fat: memory leak in fat_unlink()</title>
<updated>2018-10-06T18:09:41Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2018-10-02T04:58:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0d532e911cb7e67e151153289024183bc4f5b257'/>
<id>urn:sha1:0d532e911cb7e67e151153289024183bc4f5b257</id>
<content type='text'>
Do not leak filename_copy in case of error.
Catch out of memory when calling strdup.

Reported-by: Coverity (CID: 184086)
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>fs: fat: unaligned buffers are not an error</title>
<updated>2018-09-23T19:55:30Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2018-09-13T17:42:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1c381cebb7a67ad2b55e8271bbe344baf060cb85'/>
<id>urn:sha1:1c381cebb7a67ad2b55e8271bbe344baf060cb85</id>
<content type='text'>
The FAT driver supports unaligned reads and writes and EFI applications
will make use of these. So a misaligned buffer is only worth a debug
message.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</content>
</entry>
<entry>
<title>fs: fat: support unlink</title>
<updated>2018-09-23T19:55:30Z</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2018-09-11T06:59:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f8240ce95d64dbe3a1eb6d5001ba23107c7e7cfe'/>
<id>urn:sha1:f8240ce95d64dbe3a1eb6d5001ba23107c7e7cfe</id>
<content type='text'>
In this patch, unlink support is added to FAT file system.
A directory can be deleted only if it is empty.

In this implementation, only a directory entry for a short file name
will be removed. So entries for a long file name can and should be
reclaimed with fsck.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</content>
</entry>
</feed>
