From: Martin Mares Date: Sat, 26 Feb 2011 22:51:53 +0000 (+0100) Subject: Main: Let main-block use HOOK_RETRY / HOOK_IDLE as suggested by the docs X-Git-Tag: v5.0~129^2~6 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=1d1ad8ec79322a5730cbce4440670dfcedb67fd8;p=libucw.git Main: Let main-block use HOOK_RETRY / HOOK_IDLE as suggested by the docs --- diff --git a/ucw/main-block.c b/ucw/main-block.c index c3e173ce..dab3c8e6 100644 --- a/ucw/main-block.c +++ b/ucw/main-block.c @@ -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); - return 0; + return HOOK_IDLE; } 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); - return 1; + return HOOK_RETRY; } 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); - return 0; + return HOOK_IDLE; } 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); - return 1; + return HOOK_RETRY; } void