Date: Thu, 11 Nov 2010 12:10:36 +0000 From: Mark Blackman <mark@exonetric.com> To: Martin Simmons <martin@lispworks.com> Cc: freebsd-fs@freebsd.org Subject: Re: ZFS and pathconf(_PC_NO_TRUNC) Message-ID: <86371A88-1474-4A51-8C84-05C4A71A9135@exonetric.com> In-Reply-To: <201011111206.oABC6VYG027663@higson.cam.lispworks.com> References: <871369D9-7D63-4CE0-BB87-B8C46A62B271@exonetric.com> <201011111206.oABC6VYG027663@higson.cam.lispworks.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11 Nov 2010, at 12:06, Martin Simmons wrote:
>>>>>> On Wed, 10 Nov 2010 22:28:27 +0000, Mark Blackman said:
>>=20
>> #include <unistd.h>
>> #include <stdlib.h>
>> #include <stdio.h>
>> #include <string.h>
>> #include <errno.h>
>>=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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86371A88-1474-4A51-8C84-05C4A71A9135>
