From owner-cvs-all@FreeBSD.ORG Wed Jun 21 18:25:55 2006 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 87AC416A47A; Wed, 21 Jun 2006 18:25:55 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 198B443D46; Wed, 21 Jun 2006 18:25:55 +0000 (GMT) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 652DE2C2DE3; Wed, 21 Jun 2006 13:25:54 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eu89he6U9g4Z; Wed, 21 Jun 2006 13:25:53 -0500 (CDT) Received: from [216.63.78.18] (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 040B02C2DE9; Wed, 21 Jun 2006 13:25:34 -0500 (CDT) Message-ID: <44998F1A.3020208@cs.rice.edu> Date: Wed, 21 Jun 2006 13:25:30 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.10) Gecko/20050817 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <200606211259.k5LCx5as082227@repoman.freebsd.org> <44998562.6080705@cs.rice.edu> <20060621175821.GB82074@funkthat.com> <200606211413.24602.jhb@freebsd.org> In-Reply-To: <200606211413.24602.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@freebsd.org, John-Mark Gurney , src-committers@freebsd.org, Konstantin Belousov , cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libc/sys mincore.2 src/sys/vm vm_mmap.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 18:25:55 -0000 John Baldwin wrote: >On Wednesday 21 June 2006 13:58, John-Mark Gurney wrote: > > >>Alan Cox wrote this message on Wed, Jun 21, 2006 at 12:44 -0500: >> >> >>>John-Mark Gurney wrote: >>> >>> >>> >>>>Konstantin Belousov wrote this message on Wed, Jun 21, 2006 at 12:59 >>>> >>>> >+0000: > > >>>>>Modified files: >>>>> lib/libc/sys mincore.2 >>>>> sys/vm vm_mmap.c >>>>>Log: >>>>>Make the mincore(2) return ENOMEM when requested range is not fully >>>>>mapped. >>>>> >>>>> >>>>Is this change to be posix compliant or something? ENOMEM seems like >>>>the wrong error, or are we allocating memory? >>>>#define ENOMEM 12 /* Cannot allocate memory */ >>>> >>>>the original EINVAL seems to me the correct one, as is commonly used >>>>when the data passed in is incorrect... >>>> >>>> >>>I looked at this when the patch was proposed. ENOMEM is the de facto >>>standard error for this case. To the best of my knowledge, there is no >>>officially-sanctioned specification for mincore(2). >>> >>> >>Could you please provide a reference to this de facto standard error >>as in other places where ENOMEM is used for such an error? >> >> > >NetBSD and Linux were the examples given on the thread in hackers@. Check the >archives. > > > You can add AIX and Solaris to that list. Every system that I found that supports mincore(2) returns ENOMEM in this case. Alan