From owner-freebsd-current Sun Dec 5 10:52: 2 1999 Delivered-To: freebsd-current@freebsd.org Received: from ns.skylink.it (ns.skylink.it [194.177.113.1]) by hub.freebsd.org (Postfix) with ESMTP id 8D398153FF; Sun, 5 Dec 1999 10:51:57 -0800 (PST) (envelope-from hibma@skylink.it) Received: from skylink.it (va-160.skylink.it [194.185.55.160]) by ns.skylink.it (8.9.1/8.8.8) with ESMTP id TAA09960; Sun, 5 Dec 1999 19:51:48 +0100 Received: from localhost (localhost [127.0.0.1]) by skylink.it (8.9.3/8.9.3) with ESMTP id TAA00828; Sun, 5 Dec 1999 19:52:30 +0100 (CET) (envelope-from hibma@skylink.it) Date: Sun, 5 Dec 1999 19:52:30 +0100 (CET) From: Nick Hibma X-Sender: n_hibma@henny.jrc.it Reply-To: Nick Hibma To: FreeBSD CURRENT Mailing List , bde@FreeBSD.ORG, Warner Losh Subject: bug in sio.c sioattach? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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); -- hibma@skylink.it n_hibma@freebsd.org USB project http://www.etla.net/~n_hibma/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message