diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2018-09-11 15:59:06 +0900 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2018-09-23 21:55:29 +0200 |
commit | cb8af8af5ba03ae8e0a7315b66bfcc46d5c55627 (patch) | |
tree | 996a60ec6a177a5b036d5b7d2a8c92d3d6c27242 /include/andestech | |
parent | 704df6aa0a284627940e1b15dc6f1aa528753c4b (diff) |
fs: fat: support write with non-zero offset
In this patch, all the necessary code for allowing for a file offset
at write is implemented. What plays a major roll here is get_set_cluster(),
which, in contrast to its counterpart, set_cluster(), only operates on
already-allocated clusters, overwriting with data.
So, with a file offset specified, set_contents() seeks and writes data
with set_get_cluster() until the end of a file, and, once it reaches
there, continues writing with set_cluster() for the rest.
Please note that a file will be trimmed as a result of write operation if
write ends before reaching file's end. This is an intended behavior
in order to maintain compatibility with the current interface.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/andestech')
0 files changed, 0 insertions, 0 deletions