]> git.ozlabs.org Git - yaboot.git/blobdiff - include/ext2fs/ext2_io.h
Commit yaboot 1.3.5-pre1
[yaboot.git] / include / ext2fs / ext2_io.h
index 9568866964cf201b039d6d717025fe821f318791..b9ba0b6a240009d923d976a948b5e7b37075464c 100644 (file)
@@ -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 */