Date: Sun, 5 Dec 1999 19:52:30 +0100 (CET) From: Nick Hibma <hibma@skylink.it> To: FreeBSD CURRENT Mailing List <current@FreeBSD.ORG>, bde@FreeBSD.ORG, Warner Losh <imp@village.org> Subject: bug in sio.c sioattach? Message-ID: <Pine.BSF.4.20.9912051951230.492-100000@henny.jrc.it>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.9912051951230.492-100000>
