From 02c355afe2364e6557f73f4d097ab1030b884c6a Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Tue, 13 Sep 2011 09:31:56 +1200 Subject: [PATCH] gdb_proto: error field is just a flag. --- gdb_proto.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gdb_proto.c b/gdb_proto.c index 69f1f72..fa497ae 100644 --- a/gdb_proto.c +++ b/gdb_proto.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include "sockets.h" @@ -57,13 +56,13 @@ static int gdb_read(struct gdb_data *data, int timeout_ms) timeout_ms); if (len < 0) { - data->error = errno; + data->error = 1; pr_error("gdb: recv"); return -1; } if (!len) { - data->error = EPIPE; + data->error = 1; printc("Connection closed\n"); return -1; } @@ -98,7 +97,7 @@ int gdb_getc(struct gdb_data *data) static int gdb_flush(struct gdb_data *data) { if (sockets_send(data->sock, data->outbuf, data->outlen, 0) < 0) { - data->error = errno; + data->error = 1; pr_error("gdb: flush"); return -1; } @@ -119,7 +118,7 @@ int gdb_flush_ack(struct gdb_data *data) do { if (sockets_send(data->sock, data->outbuf, data->outlen, 0) < 0) { - data->error = errno; + data->error = 1; pr_error("gdb: flush_ack"); return -1; }