X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=include%2Fext2fs%2Fext2_io.h;h=b9ba0b6a240009d923d976a948b5e7b37075464c;hp=9568866964cf201b039d6d717025fe821f318791;hb=da7857367944c983abf98f956241dcc614b2f453;hpb=0ef1539b6f680ba09c88be5bb94a821fd2599931 diff --git a/include/ext2fs/ext2_io.h b/include/ext2fs/ext2_io.h index 9568866..b9ba0b6 100644 --- a/include/ext2fs/ext2_io.h +++ b/include/ext2fs/ext2_io.h @@ -27,6 +27,8 @@ ext2_loff_t ext2fs_llseek (int, ext2_loff_t, int); typedef struct struct_io_manager *io_manager; typedef struct struct_io_channel *io_channel; +#define CHANNEL_FLAGS_WRITETHROUGH 0x01 + struct struct_io_channel { errcode_t magic; io_manager manager; @@ -47,7 +49,8 @@ struct struct_io_channel { int actual_bytes_written, errcode_t error); int refcount; - int reserved[15]; + int flags; + int reserved[14]; void *private_data; void *app_data; }; @@ -63,7 +66,9 @@ struct struct_io_manager { errcode_t (*write_blk)(io_channel channel, unsigned long block, int count, const void *data); errcode_t (*flush)(io_channel channel); - int reserved[16]; + errcode_t (*write_byte)(io_channel channel, unsigned long offset, + int count, const void *data); + int reserved[15]; }; #define IO_FLAG_RW 1 @@ -76,6 +81,7 @@ struct struct_io_manager { #define io_channel_read_blk(c,b,n,d) ((c)->manager->read_blk((c),b,n,d)) #define io_channel_write_blk(c,b,n,d) ((c)->manager->write_blk((c),b,n,d)) #define io_channel_flush(c) ((c)->manager->flush((c))) +#define io_channel_write_byte(c,b,n,d) ((c)->manager->write_byte((c),b,n,d)) #define io_channel_bumpcount(c) ((c)->refcount++) /* unix_io.c */