<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/fat.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>fs: fat: Refactor dirty flag handling</title>
<updated>2026-03-27T19:14:18+00:00</updated>
<author>
<name>Daniel Palmer</name>
<email>daniel@thingy.jp</email>
</author>
<published>2026-03-10T22:06:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=29cb951e8ca6a9feecd920da31af9f18918057fe'/>
<id>29cb951e8ca6a9feecd920da31af9f18918057fe</id>
<content type='text'>
Refactor the dirty flag handling a little bit so an inline
function is called instead of directly stuffing a value into
the variable.

This allows variable that holds the flag to be completely removed
if its not used i.e. CONFIG_FAT_WIRTE=n

Signed-off-by: Daniel Palmer &lt;daniel@thingy.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refactor the dirty flag handling a little bit so an inline
function is called instead of directly stuffing a value into
the variable.

This allows variable that holds the flag to be completely removed
if its not used i.e. CONFIG_FAT_WIRTE=n

Signed-off-by: Daniel Palmer &lt;daniel@thingy.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>include/fat.h: Audit include list</title>
<updated>2025-06-02T23:26:15+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-05-21T22:51:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=43d76dc7df600b10cbf70753750bf87de098b210'/>
<id>43d76dc7df600b10cbf70753750bf87de098b210</id>
<content type='text'>
This file does not need &lt;asm/cache.h&gt; so remove it. However the file
common/spl/spl_fat.c does need it, so add it there.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This file does not need &lt;asm/cache.h&gt; so remove it. However the file
common/spl/spl_fat.c does need it, so add it there.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: fat: add rename</title>
<updated>2025-03-07T17:50:22+00:00</updated>
<author>
<name>Gabriel Dalimonte</name>
<email>gabriel.dalimonte@gmail.com</email>
</author>
<published>2025-02-17T18:26:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=06159a1465fc97d8d7b72b9bea39a396f6e7057c'/>
<id>06159a1465fc97d8d7b72b9bea39a396f6e7057c</id>
<content type='text'>
The implementation roughly follows the POSIX specification for
rename() [1]. The ordering of operations attempting to minimize the chance
for data loss in unexpected circumstances.

The 'mv' command was implemented as a front end for the rename operation
as that is what most users are likely familiar with in terms of behavior.

The 'FAT_RENAME' Kconfig option was added to prevent code size increase on
size-oriented builds like SPL.

