summaryrefslogtreecommitdiff
path: root/lib/ext2fs/res_gdt.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2005-01-06 00:04:24 -0500
committerTheodore Ts'o <tytso@mit.edu>2005-01-06 00:04:24 -0500
commitdc8ce3463791366ac844d3f0436709511fa09c49 (patch)
treeadc61eb21232f5a6648a463508f365c417e2a175 /lib/ext2fs/res_gdt.c
parent2e6a9febb48ea0e57d32cacb5e67220443c0e059 (diff)
downloade2fsprogs-dc8ce3463791366ac844d3f0436709511fa09c49.tar.gz
Fix resize inode handling on big endian systems, by adding new routines
that read/write indirect blocks, byte swapping them if necessary.
Diffstat (limited to 'lib/ext2fs/res_gdt.c')
-rw-r--r--lib/ext2fs/res_gdt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ext2fs/res_gdt.c b/lib/ext2fs/res_gdt.c
index 4706589d..1fdb1d45 100644
--- a/lib/ext2fs/res_gdt.c
+++ b/lib/ext2fs/res_gdt.c
@@ -91,7 +91,7 @@ errcode_t ext2fs_create_resize_inode(ext2_filsys fs)
#ifdef RES_GDT_DEBUG
printf("reading GDT dindir %u\n", dindir_blk);
#endif
- retval = io_channel_read_blk(fs->io, dindir_blk, 1, dindir_buf);
+ retval = ext2fs_read_ind_block(fs, dindir_blk, dindir_buf);
if (retval)
goto out_inode;
} else {
@@ -154,7 +154,7 @@ errcode_t ext2fs_create_resize_inode(ext2_filsys fs)
#ifdef RES_GDT_DEBUG
printf("reading primary GDT block %u\n", gdt_blk);
#endif
- retval = io_channel_read_blk(fs->io,gdt_blk,1,gdt_buf);
+ retval = ext2fs_read_ind_block(fs, gdt_blk, gdt_buf);
if (retval)
goto out_dindir;
} else {
@@ -192,7 +192,7 @@ errcode_t ext2fs_create_resize_inode(ext2_filsys fs)
#ifdef RES_GDT_DEBUG
printf("writing primary GDT block %u\n", gdt_blk);
#endif
- retval = io_channel_write_blk(fs->io,gdt_blk,1,gdt_buf);
+ retval = ext2fs_write_ind_block(fs, gdt_blk, gdt_buf);
if (retval)
goto out_dindir;
}
@@ -200,7 +200,7 @@ errcode_t ext2fs_create_resize_inode(ext2_filsys fs)
out_dindir:
if (dindir_dirty) {
- retval2 = io_channel_write_blk(fs->io, dindir_blk,1,dindir_buf);
+ retval2 = ext2fs_write_ind_block(fs, dindir_blk, dindir_buf);
if (!retval)
retval = retval2;
}