}
void
-block_io_write(struct main_block_io *bio, void *buf, uint len)
+block_io_write(struct main_block_io *bio, const void *buf, uint len)
{
ASSERT(bio->file.n.next);
if (len)
struct main_file file;
byte *rbuf; /* Read/write pointers for use by file_read/write */
uint rpos, rlen;
- byte *wbuf;
+ const byte *wbuf;
uint wpos, wlen;
void (*read_done)(struct main_block_io *bio); /* [*] Called when file_read is finished; rpos < rlen if EOF */
void (*write_done)(struct main_block_io *bio); /* [*] Called when file_write is finished */
* If you call it with zero @len, it will cancel the previous write, but note
* that some data may already be written.
**/
-void block_io_write(struct main_block_io *bio, void *buf, uint len);
+void block_io_write(struct main_block_io *bio, const void *buf, uint len);
/**
* Sets a timer for a file @bio. If the timer is not overwritten or disabled