Add _PC_FILESIZEBITS to pathconf vnop.

This commit is contained in:
kleink 1999-03-22 19:21:07 +00:00
parent cd59cd8d38
commit 9ee75a4fcc
6 changed files with 39 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: advnops.c,v 1.47 1999/02/10 13:14:08 bouyer Exp $ */
/* $NetBSD: advnops.c,v 1.48 1999/03/22 19:21:07 kleink Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -976,6 +976,9 @@ adosfs_pathconf(v)
case _PC_SYNC_IO:
*sp->a_retval = 1;
return (0);
case _PC_FILESIZEBITS:
*sp->a_retval = 32;
return (0);
default:
return (EINVAL);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: filecore_vnops.c,v 1.5 1999/02/10 13:14:09 bouyer Exp $ */
/* $NetBSD: filecore_vnops.c,v 1.6 1999/03/22 19:21:08 kleink Exp $ */
/*-
* Copyright (c) 1998 Andrew McMurry
@ -534,6 +534,9 @@ filecore_pathconf(v)
case _PC_SYNC_IO:
*ap->a_retval = 1;
return (0);
case _PC_FILESIZEBITS:
*ap->a_retval = 32;
return (0);
default:
return (EINVAL);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_vnops.c,v 1.51 1998/08/13 10:06:32 kleink Exp $ */
/* $NetBSD: cd9660_vnops.c,v 1.52 1999/03/22 19:21:08 kleink Exp $ */
/*-
* Copyright (c) 1994
@ -878,6 +878,9 @@ cd9660_pathconf(v)
case _PC_SYNC_IO:
*ap->a_retval = 1;
return (0);
case _PC_FILESIZEBITS:
*ap->a_retval = 32;
return (0);
default:
return (EINVAL);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_vnops.c,v 1.77 1999/03/05 20:47:06 mycroft Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.78 1999/03/22 19:21:09 kleink Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -1910,6 +1910,9 @@ msdosfs_pathconf(v)
case _PC_SYNC_IO:
*ap->a_retval = 1;
return (0);
case _PC_FILESIZEBITS:
*ap->a_retval = 32;
return (0);
default:
return (EINVAL);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_vnops.c,v 1.98 1999/03/06 05:34:42 fair Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.99 1999/03/22 19:21:09 kleink Exp $ */
/*
* Copyright (c) 1989, 1993
@ -2979,11 +2979,14 @@ nfs_pathconf(v)
} */ *ap = v;
struct nfsv3_pathconf *pcp;
struct vnode *vp = ap->a_vp;
struct nfsmount *nmp;
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
int32_t t1, t2;
u_int32_t *tl;
caddr_t bpos, dpos, cp, cp2;
int error = 0, attrflag;
unsigned int l;
u_int64_t maxsize;
int v3 = NFS_ISV3(vp);
switch (ap->a_name) {
@ -3033,6 +3036,21 @@ nfs_pathconf(v)
}
nfsm_reqdone;
break;
case _PC_FILESIZEBITS:
if (v3) {
nmp = VFSTONFS(vp->v_mount);
if ((nmp->nm_iflag & NFSMNT_GOTFSINFO) == 0)
if ((error = nfs_fsinfo(nmp, vp,
curproc->p_ucred, curproc)) != 0) /* XXX */
break;
for (l = 0, maxsize = nmp->nm_maxfilesize;
(maxsize >> l) > 0; l++)
;
*ap->a_retval = l + 1;
} else {
*ap->a_retval = 32; /* NFS V2 limitation */
}
break;
default:
error = EINVAL;
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ufs_vnops.c,v 1.55 1999/03/05 21:09:50 mycroft Exp $ */
/* $NetBSD: ufs_vnops.c,v 1.56 1999/03/22 19:21:10 kleink Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993, 1995
@ -1862,6 +1862,9 @@ ufs_pathconf(v)
case _PC_SYNC_IO:
*ap->a_retval = 1;
return (0);
case _PC_FILESIZEBITS:
*ap->a_retval = 42;
return (0);
default:
return (EINVAL);
}