[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/rename.html

Signed-off-by: Gabriel Dalimonte &lt;gabriel.dalimonte@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The implementation roughly follows the POSIX specification for
rename() [1]. The ordering of operations attempting to minimize the chance
for data loss in unexpected circumstances.

The 'mv' command was implemented as a front end for the rename operation
as that is what most users are likely familiar with in terms of behavior.

The 'FAT_RENAME' Kconfig option was added to prevent code size increase on
size-oriented builds like SPL.

[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/rename.html

Signed-off-by: Gabriel Dalimonte &lt;gabriel.dalimonte@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: fat: calculate FAT type based on cluster count</title>
<updated>2023-11-29T01:10:24+00:00</updated>
<author>
<name>Christian Taedcke</name>
<email>christian.taedcke@weidmueller.com</email>
</author>
<published>2023-11-15T12:44:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=08f622a12708a0a787c8345532e0b1665b993cab'/>
<id>08f622a12708a0a787c8345532e0b1665b993cab</id>
<content type='text'>
This fixes an issue where the FAT type (FAT12, FAT16) is not
correctly detected, e.g. when the BPB field BS_FilSysType contains the
valid value "FAT     ".

According to the FAT spec the field BS_FilSysType has only
informational character and does not determine the FAT type.

The logic of this code is based on the linux kernel implementation
from the file fs/fat/inode.c function fat_fill_super().

For details about FAT see http://elm-chan.org/docs/fat_e.html

Signed-off-by: Christian Taedcke &lt;christian.taedcke@weidmueller.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes an issue where the FAT type (FAT12, FAT16) is not
correctly detected, e.g. when the BPB field BS_FilSysType contains the
valid value "FAT     ".

According to the FAT spec the field BS_FilSysType has only
informational character and does not determine the FAT type.

The logic of this code is based on the linux kernel implementation
from the file fs/fat/inode.c function fat_fill_super().

For details about FAT see http://elm-chan.org/docs/fat_e.html

Signed-off-by: Christian Taedcke &lt;christian.taedcke@weidmueller.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/fat: avoid noisy message fat_read_file()</title>
<updated>2023-01-20T15:38:52+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2023-01-19T14:37:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=de9433550b01547c3207de9f7060092242c91569'/>
<id>de9433550b01547c3207de9f7060092242c91569</id>
<content type='text'>
UEFI applications call file system functions to determine if a file exists.
The return codes are evaluated to show appropriate messages.
U-Boot's file system layer should not interfere with the output.

Rename file_fat_read_at() to fat_read_file() adjusting the parameter
sequence and names and eliminate the old wrapper function.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
UEFI applications call file system functions to determine if a file exists.
The return codes are evaluated to show appropriate messages.
U-Boot's file system layer should not interfere with the output.

Rename file_fat_read_at() to fat_read_file() adjusting the parameter
sequence and names and eliminate the old wrapper function.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: fat: structure for name and extension</title>
<updated>2021-01-23T06:56:53+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-01-20T23:23:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=041f0af3668e037f465d0e80ea5561fb3fbaa7d0'/>
<id>041f0af3668e037f465d0e80ea5561fb3fbaa7d0</id>
<content type='text'>
The short name and extension of FAT files are stored in adjacent fields of
the directory entry. For some operations like calculating a checksum or
copying both fields it is preferable to treat both as one structure.

Change the definition of the directory entry structure to include a
structure comprising the name and the extension field.

This resolves Coverity CID 316357, CID 316350, CID 316348.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The short name and extension of FAT files are stored in adjacent fields of
the directory entry. For some operations like calculating a checksum or
copying both fields it is preferable to treat both as one structure.

Change the definition of the directory entry structure to include a
structure comprising the name and the extension field.

This resolves Coverity CID 316357, CID 316350, CID 316348.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/fat: implement fsuuid command</title>
<updated>2020-12-31T13:32:27+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2020-12-30T23:38:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c0029e4e25c10d627f4bff62cdb4074bb2c7eaf7'/>
<id>c0029e4e25c10d627f4bff62cdb4074bb2c7eaf7</id>
<content type='text'>
The FAT file system does not have a UUID but a 4 byte volume ID.
Let the fsuuid command show it in XXXX-XXXX format.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The FAT file system does not have a UUID but a 4 byte volume ID.
Let the fsuuid command show it in XXXX-XXXX format.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: fat: eliminate DIRENTSPERBLOCK() macro</title>
<updated>2020-12-31T13:32:02+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2020-12-25T13:30:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d0be67657d64523b4499d385390c08c2bafab1bc'/>
<id>d0be67657d64523b4499d385390c08c2bafab1bc</id>
<content type='text'>
The FAT filesystem implementation uses several marcros referring to a magic
variable name mydata which renders the code less readable. Eliminate one of
them which is only used for a debug() statement.

Use log_debug() instead of debug().

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The FAT filesystem implementation uses several marcros referring to a magic
variable name mydata which renders the code less readable. Eliminate one of
them which is only used for a debug() statement.

Use log_debug() instead of debug().

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: fat: export fat_next_cluster()</title>
<updated>2020-12-10T08:14:58+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2020-11-22T08:19:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d236e825a214a5684598fa7a7b919af332c43390'/>
<id>d236e825a214a5684598fa7a7b919af332c43390</id>
<content type='text'>
Rename function next_cluster() to fat_next_cluster() and export it.

When creating a new directory entries we should reuse deleted entries.
This requires re-scanning the directory.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename function next_cluster() to fat_next_cluster() and export it.

When creating a new directory entries we should reuse deleted entries.
This requires re-scanning the directory.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Drop part.h from common header</title>
<updated>2020-05-18T21:33:33+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-10T17:39:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e6f6f9e64882ddf242437c73fdd9ff06a8eb7c21'/>
<id>e6f6f9e64882ddf242437c73fdd9ff06a8eb7c21</id>
<content type='text'>
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
