diff options
Diffstat (limited to 'e2fsprogs/ext2fs/dblist.c')
-rw-r--r-- | e2fsprogs/ext2fs/dblist.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/e2fsprogs/ext2fs/dblist.c b/e2fsprogs/ext2fs/dblist.c index d5833d728..0cf5698fa 100644 --- a/e2fsprogs/ext2fs/dblist.c +++ b/e2fsprogs/ext2fs/dblist.c | |||
@@ -1,13 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * dblist.c -- directory block list functions | 2 | * dblist.c -- directory block list functions |
3 | * | 3 | * |
4 | * Copyright 1997 by Theodore Ts'o | 4 | * Copyright 1997 by Theodore Ts'o |
5 | * | 5 | * |
6 | * %Begin-Header% | 6 | * %Begin-Header% |
7 | * This file may be redistributed under the terms of the GNU Public | 7 | * This file may be redistributed under the terms of the GNU Public |
8 | * License. | 8 | * License. |
9 | * %End-Header% | 9 | * %End-Header% |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <stdio.h> | 13 | #include <stdio.h> |
@@ -33,7 +33,7 @@ errcode_t ext2fs_get_num_dirs(ext2_filsys fs, ext2_ino_t *ret_num_dirs) | |||
33 | ext2_ino_t num_dirs, max_dirs; | 33 | ext2_ino_t num_dirs, max_dirs; |
34 | 34 | ||
35 | EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); | 35 | EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); |
36 | 36 | ||
37 | num_dirs = 0; | 37 | num_dirs = 0; |
38 | max_dirs = fs->super->s_inodes_per_group; | 38 | max_dirs = fs->super->s_inodes_per_group; |
39 | for (i = 0; i < fs->group_desc_count; i++) { | 39 | for (i = 0; i < fs->group_desc_count; i++) { |
@@ -88,7 +88,7 @@ static errcode_t make_dblist(ext2_filsys fs, ext2_ino_t size, ext2_ino_t count, | |||
88 | retval = ext2fs_get_mem(len, &dblist->list); | 88 | retval = ext2fs_get_mem(len, &dblist->list); |
89 | if (retval) | 89 | if (retval) |
90 | goto cleanup; | 90 | goto cleanup; |
91 | 91 | ||
92 | if (list) | 92 | if (list) |
93 | memcpy(dblist->list, list, len); | 93 | memcpy(dblist->list, list, len); |
94 | else | 94 | else |
@@ -155,10 +155,10 @@ errcode_t ext2fs_copy_dblist(ext2_dblist src, ext2_dblist *dest) | |||
155 | errcode_t ext2fs_add_dir_block(ext2_dblist dblist, ext2_ino_t ino, blk_t blk, | 155 | errcode_t ext2fs_add_dir_block(ext2_dblist dblist, ext2_ino_t ino, blk_t blk, |
156 | int blockcnt) | 156 | int blockcnt) |
157 | { | 157 | { |
158 | struct ext2_db_entry *new_entry; | 158 | struct ext2_db_entry *new_entry; |
159 | errcode_t retval; | 159 | errcode_t retval; |
160 | unsigned long old_size; | 160 | unsigned long old_size; |
161 | 161 | ||
162 | EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST); | 162 | EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST); |
163 | 163 | ||
164 | if (dblist->count >= dblist->size) { | 164 | if (dblist->count >= dblist->size) { |
@@ -189,7 +189,7 @@ errcode_t ext2fs_set_dir_block(ext2_dblist dblist, ext2_ino_t ino, blk_t blk, | |||
189 | int blockcnt) | 189 | int blockcnt) |
190 | { | 190 | { |
191 | dgrp_t i; | 191 | dgrp_t i; |
192 | 192 | ||
193 | EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST); | 193 | EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST); |
194 | 194 | ||
195 | for (i=0; i < dblist->count; i++) { | 195 | for (i=0; i < dblist->count; i++) { |
@@ -225,7 +225,7 @@ errcode_t ext2fs_dblist_iterate(ext2_dblist dblist, | |||
225 | { | 225 | { |
226 | ext2_ino_t i; | 226 | ext2_ino_t i; |
227 | int ret; | 227 | int ret; |
228 | 228 | ||
229 | EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST); | 229 | EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST); |
230 | 230 | ||
231 | if (!dblist->sorted) | 231 | if (!dblist->sorted) |
@@ -247,7 +247,7 @@ static EXT2_QSORT_TYPE dir_block_cmp(const void *a, const void *b) | |||
247 | 247 | ||
248 | if (db_a->blk != db_b->blk) | 248 | if (db_a->blk != db_b->blk) |
249 | return (int) (db_a->blk - db_b->blk); | 249 | return (int) (db_a->blk - db_b->blk); |
250 | 250 | ||
251 | if (db_a->ino != db_b->ino) | 251 | if (db_a->ino != db_b->ino) |
252 | return (int) (db_a->ino - db_b->ino); | 252 | return (int) (db_a->ino - db_b->ino); |
253 | 253 | ||