In sioattach the returned values kind of look odd to me. I think it
should be different, like below, ENXIO on error, 0 on success.

Nick


Index: sys/isa/sio.c
===================================================================
RCS file: /home/ncvs/src/sys/isa/sio.c,v
retrieving revision 1.276
diff -u -w -r1.276 sio.c
--- sio.c       1999/12/01 07:38:52     1.276
+++ sio.c       1999/12/05 18:51:10
@@ -991,7 +991,7 @@
        if (siosetwater(com, com->it_in.c_ispeed) != 0) {
                enable_intr();
                free(com, M_DEVBUF);
-               return (0);
+               return (ENXIO);
        }
        enable_intr();
        termioschars(&com->it_in);
Index: sys/pc98/pc98/sio.c
===================================================================
RCS file: /home/ncvs/src/sys/pc98/pc98/sio.c,v
retrieving revision 1.113
diff -u -w -r1.113 sio.c
--- sio.c       1999/12/01 13:40:03     1.113
+++ sio.c       1999/12/05 18:51:11
@@ -1577,7 +1577,7 @@
                obufsize = 2048;
        }
        if ((obuf = malloc(obufsize * 2, M_DEVBUF, M_NOWAIT)) == NULL)
-               return (0);
+               return ENXIO;
        bzero(obuf, obufsize * 2);
 #endif
 
@@ -1660,7 +1660,7 @@
        if (siosetwater(com, com->it_in.c_ispeed) != 0) {
                enable_intr();
                free(com, M_DEVBUF);
-               return (0);
+               return ENXIO;
        }
        enable_intr();
        termioschars(&com->it_in);
--
[EMAIL PROTECTED]
[EMAIL PROTECTED]                                          USB project
http://www.etla.net/~n_hibma/



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to