projects
/
lwext4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b46f6b5
)
Add ext4_sb_set_blocks_cnt
author
gkostka
<kostka.grzegorz@gmail.com>
Mon, 16 Nov 2015 19:28:02 +0000
(20:28 +0100)
committer
gkostka
<kostka.grzegorz@gmail.com>
Mon, 16 Nov 2015 19:28:02 +0000
(20:28 +0100)
lwext4/ext4_super.h
patch
|
blob
|
history
diff --git
a/lwext4/ext4_super.h
b/lwext4/ext4_super.h
index a9eec0721339da17c59aeb4d7710c8ebed938ce6..5b7b5a09fec73eed315b67c62cd62232150bf457 100644
(file)
--- a/
lwext4/ext4_super.h
+++ b/
lwext4/ext4_super.h
@@
-54,6
+54,15
@@
static inline uint64_t ext4_sb_get_blocks_cnt(struct ext4_sblock *s)
to_le32(s->blocks_count_lo);
}
to_le32(s->blocks_count_lo);
}
+/**@brief Blocks count set in superblock.
+ * @param s superblock descriptor
+ * @return count of blocks*/
+static inline void ext4_sb_set_blocks_cnt(struct ext4_sblock *s, uint64_t cnt)
+{
+ s->blocks_count_lo = to_le32((cnt << 32) >> 32);
+ s->blocks_count_hi = to_le32(cnt >> 32);
+}
+
/**@brief Free blocks count get stored in superblock.
* @param s superblock descriptor
* @return free blocks*/
/**@brief Free blocks count get stored in superblock.
* @param s superblock descriptor
* @return free blocks*/