Home | History | Annotate | Download | only in ext2fs

Lines Matching full:channel

57 static errcode_t test_open(const char *name, int flags, io_channel *channel);
58 static errcode_t test_close(io_channel channel);
59 static errcode_t test_set_blksize(io_channel channel, int blksize);
60 static errcode_t test_read_blk(io_channel channel, unsigned long block,
62 static errcode_t test_write_blk(io_channel channel, unsigned long block,
64 static errcode_t test_flush(io_channel channel);
65 static errcode_t test_write_byte(io_channel channel, unsigned long offset,
67 static errcode_t test_set_option(io_channel channel, const char *option,
109 static void test_dump_block(io_channel channel,
118 for (i=0, cp = buf; i < channel->block_size; i++, cp++) {
122 for (i=0, cp = buf; i < channel->block_size; i++, cp++) {
129 static void test_abort(io_channel channel, unsigned long block)
134 data = (struct test_private_data *) channel->private_data;
136 test_flush(channel);
164 static errcode_t test_open(const char *name, int flags, io_channel *channel)
231 *channel = io;
242 static errcode_t test_close(io_channel channel)
247 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
248 data = (struct test_private_data *) channel->private_data;
251 if (--channel->refcount > 0)
260 ext2fs_free_mem(&channel->private_data);
261 if (channel->name)
262 ext2fs_free_mem(&channel->name);
263 ext2fs_free_mem(&channel);
267 static errcode_t test_set_blksize(io_channel channel, int blksize)
272 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
273 data = (struct test_private_data *) channel->private_data;
284 channel->block_size = blksize;
289 static errcode_t test_read_blk(io_channel channel, unsigned long block,
295 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
296 data = (struct test_private_data *) channel->private_data;
309 test_dump_block(channel, data, block, buf);
311 test_abort(channel, block);
316 static errcode_t test_write_blk(io_channel channel, unsigned long block,
322 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
323 data = (struct test_private_data *) channel->private_data;
336 test_dump_block(channel, data, block, buf);
338 test_abort(channel, block);
343 static errcode_t test_write_byte(io_channel channel, unsigned long offset,
349 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
350 data = (struct test_private_data *) channel->private_data;
367 static errcode_t test_flush(io_channel channel)
372 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
373 data = (struct test_private_data *) channel->private_data;
386 static errcode_t test_set_option(io_channel channel, const char *option,
392 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
393 data = (struct test_private_data *) channel->private_data;