+
+ if (VFSATTR_IS_ACTIVE(vfap, f_create_time))
+ VFSATTR_RETURN(vfap, f_create_time, tzero);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_modify_time))
+ VFSATTR_RETURN(vfap, f_modify_time, tzero);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_access_time))
+ VFSATTR_RETURN(vfap, f_access_time, tzero);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_bsize))
+ VFSATTR_RETURN(vfap, f_bsize, sp->f_bsize);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_iosize))
+ VFSATTR_RETURN(vfap, f_iosize, sp->f_iosize);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_owner))
+ VFSATTR_RETURN(vfap, f_owner, 0);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_blocks))
+ VFSATTR_RETURN(vfap, f_blocks, sp->f_blocks);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_bfree))
+ VFSATTR_RETURN(vfap, f_bfree, sp->f_bfree);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_bavail))
+ VFSATTR_RETURN(vfap, f_bavail, sp->f_bavail);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_bused))
+ VFSATTR_RETURN(vfap, f_bused, sp->f_bused);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_files))
+ VFSATTR_RETURN(vfap, f_files, sp->f_files);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_ffree))
+ VFSATTR_RETURN(vfap, f_ffree, sp->f_ffree);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_fssubtype))
+ VFSATTR_RETURN(vfap, f_fssubtype, 0);
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_capabilities)) {
+ memcpy(&vfap->f_capabilities, &capabilities, sizeof(vol_capabilities_attr_t));
+
+ VFSATTR_SET_SUPPORTED(vfap, f_capabilities);
+ }
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_attributes)) {
+ vol_attributes_attr_t * volattr = &vfap->f_attributes;
+
+ volattr->validattr.commonattr = 0;
+ volattr->validattr.volattr = ATTR_VOL_NAME | ATTR_VOL_CAPABILITIES | ATTR_VOL_ATTRIBUTES;
+ volattr->validattr.dirattr = 0;
+ volattr->validattr.fileattr = 0;
+ volattr->validattr.forkattr = 0;
+
+ volattr->nativeattr.commonattr = 0;
+ volattr->nativeattr.volattr = ATTR_VOL_NAME | ATTR_VOL_CAPABILITIES | ATTR_VOL_ATTRIBUTES;
+ volattr->nativeattr.dirattr = 0;
+ volattr->nativeattr.fileattr = 0;
+ volattr->nativeattr.forkattr = 0;
+
+ VFSATTR_SET_SUPPORTED(vfap, f_attributes);
+ }
+
+ if (VFSATTR_IS_ACTIVE(vfap, f_vol_name)) {
+ /* The name of the volume is the same as the directory we mounted on */
+ coveredvp = vfs_vnodecovered(mp);
+ if (coveredvp) {
+ const char * name = vnode_getname_printable(coveredvp);
+ strlcpy(vfap->f_vol_name, name, MAXPATHLEN);
+ vnode_putname_printable(name);
+
+ VFSATTR_SET_SUPPORTED(vfap, f_vol_name);
+ vnode_put(coveredvp);
+ }
+ }
+
+ return 0;