projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up. Return error also when we don't found key in query string.
[bertos.git]
/
bertos
/
io
/
kblock.h
diff --git
a/bertos/io/kblock.h
b/bertos/io/kblock.h
index 8bfe384fb3b6cc076e715f217bb99db362f2366a..f3542947c308c1453a4e44527a8a5ebcb93d3bde 100644
(file)
--- a/
bertos/io/kblock.h
+++ b/
bertos/io/kblock.h
@@
-69,6
+69,9
@@
* }
* \endcode
*
* }
* \endcode
*
+ * \note The KBlock interface is optimized for block reads. If you need a
+ * file-like access, you can use \ref kfile_block.
+ *
* \author Francesco Sacchi <batt@develer.com>
*
* $WIZ$ module_name = "kblock"
* \author Francesco Sacchi <batt@develer.com>
*
* $WIZ$ module_name = "kblock"
@@
-192,13
+195,9
@@
typedef struct KBlock
* \param start The index of the start block for the limiting window in logical addressing units.
* \param count The number of blocks to be used.
*
* \param start The index of the start block for the limiting window in logical addressing units.
* \param count The number of blocks to be used.
*
+ * \return 0 if all is OK, EOF on errors.
*/
*/
-INLINE void kblock_trim(struct KBlock *b, block_idx_t start, block_idx_t count)
-{
- ASSERT(start + count <= b->blk_cnt);
- b->priv.blk_start += start;
- b->blk_cnt = count;
-}
+int kblock_trim(struct KBlock *b, block_idx_t start, block_idx_t count);
#define KB_ASSERT_METHOD(b, method) \
#define KB_ASSERT_METHOD(b, method) \