diff options
Diffstat (limited to 'e2fsprogs/ext2fs/block.c')
-rw-r--r-- | e2fsprogs/ext2fs/block.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/e2fsprogs/ext2fs/block.c b/e2fsprogs/ext2fs/block.c index 7685680df..18be2a5e8 100644 --- a/e2fsprogs/ext2fs/block.c +++ b/e2fsprogs/ext2fs/block.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * block.c --- iterate over all blocks in an inode | 2 | * block.c --- iterate over all blocks in an inode |
3 | * | 3 | * |
4 | * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o. | 4 | * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o. |
5 | * | 5 | * |
6 | * %Begin-Header% | 6 | * %Begin-Header% |
@@ -59,7 +59,7 @@ static int block_iterate_ind(blk_t *ind_block, blk_t ref_block, | |||
59 | ret |= BLOCK_ERROR; | 59 | ret |= BLOCK_ERROR; |
60 | return ret; | 60 | return ret; |
61 | } | 61 | } |
62 | ctx->errcode = ext2fs_read_ind_block(ctx->fs, *ind_block, | 62 | ctx->errcode = ext2fs_read_ind_block(ctx->fs, *ind_block, |
63 | ctx->ind_buf); | 63 | ctx->ind_buf); |
64 | if (ctx->errcode) { | 64 | if (ctx->errcode) { |
65 | ret |= BLOCK_ERROR; | 65 | ret |= BLOCK_ERROR; |
@@ -71,7 +71,7 @@ static int block_iterate_ind(blk_t *ind_block, blk_t ref_block, | |||
71 | if (ctx->flags & BLOCK_FLAG_APPEND) { | 71 | if (ctx->flags & BLOCK_FLAG_APPEND) { |
72 | for (i = 0; i < limit; i++, ctx->bcount++, block_nr++) { | 72 | for (i = 0; i < limit; i++, ctx->bcount++, block_nr++) { |
73 | flags = (*ctx->func)(ctx->fs, block_nr, ctx->bcount, | 73 | flags = (*ctx->func)(ctx->fs, block_nr, ctx->bcount, |
74 | *ind_block, offset, | 74 | *ind_block, offset, |
75 | ctx->priv_data); | 75 | ctx->priv_data); |
76 | changed |= flags; | 76 | changed |= flags; |
77 | if (flags & BLOCK_ABORT) { | 77 | if (flags & BLOCK_ABORT) { |
@@ -85,7 +85,7 @@ static int block_iterate_ind(blk_t *ind_block, blk_t ref_block, | |||
85 | if (*block_nr == 0) | 85 | if (*block_nr == 0) |
86 | continue; | 86 | continue; |
87 | flags = (*ctx->func)(ctx->fs, block_nr, ctx->bcount, | 87 | flags = (*ctx->func)(ctx->fs, block_nr, ctx->bcount, |
88 | *ind_block, offset, | 88 | *ind_block, offset, |
89 | ctx->priv_data); | 89 | ctx->priv_data); |
90 | changed |= flags; | 90 | changed |= flags; |
91 | if (flags & BLOCK_ABORT) { | 91 | if (flags & BLOCK_ABORT) { |
@@ -109,7 +109,7 @@ static int block_iterate_ind(blk_t *ind_block, blk_t ref_block, | |||
109 | ref_offset, ctx->priv_data); | 109 | ref_offset, ctx->priv_data); |
110 | return ret; | 110 | return ret; |
111 | } | 111 | } |
112 | 112 | ||
113 | static int block_iterate_dind(blk_t *dind_block, blk_t ref_block, | 113 | static int block_iterate_dind(blk_t *dind_block, blk_t ref_block, |
114 | int ref_offset, struct block_context *ctx) | 114 | int ref_offset, struct block_context *ctx) |
115 | { | 115 | { |
@@ -133,7 +133,7 @@ static int block_iterate_dind(blk_t *dind_block, blk_t ref_block, | |||
133 | ret |= BLOCK_ERROR; | 133 | ret |= BLOCK_ERROR; |
134 | return ret; | 134 | return ret; |
135 | } | 135 | } |
136 | ctx->errcode = ext2fs_read_ind_block(ctx->fs, *dind_block, | 136 | ctx->errcode = ext2fs_read_ind_block(ctx->fs, *dind_block, |
137 | ctx->dind_buf); | 137 | ctx->dind_buf); |
138 | if (ctx->errcode) { | 138 | if (ctx->errcode) { |
139 | ret |= BLOCK_ERROR; | 139 | ret |= BLOCK_ERROR; |
@@ -185,7 +185,7 @@ static int block_iterate_dind(blk_t *dind_block, blk_t ref_block, | |||
185 | ref_offset, ctx->priv_data); | 185 | ref_offset, ctx->priv_data); |
186 | return ret; | 186 | return ret; |
187 | } | 187 | } |
188 | 188 | ||
189 | static int block_iterate_tind(blk_t *tind_block, blk_t ref_block, | 189 | static int block_iterate_tind(blk_t *tind_block, blk_t ref_block, |
190 | int ref_offset, struct block_context *ctx) | 190 | int ref_offset, struct block_context *ctx) |
191 | { | 191 | { |
@@ -209,7 +209,7 @@ static int block_iterate_tind(blk_t *tind_block, blk_t ref_block, | |||
209 | ret |= BLOCK_ERROR; | 209 | ret |= BLOCK_ERROR; |
210 | return ret; | 210 | return ret; |
211 | } | 211 | } |
212 | ctx->errcode = ext2fs_read_ind_block(ctx->fs, *tind_block, | 212 | ctx->errcode = ext2fs_read_ind_block(ctx->fs, *tind_block, |
213 | ctx->tind_buf); | 213 | ctx->tind_buf); |
214 | if (ctx->errcode) { | 214 | if (ctx->errcode) { |
215 | ret |= BLOCK_ERROR; | 215 | ret |= BLOCK_ERROR; |
@@ -259,10 +259,10 @@ static int block_iterate_tind(blk_t *tind_block, blk_t ref_block, | |||
259 | ret |= (*ctx->func)(ctx->fs, tind_block, | 259 | ret |= (*ctx->func)(ctx->fs, tind_block, |
260 | BLOCK_COUNT_TIND, ref_block, | 260 | BLOCK_COUNT_TIND, ref_block, |
261 | ref_offset, ctx->priv_data); | 261 | ref_offset, ctx->priv_data); |
262 | 262 | ||
263 | return ret; | 263 | return ret; |
264 | } | 264 | } |
265 | 265 | ||
266 | errcode_t ext2fs_block_iterate2(ext2_filsys fs, | 266 | errcode_t ext2fs_block_iterate2(ext2_filsys fs, |
267 | ext2_ino_t ino, | 267 | ext2_ino_t ino, |
268 | int flags, | 268 | int flags, |
@@ -338,7 +338,7 @@ errcode_t ext2fs_block_iterate2(ext2_filsys fs, | |||
338 | goto abort_exit; | 338 | goto abort_exit; |
339 | } | 339 | } |
340 | } | 340 | } |
341 | 341 | ||
342 | /* | 342 | /* |
343 | * Iterate over normal data blocks | 343 | * Iterate over normal data blocks |
344 | */ | 344 | */ |
@@ -427,7 +427,7 @@ errcode_t ext2fs_block_iterate(ext2_filsys fs, | |||
427 | void *priv_data) | 427 | void *priv_data) |
428 | { | 428 | { |
429 | struct xlate xl; | 429 | struct xlate xl; |
430 | 430 | ||
431 | xl.real_private = priv_data; | 431 | xl.real_private = priv_data; |
432 | xl.func = func; | 432 | xl.func = func; |
433 | 433 | ||