Mirror of git://git.busybox.net/busybox with our patches on top
Source
/* vi: set sw=4 ts=4: */
/*
* inode_io.c --- This is allows an inode in an ext2 filesystem image
* to be accessed via the I/O manager interface.
*
* Copyright (C) 2002 Theodore Ts'o.
*
* %Begin-Header%
* This file may be redistributed under the terms of the GNU Public
* License.
* %End-Header%
*/
/*
* For checking structure magic numbers...
*/
struct inode_private_data {
int magic;
char name[32];
ext2_file_t file;
ext2_filsys fs;
ext2_ino_t ino;
struct ext2_inode inode;
int flags;
struct inode_private_data *next;
};
static struct inode_private_data *top_intern;
static int ino_unique = 0;
static errcode_t inode_open(const char *name, int flags, io_channel *channel);
static errcode_t inode_close(io_channel channel);
static errcode_t inode_set_blksize(io_channel channel, int blksize);
static errcode_t inode_read_blk(io_channel channel, unsigned long block,
int count, void *data);
static errcode_t inode_write_blk(io_channel channel, unsigned long block,
int count, const void *data);
static errcode_t inode_flush(io_channel channel);
static errcode_t inode_write_byte(io_channel channel, unsigned long offset,
int size, const void *data);
static struct struct_io_manager struct_inode_manager = {
EXT2_ET_MAGIC_IO_MANAGER,
"Inode I/O Manager",