Changeset View
Changeset View
Standalone View
Standalone View
sys/ufs/ufs/ufs_vnops.c
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
#include <security/mac/mac_framework.h> | #include <security/mac/mac_framework.h> | ||||
#include <sys/file.h> /* XXX */ | #include <sys/file.h> /* XXX */ | ||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/vm_extern.h> | #include <vm/vm_extern.h> | ||||
#include <geom/geom.h> | |||||
#include <ufs/ufs/acl.h> | #include <ufs/ufs/acl.h> | ||||
#include <ufs/ufs/extattr.h> | #include <ufs/ufs/extattr.h> | ||||
#include <ufs/ufs/quota.h> | #include <ufs/ufs/quota.h> | ||||
#include <ufs/ufs/inode.h> | #include <ufs/ufs/inode.h> | ||||
#include <ufs/ufs/dir.h> | #include <ufs/ufs/dir.h> | ||||
#include <ufs/ufs/ufsmount.h> | #include <ufs/ufs/ufsmount.h> | ||||
#include <ufs/ufs/ufs_extern.h> | #include <ufs/ufs/ufs_extern.h> | ||||
#ifdef UFS_DIRHASH | #ifdef UFS_DIRHASH | ||||
▲ Show 20 Lines • Show All 2,329 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Return POSIX pathconf information applicable to ufs filesystems. | * Return POSIX pathconf information applicable to ufs filesystems. | ||||
*/ | */ | ||||
static int | static int | ||||
ufs_pathconf(ap) | ufs_pathconf(ap) | ||||
struct vop_pathconf_args /* { | struct vop_pathconf_args /* { | ||||
struct vnode *a_vp; | struct vnode *a_vp; | ||||
int a_name; | int a_name; | ||||
int *a_retval; | long *a_retval; | ||||
} */ *ap; | } */ *ap; | ||||
{ | { | ||||
int error; | struct ufsmount *ump; | ||||
int len, error; | |||||
error = 0; | error = 0; | ||||
switch (ap->a_name) { | switch (ap->a_name) { | ||||
case _PC_LINK_MAX: | case _PC_LINK_MAX: | ||||
*ap->a_retval = UFS_LINK_MAX; | *ap->a_retval = UFS_LINK_MAX; | ||||
break; | break; | ||||
case _PC_NAME_MAX: | case _PC_NAME_MAX: | ||||
*ap->a_retval = UFS_MAXNAMLEN; | *ap->a_retval = UFS_MAXNAMLEN; | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | #endif | ||||
case _PC_REC_MIN_XFER_SIZE: | case _PC_REC_MIN_XFER_SIZE: | ||||
*ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize; | *ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize; | ||||
break; | break; | ||||
case _PC_REC_XFER_ALIGN: | case _PC_REC_XFER_ALIGN: | ||||
*ap->a_retval = PAGE_SIZE; | *ap->a_retval = PAGE_SIZE; | ||||
break; | break; | ||||
case _PC_SYMLINK_MAX: | case _PC_SYMLINK_MAX: | ||||
*ap->a_retval = MAXPATHLEN; | *ap->a_retval = MAXPATHLEN; | ||||
break; | |||||
case _PC_MEDIA: | |||||
ump = VFSTOUFS(ap->a_vp->v_mount); | |||||
len = sizeof(long); | |||||
*ap->a_retval = 0; | |||||
error = g_io_getattr("GEOM::media", ump->um_cp, &len, ap->a_retval); | |||||
break; | break; | ||||
default: | default: | ||||
error = vop_stdpathconf(ap); | error = vop_stdpathconf(ap); | ||||
break; | break; | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 288 Lines • Show Last 20 Lines |