ZFS and pathconf(_PC_NO_TRUNC)

Mark Blackman mark at exonetric.com
Wed Nov 10 23:00:45 UTC 2010


Hi, 

I note that when testing the pathconf(2) NO_TRUNC property 
on a ZFS filesystem, I get a ENOENT, "No such file or directory".

I'm not sure if this qualifies as correct behaviour, but thought
a learned soul on this list could enlighten me.

I've attached the C snippet I used for testing.

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>

int main(int argc, char *argv[]){
  int result;

  result=pathconf(argv[1], _PC_NO_TRUNC);
  printf("for %s: no_trunc is %d\n",argv[1],result);
  if (result<0)
    perror(NULL);
  1;
}

- Mark



More information about the freebsd-fs mailing list