Lines Matching full:channel
59 static errcode_t test_open(const char *name, int flags, io_channel *channel);
60 static errcode_t test_close(io_channel channel);
61 static errcode_t test_set_blksize(io_channel channel, int blksize);
62 static errcode_t test_read_blk(io_channel channel, unsigned long block,
64 static errcode_t test_write_blk(io_channel channel, unsigned long block,
66 static errcode_t test_read_blk64(io_channel channel, unsigned long long block,
68 static errcode_t test_write_blk64(io_channel channel, unsigned long long block,
70 static errcode_t test_flush(io_channel channel);
71 static errcode_t test_write_byte(io_channel channel, unsigned long offset,
73 static errcode_t test_set_option(io_channel channel, const char *option,
75 static errcode_t test_get_stats(io_channel channel, io_stats *stats);
124 static void test_dump_block(io_channel channel,
133 for (i=0, cp = buf; i < channel->block_size; i++, cp++) {
137 for (i=0, cp = buf; i < channel->block_size; i++, cp++) {
144 static void test_abort(io_channel channel, unsigned long block)
149 data = (struct test_private_data *) channel->private_data;
151 test_flush(channel);
179 static errcode_t test_open(const char *name, int flags, io_channel *channel)
248 *channel = io;
259 static errcode_t test_close(io_channel channel)
264 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
265 data = (struct test_private_data *) channel->private_data;
268 if (--channel->refcount > 0)
277 ext2fs_free_mem(&channel->private_data);
278 if (channel->name)
279 ext2fs_free_mem(&channel->name);
280 ext2fs_free_mem(&channel);
284 static errcode_t test_set_blksize(io_channel channel, int blksize)
289 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
290 data = (struct test_private_data *) channel->private_data;
301 channel->block_size = blksize;
306 static errcode_t test_read_blk(io_channel channel, unsigned long block,
312 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
313 data = (struct test_private_data *) channel->private_data;
326 test_dump_block(channel, data, block, buf);
328 test_abort(channel, block);
333 static errcode_t test_write_blk(io_channel channel, unsigned long block,
339 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
340 data = (struct test_private_data *) channel->private_data;
353 test_dump_block(channel, data, block, buf);
355 test_abort(channel, block);
360 static errcode_t test_read_blk64(io_channel channel, unsigned long long block,
366 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
367 data = (struct test_private_data *) channel->private_data;
380 test_dump_block(channel, data, block, buf);
382 test_abort(channel, block);
387 static errcode_t test_write_blk64(io_channel channel, unsigned long long block,
393 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
394 data = (struct test_private_data *) channel->private_data;
407 test_dump_block(channel, data, block, buf);
409 test_abort(channel, block);
414 static errcode_t test_write_byte(io_channel channel, unsigned long offset,
420 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
421 data = (struct test_private_data *) channel->private_data;
438 static errcode_t test_flush(io_channel channel)
443 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
444 data = (struct test_private_data *) channel->private_data;
457 static errcode_t test_set_option(io_channel channel, const char *option,
463 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
464 data = (struct test_private_data *) channel->private_data;
484 static errcode_t test_get_stats(io_channel channel, io_stats *stats)
489 EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
490 data = (struct test_private_data *) channel->private_data;