summaryrefslogtreecommitdiff
path: root/yaffs_bitmap.c
diff options
context:
space:
mode:
authorCharles Manning <cdhmanning@gmail.com>2010-10-07 11:10:58 +1300
committerCharles Manning <cdhmanning@gmail.com>2010-10-07 11:14:38 +1300
commitf43976eda35065890e7cf0a008e9518158eb71d6 (patch)
treee19e6579100cf68632cb0981f277269e086c039e /yaffs_bitmap.c
parent70c6bf2ff57c8a2fb778accdd5b4227abf273674 (diff)
yaffs Make more symbol changes
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Diffstat (limited to 'yaffs_bitmap.c')
-rw-r--r--yaffs_bitmap.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/yaffs_bitmap.c b/yaffs_bitmap.c
index a24dbb7..1769e9b 100644
--- a/yaffs_bitmap.c
+++ b/yaffs_bitmap.c
@@ -17,22 +17,22 @@
* Chunk bitmap manipulations
*/
-static Y_INLINE __u8 *yaffs_BlockBits(yaffs_Device *dev, int blk)
+static Y_INLINE __u8 *yaffs_BlockBits(yaffs_dev_t *dev, int blk)
{
- if (blk < dev->internalStartBlock || blk > dev->internalEndBlock) {
+ if (blk < dev->internal_start_block || blk > dev->internal_end_block) {
T(YAFFS_TRACE_ERROR,
(TSTR("**>> yaffs: BlockBits block %d is not valid" TENDSTR),
blk));
YBUG();
}
- return dev->chunkBits +
- (dev->chunkBitmapStride * (blk - dev->internalStartBlock));
+ return dev->chunk_bits +
+ (dev->chunk_bit_stride * (blk - dev->internal_start_block));
}
-void yaffs_verify_chunk_bit_id(yaffs_Device *dev, int blk, int chunk)
+void yaffs_verify_chunk_bit_id(yaffs_dev_t *dev, int blk, int chunk)
{
- if (blk < dev->internalStartBlock || blk > dev->internalEndBlock ||
- chunk < 0 || chunk >= dev->param.nChunksPerBlock) {
+ if (blk < dev->internal_start_block || blk > dev->internal_end_block ||
+ chunk < 0 || chunk >= dev->param.chunks_per_block) {
T(YAFFS_TRACE_ERROR,
(TSTR("**>> yaffs: Chunk Id (%d:%d) invalid"TENDSTR),
blk, chunk));
@@ -40,14 +40,14 @@ void yaffs_verify_chunk_bit_id(yaffs_Device *dev, int blk, int chunk)
}
}
-void yaffs_clear_chunk_bits(yaffs_Device *dev, int blk)
+void yaffs_clear_chunk_bits(yaffs_dev_t *dev, int blk)
{
__u8 *blkBits = yaffs_BlockBits(dev, blk);
- memset(blkBits, 0, dev->chunkBitmapStride);
+ memset(blkBits, 0, dev->chunk_bit_stride);
}
-void yaffs_clear_chunk_bit(yaffs_Device *dev, int blk, int chunk)
+void yaffs_clear_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
{
__u8 *blkBits = yaffs_BlockBits(dev, blk);
@@ -56,7 +56,7 @@ void yaffs_clear_chunk_bit(yaffs_Device *dev, int blk, int chunk)
blkBits[chunk / 8] &= ~(1 << (chunk & 7));
}
-void yaffs_set_chunk_bit(yaffs_Device *dev, int blk, int chunk)
+void yaffs_set_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
{
__u8 *blkBits = yaffs_BlockBits(dev, blk);
@@ -65,7 +65,7 @@ void yaffs_set_chunk_bit(yaffs_Device *dev, int blk, int chunk)
blkBits[chunk / 8] |= (1 << (chunk & 7));
}
-int yaffs_check_chunk_bit(yaffs_Device *dev, int blk, int chunk)
+int yaffs_check_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
{
__u8 *blkBits = yaffs_BlockBits(dev, blk);
yaffs_verify_chunk_bit_id(dev, blk, chunk);
@@ -73,11 +73,11 @@ int yaffs_check_chunk_bit(yaffs_Device *dev, int blk, int chunk)
return (blkBits[chunk / 8] & (1 << (chunk & 7))) ? 1 : 0;
}
-int yaffs_still_some_chunks(yaffs_Device *dev, int blk)
+int yaffs_still_some_chunks(yaffs_dev_t *dev, int blk)
{
__u8 *blkBits = yaffs_BlockBits(dev, blk);
int i;
- for (i = 0; i < dev->chunkBitmapStride; i++) {
+ for (i = 0; i < dev->chunk_bit_stride; i++) {
if (*blkBits)
return 1;
blkBits++;
@@ -85,12 +85,12 @@ int yaffs_still_some_chunks(yaffs_Device *dev, int blk)
return 0;
}
-int yaffs_count_chunk_bits(yaffs_Device *dev, int blk)
+int yaffs_count_chunk_bits(yaffs_dev_t *dev, int blk)
{
__u8 *blkBits = yaffs_BlockBits(dev, blk);
int i;
int n = 0;
- for (i = 0; i < dev->chunkBitmapStride; i++) {
+ for (i = 0; i < dev->chunk_bit_stride; i++) {
__u8 x = *blkBits;
while (x) {
if (x & 1)