From owner-freebsd-emulation@FreeBSD.ORG Thu Jul 28 19:31:53 2005 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A3A316A41F; Thu, 28 Jul 2005 19:31:53 +0000 (GMT) (envelope-from jm.detrez@cegetel.net) Received: from smtp.cegetel.net (mf01.sitadelle.com [212.94.174.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27BD743D48; Thu, 28 Jul 2005 19:31:52 +0000 (GMT) (envelope-from jm.detrez@cegetel.net) Received: from Portable (80-125-221-14.dti.cegetel.net [80.125.221.14]) by smtp.cegetel.net (Postfix) with ESMTP id 4D90A3181FD; Thu, 28 Jul 2005 21:31:51 +0200 (CEST) From: "jean-marc DETREZ" To: "'Alexandre Julliard'" Date: Thu, 28 Jul 2005 21:31:39 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcWTWWXY/p31CLZxQTmiL3SW+r2EOwAUHJqg In-Reply-To: <87mzo7feiy.fsf@wine.dyndns.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Message-Id: <20050728193151.4D90A3181FD@smtp.cegetel.net> Cc: emulation@freebsd.org, wine-devel@winehq.com, barner@FreeBSD.org Subject: RE: patch for libs/wine/mmap.c making wine running on FreeBSD 5.x X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2005 19:31:53 -0000 Perhaps i found the begin of an explanation, in NetBSD and linux , error codes for mincore() are : =20 [EFAULT] vec points to an illegal address. [EINVAL] addr is not a multiple of the system page size. [EINVAL] len is equal to 0. [ENOMEM] The address range specified is invalid for the calling process, or one or more of the pages specified in the range are = not mapped =20 So I think that when you call mincore for testing if a page is mapped or = not the result would be -1 and errno set to ENOMEM. But in FreeBSD a man mincore give this errors conditions: [EFAULT] vec points to an illegal address. [EINVAL] addr is not a multiple of the system page size. It seems that when a page is not mapped mincore return no error code. -----Message d'origine----- De=A0: julliard@wine.dyndns.org [mailto:julliard@wine.dyndns.org] De la = part de Alexandre Julliard Envoy=E9=A0: jeudi 28 juillet 2005 11:48 =C0=A0: jean-marc DETREZ Cc=A0: wine-devel@winehq.com; emulation@freebsd.org; 'Gerald Pfeifer'; barner@freebsd.org Objet=A0: Re: patch for libs/wine/mmap.c making wine running on FreeBSD = 5.x "jean-marc DETREZ" writes: > I made a little correction of "try_mmap_fixed" because it's seems = to me > that the function didn't really test the result (vec). That's the way it should be, we don't care if the page is in core or not, we only want to know if something is mapped there. --=20 Alexandre Julliard julliard@winehq.org