]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/main-block.c
Heap: Interface cleanup
[libucw.git] / ucw / main-block.c
index c3e173ce15ad8305d5f3ffbb02290ba2a696c9b7..929533b383a2483391476effdcc7ec976318ae65 100644 (file)
@@ -9,8 +9,8 @@
 
 #undef LOCAL_DEBUG
 
 
 #undef LOCAL_DEBUG
 
-#include "ucw/lib.h"
-#include "ucw/mainloop.h"
+#include <ucw/lib.h>
+#include <ucw/mainloop.h>
 
 #include <stdio.h>
 #include <string.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -56,7 +56,7 @@ block_io_read_handler(struct main_file *fi)
        {
          if (errno != EINTR && errno != EAGAIN && bio->error_handler)
            bio->error_handler(bio, BIO_ERR_READ);
        {
          if (errno != EINTR && errno != EAGAIN && bio->error_handler)
            bio->error_handler(bio, BIO_ERR_READ);
-         return 0;
+         return HOOK_IDLE;
        }
       else if (!l)
        break;
        }
       else if (!l)
        break;
@@ -66,7 +66,7 @@ block_io_read_handler(struct main_file *fi)
   fi->read_handler = NULL;
   file_chg(fi);
   bio->read_done(bio);
   fi->read_handler = NULL;
   file_chg(fi);
   bio->read_done(bio);
-  return 1;
+  return HOOK_RETRY;
 }
 
 static int
 }
 
 static int
@@ -82,7 +82,7 @@ block_io_write_handler(struct main_file *fi)
        {
          if (errno != EINTR && errno != EAGAIN && bio->error_handler)
            bio->error_handler(bio, BIO_ERR_WRITE);
        {
          if (errno != EINTR && errno != EAGAIN && bio->error_handler)
            bio->error_handler(bio, BIO_ERR_WRITE);
-         return 0;
+         return HOOK_IDLE;
        }
       bio->wpos += l;
     }
        }
       bio->wpos += l;
     }
@@ -90,7 +90,7 @@ block_io_write_handler(struct main_file *fi)
   fi->write_handler = NULL;
   file_chg(fi);
   bio->write_done(bio);
   fi->write_handler = NULL;
   file_chg(fi);
   bio->write_done(bio);
-  return 1;
+  return HOOK_RETRY;
 }
 
 void
 }
 
 void