aboutsummaryrefslogtreecommitdiff
path: root/gdb/ser-go32.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1993-04-07 04:43:48 +0000
committerStu Grossman <grossman@cygnus>1993-04-07 04:43:48 +0000
commit07861607f5b7010e4b5f908361783aac2c096e1e (patch)
treed76fa31b1c01eaac2f3493b03ea5e96ca5b74d83 /gdb/ser-go32.c
parent118ec55a7b12b44e29d1f4357c25296b88750df6 (diff)
downloadgdb-07861607f5b7010e4b5f908361783aac2c096e1e.zip
gdb-07861607f5b7010e4b5f908361783aac2c096e1e.tar.gz
gdb-07861607f5b7010e4b5f908361783aac2c096e1e.tar.bz2
* ser-go32.c: Format. (go32_open): Use proper return value.
* configure.in: Undo conditional configdirs hack for sparclite.
Diffstat (limited to 'gdb/ser-go32.c')
-rw-r--r--gdb/ser-go32.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c
index e2b3a93..edfe4b4 100644
--- a/gdb/ser-go32.c
+++ b/gdb/ser-go32.c
@@ -80,6 +80,7 @@ dos_async_init()
int i;
ASYNC_STRUCT *a1;
ASYNC_STRUCT *a2;
+
a1 = getivec(12);
a2 = getivec(11);
async = 0;
@@ -87,23 +88,26 @@ dos_async_init()
async = a1;
if (a2)
async = a2;
+
if (a1 && a2)
- {
- if (a1 < a2)
- async = a1;
- else
- async = a2;
- }
+ {
+ if (a1 < a2)
+ async = a1;
+ else
+ async = a2;
+ }
+
if (async == 0)
- {
- error("GDB can not connect to asynctsr program, check that it is installed\n\
+ {
+ error("GDB can not connect to asynctsr program, check that it is installed\n\
and that serial I/O is not being redirected (perhaps by NFS)\n\n\
example configuration:\n\
C> mode com2:9600,n,8,1,p\n\
C> asynctsr 2\n\
C> gdb \n");
- }
+ }
+
iov = async->iov;
outportb(com_ier, 0x0f);
outportb(com_bfr, 0x03);
@@ -200,7 +204,7 @@ go32_open (scb, name)
const char *name;
{
scb->fd = dos_async_init();
- if (scb->fd)
+ if (!scb->fd)
return 1;
return 0;