From owner-cvs-all@FreeBSD.ORG Sun Jul 3 01:10:11 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.ORG Delivered-To: cvs-all@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D379E16A92E; Sun, 3 Jul 2005 00:58:34 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2E2D4468D; Sun, 3 Jul 2005 00:42:47 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 9CDC46DCCF; Sat, 2 Jul 2005 17:38:10 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 849065C991 for ; Tue, 25 Jan 2005 03:16:15 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id A8F8755F91 for ; Tue, 25 Jan 2005 11:15:54 +0000 (GMT) (envelope-from owner-src-committers@FreeBSD.org) Received: by hub.freebsd.org (Postfix) id 2FFD516A4F7; Tue, 25 Jan 2005 11:15:51 +0000 (GMT) Delivered-To: ps@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 378B716A4D0; Tue, 25 Jan 2005 11:15:49 +0000 (GMT) Delivered-To: src-committers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AF1416A4CE; Tue, 25 Jan 2005 11:15:48 +0000 (GMT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 711B643D39; Tue, 25 Jan 2005 11:15:47 +0000 (GMT) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.13.1/8.13.1) with ESMTP id j0PBFkiX031034; Tue, 25 Jan 2005 14:15:46 +0300 (MSK) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.13.1/8.13.1/Submit) id j0PBFktK031033; Tue, 25 Jan 2005 14:15:46 +0300 (MSK) (envelope-from ache) From: Andrey Chernov To: Poul-Henning Kamp Message-ID: <20050125111545.GC29791@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Poul-Henning Kamp , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <20050125105811.GA29791@nagual.pp.ru> <81495.1106650943@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <81495.1106650943@critter.freebsd.dk> User-Agent: Mutt/1.5.6i X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-3; AVE: 6.29.0.8; VDF: 6.29.0.77; host: nagual.pp.ru) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (nagual.pp.ru [0.0.0.0]); Tue, 25 Jan 2005 14:15:46 +0300 (MSK) Sender: owner-src-committers@FreeBSD.org Precedence: bulk X-Loop: FreeBSD.ORG X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern sys_generic.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:10:12 -0000 X-Original-Date: Tue, 25 Jan 2005 14:15:45 +0300 X-List-Received-Date: Sun, 03 Jul 2005 01:10:12 -0000 On Tue, Jan 25, 2005 at 12:02:23PM +0100, Poul-Henning Kamp wrote: > >> >"This volume of IEEE Std 1003.1-2001 requires that no action be taken for > >> >read() or write() when nbyte is zero. This is not intended to take > >> >precedence over detection of errors (such as invalid buffer pointers or > >> >file descriptors). This is consistent with the rest of this volume of IEEE > >> >Std 1003.1-2001, but the phrasing here could be misread to require > >> >detection of the zero case before any other errors." > > Std 1003.1-2001, but the phrasing here could be misread to require > detection of the zero case before any other errors." > > Does not say you are not allowed to check for the zero case first, only that > you are not required to do so. The quote above is not complete, last phrase slips in the exchange: "A value of zero is to be considered a correct value, for which the semantics are a no-op." For any correct value read() checks some FS-dependent errors conditions and may return errors, but not for zero value now. It means we can't now call zero value "correct". "No-op" does not means error conditions should be skipped. Instead, it means that non-error case operation is empty. -- http://ache.pp.ru/