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;
int actual_bytes_written,
errcode_t error);
int refcount;
- int reserved[15];
+ int flags;
+ int reserved[14];
void *private_data;
void *app_data;
};
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
#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 */