diff options
author | Miles Bader <miles@gnu.org> | 1995-09-15 23:00:38 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-09-15 23:00:38 +0000 |
commit | 3fc8b701fd64b5a9900c12d4c033ade0d8d015dd (patch) | |
tree | ff44c793aa39afe9b9661ac25e74af66a31c2863 /ext2fs | |
parent | fa624baf5f5dd58724092e3cb489109fb52dfe83 (diff) |
u32 --> block_t
Diffstat (limited to 'ext2fs')
-rw-r--r-- | ext2fs/balloc.c | 3 | ||||
-rw-r--r-- | ext2fs/ext2fs.h | 4 | ||||
-rw-r--r-- | ext2fs/getblk.c | 13 | ||||
-rw-r--r-- | ext2fs/hyper.c | 2 | ||||
-rw-r--r-- | ext2fs/pager.c | 2 |
5 files changed, 11 insertions, 13 deletions
diff --git a/ext2fs/balloc.c b/ext2fs/balloc.c index c9bfc502..9c47b742 100644 --- a/ext2fs/balloc.c +++ b/ext2fs/balloc.c @@ -113,8 +113,7 @@ ext2_free_blocks (block_t block, unsigned long count) * bitmap, and then for any free bit if that fails. */ block_t -ext2_new_block (block_t goal, - u32 * prealloc_count, u32 * prealloc_block) +ext2_new_block (block_t goal, block_t *prealloc_count, block_t *prealloc_block) { char *bh; char *p, *r; diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h index d8d1d5fb..77e87ddb 100644 --- a/ext2fs/ext2fs.h +++ b/ext2fs/ext2fs.h @@ -42,7 +42,7 @@ int printf (const char *fmt, ...); /* A block number. */ -typedef unsigned long block_t; +typedef u32 block_t; /* ---------------------------------------------------------------- */ @@ -446,7 +446,7 @@ void ext2_discard_prealloc (struct node *node); otherwise EINVAL is returned. */ error_t ext2_getblk (struct node *node, block_t block, int create, block_t *disk_block); -block_t ext2_new_block (block_t goal, u32 * prealloc_count, u32 * prealloc_block); +block_t ext2_new_block (block_t goal, block_t *prealloc_count, block_t *prealloc_block); void ext2_free_blocks (block_t block, unsigned long count); diff --git a/ext2fs/getblk.c b/ext2fs/getblk.c index 731a7deb..73e68e0f 100644 --- a/ext2fs/getblk.c +++ b/ext2fs/getblk.c @@ -176,9 +176,9 @@ block_getblk (struct node *node, block_t block, int nr, int create, int zero, { int i; block_t goal = 0; - char *bh = bptr (block); + block_t *bh = (block_t *)bptr (block); - *result = ((u32 *)bh)[nr]; + *result = bh[nr]; if (*result) return 0; @@ -191,9 +191,9 @@ block_getblk (struct node *node, block_t block, int nr, int create, int zero, { for (i = nr - 1; i >= 0; i--) { - if (((u32 *) bh)[i]) + if (bh[i]) { - goal = ((u32 *) bh)[i]; + goal = bh[i]; break; } } @@ -205,7 +205,7 @@ block_getblk (struct node *node, block_t block, int nr, int create, int zero, if (!*result) return ENOSPC; - ((u32 *)bh)[nr] = *result; + bh[nr] = *result; if (diskfs_synchronous || node->dn->info.i_osync) sync_global_ptr (bh, 1); @@ -228,8 +228,7 @@ error_t ext2_getblk (struct node *node, block_t block, int create, block_t *disk_block) { error_t err; - u32 indir; - block_t b; + block_t indir, b; unsigned long addr_per_block = EXT2_ADDR_PER_BLOCK (sblock); if (block > EXT2_NDIR_BLOCKS + addr_per_block + diff --git a/ext2fs/hyper.c b/ext2fs/hyper.c index c62dd21e..f4e085ce 100644 --- a/ext2fs/hyper.c +++ b/ext2fs/hyper.c @@ -98,7 +98,7 @@ get_hypermetadata (void) itb_per_group = sblock->s_inodes_per_group / inodes_per_block; desc_per_block = block_size / sizeof (struct ext2_group_desc); - addr_per_block = block_size / sizeof (u32); + addr_per_block = block_size / sizeof (block_t); db_per_group = (groups_count + desc_per_block - 1) / desc_per_block; diskfs_end_catch_exception (); diff --git a/ext2fs/pager.c b/ext2fs/pager.c index 15d915f4..2b6542d7 100644 --- a/ext2fs/pager.c +++ b/ext2fs/pager.c @@ -255,7 +255,7 @@ file_pager_write_page (struct node *node, vm_offset_t offset, vm_address_t buf) error_t err = 0; struct pending_blocks pb; struct rwlock *lock = 0; - u32 block; + block_t block; int left = vm_page_size; pending_blocks_init (&pb, buf); |