From owner-freebsd-fs@FreeBSD.ORG Thu Nov 11 12:10:53 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5131106564A for ; Thu, 11 Nov 2010 12:10:53 +0000 (UTC) (envelope-from mark@exonetric.com) Received: from relay0.exonetric.net (relay0.exonetric.net [82.138.248.161]) by mx1.freebsd.org (Postfix) with ESMTP id 9EC1A8FC15 for ; Thu, 11 Nov 2010 12:10:53 +0000 (UTC) Received: from [192.168.111.107] (unknown [62.244.179.66]) by relay0.exonetric.net (Postfix) with ESMTP id 990BF57228; Thu, 11 Nov 2010 12:10:52 +0000 (GMT) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Mark Blackman In-Reply-To: <201011111206.oABC6VYG027663@higson.cam.lispworks.com> Date: Thu, 11 Nov 2010 12:10:36 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <86371A88-1474-4A51-8C84-05C4A71A9135@exonetric.com> References: <871369D9-7D63-4CE0-BB87-B8C46A62B271@exonetric.com> <201011111206.oABC6VYG027663@higson.cam.lispworks.com> To: Martin Simmons X-Mailer: Apple Mail (2.1081) Cc: freebsd-fs@freebsd.org Subject: Re: ZFS and pathconf(_PC_NO_TRUNC) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2010 12:10:53 -0000 On 11 Nov 2010, at 12:06, Martin Simmons wrote: >>>>>> On Wed, 10 Nov 2010 22:28:27 +0000, Mark Blackman said: >>=20 >> #include >> #include >> #include >> #include >> #include >>=20 >> int main(int argc, char *argv[]){ >> int result; >>=20 >> result=3Dpathconf(argv[1], _PC_NO_TRUNC); >> printf("for %s: no_trunc is %d\n",argv[1],result); >> if (result<0) >> perror(NULL); >> 1; >> } >=20 > Your call to printf is clobbering the real errno, which is EINVAL. =20 Doh! thanks for pointing that out. :) > That is an > allowed value according to the pathconf man page: >=20 > [EINVAL] The implementation does not support an = association of > the variable name with the associated file. >=20 > So it is correct, but maybe not useful. hmm. this is popping up in the context of building perl 5.12 on a = zfs-only filesystem. One of the POSIX::* tests fails because of the above. - Mark