Commit 9634d28b authored by Niels Möller's avatar Niels Möller
Browse files

More debug.

Rev: src/io.c:1.10
parent 42ca876c
...@@ -23,11 +23,12 @@ ...@@ -23,11 +23,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include <assert.h>
#include <string.h>
#include <unistd.h> #include <unistd.h>
#include <poll.h> #include <poll.h>
#include <errno.h> #include <errno.h>
#include <string.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
...@@ -47,7 +48,7 @@ struct fd_read ...@@ -47,7 +48,7 @@ struct fd_read
int fd; int fd;
}; };
static int do_read(struct abstract_read **r, UINT8 *buffer, UINT32 length) static int do_read(struct abstract_read **r, UINT32 length, UINT8 *buffer)
{ {
struct fd_read *closure struct fd_read *closure
= (struct fd_read *) *r; = (struct fd_read *) *r;
...@@ -67,7 +68,10 @@ static int do_read(struct abstract_read **r, UINT8 *buffer, UINT32 length) ...@@ -67,7 +68,10 @@ static int do_read(struct abstract_read **r, UINT8 *buffer, UINT32 length)
case EWOULDBLOCK: /* aka EAGAIN */ case EWOULDBLOCK: /* aka EAGAIN */
return 0; return 0;
default: default:
werror("io.c: do_read: read() failed, %s\n", strerror(errno)); werror("io.c: do_read: read() failed (errno %d), %s\n",
errno, strerror(errno));
debug(" fd = %d, buffer = %p, length = %ud\n",
closure->fd, buffer, length);
return A_FAIL; return A_FAIL;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment