]> mj.ucw.cz Git - libucw.git/commitdiff
Main: Renamed MFERR_xxx to BIO_ERR_xxx
authorMartin Mares <mj@ucw.cz>
Sat, 26 Feb 2011 22:45:18 +0000 (23:45 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 26 Feb 2011 22:45:18 +0000 (23:45 +0100)
ucw/main-block.c
ucw/mainloop.h

index 918cb77762fa4a6c068c3f9858e389f95bee973c..98c558e6acc671f6270d8339eaa45722e69f2105 100644 (file)
@@ -24,7 +24,7 @@ block_io_timer_expired(struct main_timer *tm)
   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
@@ -55,7 +55,7 @@ block_io_read_handler(struct main_file *fi)
       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)
@@ -81,7 +81,7 @@ block_io_write_handler(struct main_file *fi)
       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;
index 9ad3bed35fa91b8a1b5dc2f9ecb5114b1e7dc3f0..088d769e3c27e7c263f6f08694c981079d669c32 100644 (file)
@@ -272,7 +272,7 @@ void file_del(struct main_file *fi);
  * (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. **/
@@ -298,14 +298,14 @@ void block_io_del(struct main_block_io *bio);
 /**
  * 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
 };
 
 /**
@@ -338,7 +338,7 @@ void block_io_write(struct main_block_io *bio, void *buf, uns len);
 /**
  * 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.
  *