projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Doc review; fix some quirks.
[bertos.git]
/
fs
/
battfs.h
diff --git
a/fs/battfs.h
b/fs/battfs.h
index 6558877f838d9ce607db1677aab8563508b72054..c155b61ee2e17a11e657cc550930d1267bb06499 100644
(file)
--- a/
fs/battfs.h
+++ b/
fs/battfs.h
@@
-92,14
+92,14
@@
typedef struct BattFsPageHeader
* \see battfs_to_disk
* \see disk_to_battfs
*/
* \see battfs_to_disk
* \see disk_to_battfs
*/
-#define BATTFS_HEADER_LEN 1
3
+#define BATTFS_HEADER_LEN 1
2
/**
* Marks for valid pages.
* Simply set to 1 all field bits.
* \{
*/
/**
* Marks for valid pages.
* Simply set to 1 all field bits.
* \{
*/
-#define MARK_PAGE_VALID ((1
LL << (CPU_BITS_PER_CHAR * sizeof(mark_t)
)) - 1)
+#define MARK_PAGE_VALID ((1
<< (CPU_BITS_PER_CHAR * sizeof(pgaddr_t) + 1
)) - 1)
#define FCS_FREE_VALID ((1 << (CPU_BITS_PER_CHAR * sizeof(fcs_t))) - 1)
/* \} */
#define FCS_FREE_VALID ((1 << (CPU_BITS_PER_CHAR * sizeof(fcs_t))) - 1)
/* \} */
@@
-153,7
+153,7
@@
typedef size_t (*disk_page_read_t) (struct BattFsSuper *d, pgcnt_t page, pgaddr_
* \a size the lenght to be written.
* \return the number of bytes written.
*/
* \a size the lenght to be written.
* \return the number of bytes written.
*/
-typedef size_t (*disk_page_write_t) (struct BattFsSuper *d, pgcnt_t page, pgaddr_t addr, void *buf, size_t);
+typedef size_t (*disk_page_write_t) (struct BattFsSuper *d, pgcnt_t page, pgaddr_t addr,
const
void *buf, size_t);
/**
* Type interface for disk page erase function.
/**
* Type interface for disk page erase function.
@@
-215,5
+215,6
@@
typedef struct BattFsSuper
} BattFsSuper;
bool battfs_init(struct BattFsSuper *d);
} BattFsSuper;
bool battfs_init(struct BattFsSuper *d);
+bool battfs_writeTestBlock(struct BattFsSuper *disk, pgcnt_t page, inode_t inode, seq_t seq, fill_t fill, pgoff_t pgoff, mark_t mark);
#endif /* FS_BATTFS_H */
#endif /* FS_BATTFS_H */