X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fmain-test.c;h=8e9f376c78bcdccb70c39c327704df6fbb07bdec;hb=f17e4350dcf0c033891e52b30b0c32a4a4fed5e0;hp=f349d4dfe0801cf8da1a4ac94a861a0a0401a2c8;hpb=5f81280e4ec7a5517e94f1c1f53e42fba537fbd8;p=libucw.git diff --git a/ucw/main-test.c b/ucw/main-test.c index f349d4df..8e9f376c 100644 --- a/ucw/main-test.c +++ b/ucw/main-test.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "ucw/lib.h" -#include "ucw/mainloop.h" +#include +#include #include #include @@ -43,7 +43,18 @@ static void dread(struct main_block_io *bio) static void derror(struct main_block_io *bio, int cause) { - msg(L_INFO, "Error: %m !!! (cause %d)", cause); + switch (cause) + { + case BIO_ERR_READ: + case BIO_ERR_WRITE: + msg(L_INFO, "derror: %s error: %m", (cause == BIO_ERR_READ ? "read" : "write")); + break; + case BIO_ERR_TIMEOUT: + msg(L_INFO, "derror: Timeout"); + break; + default: + ASSERT(0); + } bio->data = NULL; block_io_del(bio); }