From owner-freebsd-current Sat Mar 16 12:44:09 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA00319 for current-outgoing; Sat, 16 Mar 1996 12:44:09 -0800 (PST) Received: from palmer.demon.co.uk (palmer.demon.co.uk [158.152.50.150]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id MAA00180 for ; Sat, 16 Mar 1996 12:43:32 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by palmer.demon.co.uk (8.6.11/8.6.11) with SMTP id UAA00483 for ; Sat, 16 Mar 1996 20:27:49 GMT To: FreeBSD-Current From: "Gary Palmer" Subject: 4.4 lite 2 Date: Sat, 16 Mar 1996 20:27:49 +0000 Message-ID: <481.827008069@palmer.demon.co.uk> Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk 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