Date: Sat, 16 Mar 1996 20:27:49 +0000 From: "Gary Palmer" <gpalmer@FreeBSD.org> To: FreeBSD-Current <FreeBSD-Current@FreeBSD.org> Subject: 4.4 lite 2 Message-ID: <481.827008069@palmer.demon.co.uk>
index | next in thread | raw e-mail
Hi
I stumbled onto some changes that were made between lite & lite 2
which I would like to see brought over onto the HEAD branch
(i.e. -current), which weren't brought over by hsu's integration work.
Specifically, in sys/kern/kern_subr.c:
Index: kern_subr.c
===================================================================
RCS file: /home/cvs/src/sys/kern/kern_subr.c,v
retrieving revision 1.8
retrieving revision 1.1.1.2
diff -u -r1.8 -r1.1.1.2
--- 1.8 1995/05/08 23:11:12
+++ 1.1.1.2 1996/03/11 20:01:23
@@ -113,11 +109,13 @@
{
register struct iovec *iov;
+ if (uio->uio_resid <= 0)
+ panic("ureadc: non-positive resid");
again:
- if (uio->uio_iovcnt == 0 || uio->uio_resid == 0)
- panic("ureadc");
+ if (uio->uio_iovcnt <= 0)
+ panic("ureadc: non-positive iovcnt");
iov = uio->uio_iov;
- if (iov->iov_len == 0) {
+ if (iov->iov_len <= 0) {
uio->uio_iovcnt--;
uio->uio_iov++;
goto again;
This just gives better consistency checking (uio_resid & uio_iovcnt
are both ints), and better panic messages.
There are probably others like this, but this one just caught my eye.
Comments?
Gary
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?481.827008069>
