struct main_block_io *bio = tm->data;
timer_del(&bio->timer);
if (bio->error_handler)
- bio->error_handler(bio, MFERR_TIMEOUT);
+ bio->error_handler(bio, BIO_ERR_TIMEOUT);
}
void
if (l < 0)
{
if (errno != EINTR && errno != EAGAIN && bio->error_handler)
- bio->error_handler(bio, MFERR_READ);
+ bio->error_handler(bio, BIO_ERR_READ);
return 0;
}
else if (!l)
if (l < 0)
{
if (errno != EINTR && errno != EAGAIN && bio->error_handler)
- bio->error_handler(bio, MFERR_WRITE);
+ bio->error_handler(bio, BIO_ERR_WRITE);
return 0;
}
bio->wpos += l;
* (except that it gets added and deleted at the right places), feel free
* to adjust it from your handler functions by @block_io_set_timeout().
* When the timer expires, the error handler is automatically called with
- * `MFERR_TIMEOUT`.
+ * `BIO_ERR_TIMEOUT`.
***/
/** The block I/O structure. **/
/**
* Specifies when or why an error happened. This is passed to the error handler.
* `errno` is still set to the original source of error. The only exception
- * is `MFERR_TIMEOUT`, in which case `errno` is not set and the only possible
+ * is `BIO_ERR_TIMEOUT`, in which case `errno` is not set and the only possible
* cause of it is timeout of the timer associated with the block_io
* (see @block_io_set_timeout()).
**/
enum block_io_err_cause {
- MFERR_READ,
- MFERR_WRITE,
- MFERR_TIMEOUT
+ BIO_ERR_READ,
+ BIO_ERR_WRITE,
+ BIO_ERR_TIMEOUT
};
/**
/**
* Sets a timer for a file @bio. If the timer is not overwritten or disabled
* until @expires_delta milliseconds, the file timeouts and error_handler() is called with
- * <<enum_block_io_err_cause,`MFERR_TIMEOUT`>>. A value of `0` stops the timer.
+ * <<enum_block_io_err_cause,`BIO_ERR_TIMEOUT`>>. A value of `0` stops the timer.
*
* Previous setting of the timeout on the same file will be overwritten.
*