From owner-cvs-src Tue Feb 18 16:32:51 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A812237B405; Tue, 18 Feb 2003 16:32:49 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B48243F93; Tue, 18 Feb 2003 16:32:48 -0800 (PST) (envelope-from jmallett@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h1J0Wm0U035313; Tue, 18 Feb 2003 16:32:48 -0800 (PST) (envelope-from jmallett@repoman.freebsd.org) Received: (from jmallett@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h1J0WmjS035312; Tue, 18 Feb 2003 16:32:48 -0800 (PST) Message-Id: <200302190032.h1J0WmjS035312@repoman.freebsd.org> From: Juli Mallett Date: Tue, 18 Feb 2003 16:32:48 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libufs X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jmallett 2003/02/18 16:32:48 PST Modified files: lib/libufs block.c sblock.c Log: Clean up error reporting in block.c, so that it gives honest error strings for the sorts of errors we run into[1]. This also gives us room to put in a vaguely appropriate casts to silence warnings since our compiler doesn't like when we compare ssize_t to size_t[2]. Add a cast in sblock.c[3] to silence a warning because of signed vs. size_t hell (again). Clean up nearby excessive parenthemutilation[4]. Reviewed by: bde [2] [3] Suggested by: bde, many [1] Submitted by: bde [4] An aside about [4], bde notes that we do not check for a negative value for the fs bsize. I'm nto going to do that in every situation we use it, one must expect a reasonable program to pass down reasonable values. Some foot shooting protection I will tolerate, some I will not. Also he suggests some possible conditional improvements there, which I may take to heart. PS: For me at least, this is now WARNS=5 clean... Revision Changes Path 1.7 +18 -9 src/lib/libufs/block.c 1.9 +4 -4 src/lib/libufs/sblock.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message