projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
proc: Split cooperative scheduler in coop.c
[bertos.git]
/
bertos
/
fs
/
battfs.c
diff --git
a/bertos/fs/battfs.c
b/bertos/fs/battfs.c
index c940bad19d7b0d08c8b6aaafe67d34639314b011..f975921a98a99dd265ad64e8b1dda6574e1001f9 100644
(file)
--- a/
bertos/fs/battfs.c
+++ b/
bertos/fs/battfs.c
@@
-611,7
+611,7
@@
static int battfs_flush(struct KFile *fd)
*/
static int battfs_fileclose(struct KFile *fd)
{
*/
static int battfs_fileclose(struct KFile *fd)
{
- BattF
sKFile
*fdb = BATTFSKFILE(fd);
+ BattF
S
*fdb = BATTFSKFILE(fd);
battfs_flush(fd);
REMOVE(&fdb->link);
battfs_flush(fd);
REMOVE(&fdb->link);
@@
-624,7
+624,7
@@
static int battfs_fileclose(struct KFile *fd)
*/
static size_t battfs_read(struct KFile *fd, void *_buf, size_t size)
{
*/
static size_t battfs_read(struct KFile *fd, void *_buf, size_t size)
{
- BattF
sKFile
*fdb = BATTFSKFILE(fd);
+ BattF
S
*fdb = BATTFSKFILE(fd);
uint8_t *buf = (uint8_t *)_buf;
size_t total_read = 0;
uint8_t *buf = (uint8_t *)_buf;
size_t total_read = 0;
@@
-719,7
+719,7
@@
static bool countFileSize(BattFsSuper *disk, pgcnt_t *start, inode_t inode, file
* File context is stored in \a fd.
* \return true if ok, false otherwise.
*/
* File context is stored in \a fd.
* \return true if ok, false otherwise.
*/
-bool battfs_fileopen(BattFsSuper *disk, BattF
sKFile
*fd, inode_t inode, filemode_t mode)
+bool battfs_fileopen(BattFsSuper *disk, BattF
S
*fd, inode_t inode, filemode_t mode)
{
Node *n;
{
Node *n;
@@
-754,7
+754,7
@@
bool battfs_fileopen(BattFsSuper *disk, BattFsKFile *fd, inode_t inode, filemode
/* Insert file handle in list, ordered by inode, ascending. */
FOREACH_NODE(n, &disk->file_opened_list)
{
/* Insert file handle in list, ordered by inode, ascending. */
FOREACH_NODE(n, &disk->file_opened_list)
{
- BattF
sKFile *file = containerof(n, BattFsKFile
, link);
+ BattF
S *file = containerof(n, BattFS
, link);
if (file->inode >= inode)
break;
}
if (file->inode >= inode)
break;
}
@@
-794,7
+794,7
@@
bool battfs_close(struct BattFsSuper *disk)
/* Close all open files */
FOREACH_NODE(n, &disk->file_opened_list)
{
/* Close all open files */
FOREACH_NODE(n, &disk->file_opened_list)
{
- BattF
sKFile *file = containerof(n, BattFsKFile
, link);
+ BattF
S *file = containerof(n, BattFS
, link);
res += battfs_fileclose(&file->fd);
}
res += battfs_fileclose(&file->fd);
}