aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/ext2fs/inode_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'e2fsprogs/ext2fs/inode_io.c')
-rw-r--r--e2fsprogs/ext2fs/inode_io.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/e2fsprogs/ext2fs/inode_io.c b/e2fsprogs/ext2fs/inode_io.c
index b5c08b90a..deaa95562 100644
--- a/e2fsprogs/ext2fs/inode_io.c
+++ b/e2fsprogs/ext2fs/inode_io.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * inode_io.c --- This is allows an inode in an ext2 filesystem image 2 * inode_io.c --- This is allows an inode in an ext2 filesystem image
3 * to be accessed via the I/O manager interface. 3 * to be accessed via the I/O manager interface.
4 * 4 *
5 * Copyright (C) 2002 Theodore Ts'o. 5 * Copyright (C) 2002 Theodore Ts'o.
6 * 6 *
@@ -35,7 +35,7 @@ struct inode_private_data {
35 char name[32]; 35 char name[32];
36 ext2_file_t file; 36 ext2_file_t file;
37 ext2_filsys fs; 37 ext2_filsys fs;
38 ext2_ino_t ino; 38 ext2_ino_t ino;
39 struct ext2_inode inode; 39 struct ext2_inode inode;
40 int flags; 40 int flags;
41 struct inode_private_data *next; 41 struct inode_private_data *next;
@@ -75,7 +75,7 @@ errcode_t ext2fs_inode_io_intern2(ext2_filsys fs, ext2_ino_t ino,
75 struct ext2_inode *inode, 75 struct ext2_inode *inode,
76 char **name) 76 char **name)
77{ 77{
78 struct inode_private_data *data; 78 struct inode_private_data *data;
79 errcode_t retval; 79 errcode_t retval;
80 80
81 if ((retval = ext2fs_get_mem(sizeof(struct inode_private_data), 81 if ((retval = ext2fs_get_mem(sizeof(struct inode_private_data),
@@ -150,7 +150,7 @@ static errcode_t inode_open(const char *name, int flags, io_channel *channel)
150 &data->file); 150 &data->file);
151 if (retval) 151 if (retval)
152 goto cleanup; 152 goto cleanup;
153 153
154 *channel = io; 154 *channel = io;
155 return 0; 155 return 0;
156 156
@@ -176,7 +176,7 @@ static errcode_t inode_close(io_channel channel)
176 return 0; 176 return 0;
177 177
178 retval = ext2fs_file_close(data->file); 178 retval = ext2fs_file_close(data->file);
179 179
180 ext2fs_free_mem(&channel->private_data); 180 ext2fs_free_mem(&channel->private_data);
181 if (channel->name) 181 if (channel->name)
182 ext2fs_free_mem(&channel->name); 182 ext2fs_free_mem(&channel->name);
@@ -255,12 +255,12 @@ static errcode_t inode_write_byte(io_channel channel, unsigned long offset,
255} 255}
256 256
257/* 257/*
258 * Flush data buffers to disk. 258 * Flush data buffers to disk.
259 */ 259 */
260static errcode_t inode_flush(io_channel channel) 260static errcode_t inode_flush(io_channel channel)
261{ 261{
262 struct inode_private_data *data; 262 struct inode_private_data *data;
263 263
264 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL); 264 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
265 data = (struct inode_private_data *) channel->private_data; 265 data = (struct inode_private_data *) channel->private_data;
266 EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL); 266 EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);