Lines Matching refs:vs
517 struct vfs_attr vs;
528 VFSATTR_INIT(&vs);
529 vs.f_vol_name = NULL;
547 if ((error = getvolattrlist_setupvfsattr(alp, &vs, &fixedsize, is_64bit)) != 0) {
551 if (vs.f_active != 0) {
553 if (VFSATTR_IS_ACTIVE(&vs, f_vol_name)) {
554 vs.f_vol_name = (char *) kalloc(MAXPATHLEN);
555 if (vs.f_vol_name == NULL) {
563 error = mac_mount_check_getattr(ctx, mnt, &vs);
567 VFS_DEBUG(ctx, vp, "ATTRLIST - calling to get %016llx with supported %016llx", vs.f_active, vs.f_supported);
568 if ((error = vfs_getattr(mnt, &vs, ctx)) != 0) {
576 if (!VFSATTR_ALL_SUPPORTED(&vs)) {
578 if (VFSATTR_IS_ACTIVE(&vs, f_fssubtype)
579 && !VFSATTR_IS_SUPPORTED(&vs, f_fssubtype))
580 VFSATTR_RETURN(&vs, f_fssubtype, 0);
587 if (VFSATTR_IS_ACTIVE(&vs, f_signature)
588 && !VFSATTR_IS_SUPPORTED(&vs, f_signature))
589 VFSATTR_RETURN(&vs, f_signature, 0x4244);
592 if (VFSATTR_IS_ACTIVE(&vs, f_bsize)
593 && !VFSATTR_IS_SUPPORTED(&vs, f_bsize))
594 VFSATTR_RETURN(&vs, f_bsize, mnt->mnt_devblocksize);
597 if (VFSATTR_IS_ACTIVE(&vs, f_attributes)
598 && !VFSATTR_IS_SUPPORTED(&vs, f_attributes)) {
599 vol_attributes_attr_t *attrp = &vs.f_attributes;
612 VFSATTR_SET_SUPPORTED(&vs, f_attributes);
616 if (VFSATTR_IS_ACTIVE(&vs, f_capabilities)) {
618 if (!VFSATTR_IS_SUPPORTED(&vs, f_capabilities)) {
619 vs.f_capabilities.capabilities[VOL_CAPABILITIES_FORMAT] = 0;
620 vs.f_capabilities.capabilities[VOL_CAPABILITIES_INTERFACES] = VOL_CAP_INT_ATTRLIST;
621 vs.f_capabilities.capabilities[VOL_CAPABILITIES_RESERVED1] = 0;
622 vs.f_capabilities.capabilities[VOL_CAPABILITIES_RESERVED2] = 0;
624 vs.f_capabilities.valid[VOL_CAPABILITIES_FORMAT] = 0;
625 vs.f_capabilities.valid[VOL_CAPABILITIES_INTERFACES] = VOL_CAP_INT_ATTRLIST;
626 vs.f_capabilities.valid[VOL_CAPABILITIES_RESERVED1] = 0;
627 vs.f_capabilities.valid[VOL_CAPABILITIES_RESERVED2] = 0;
628 VFSATTR_SET_SUPPORTED(&vs, f_capabilities);
632 vs.f_capabilities.capabilities[VOL_CAPABILITIES_INTERFACES] |= VOL_CAP_INT_ATTRLIST;
633 vs.f_capabilities.valid[VOL_CAPABILITIES_INTERFACES] |= VOL_CAP_INT_ATTRLIST;
638 if (!VFSATTR_ALL_SUPPORTED(&vs)) {
642 vs.f_active, vs.f_supported, vs.f_active & ~vs.f_supported);
696 vs.f_vol_name[MAXPATHLEN-1] = '\0'; /* Ensure nul-termination */
697 varsize += roundup(strlen(vs.f_vol_name) + 1, 4);
754 ATTR_PACK_TIME(ab, vs.f_create_time, is_64bit);
756 ATTR_PACK_TIME(ab, vs.f_modify_time, is_64bit);
758 ATTR_PACK_TIME(ab, vs.f_modify_time, is_64bit);
760 ATTR_PACK_TIME(ab, vs.f_access_time, is_64bit);
762 ATTR_PACK_TIME(ab, vs.f_backup_time, is_64bit);
828 ATTR_PACK_CAST(&ab, uint32_t, vs.f_signature);
830 ATTR_PACK_CAST(&ab, off_t, vs.f_bsize * vs.f_blocks);
832 ATTR_PACK_CAST(&ab, off_t, vs.f_bsize * vs.f_bfree);
834 ATTR_PACK_CAST(&ab, off_t, vs.f_bsize * vs.f_bavail);
836 ATTR_PACK_CAST(&ab, off_t, vs.f_bsize);
838 ATTR_PACK_CAST(&ab, off_t, vs.f_bsize); /* not strictly true */
840 ATTR_PACK_CAST(&ab, uint32_t, vs.f_iosize);
842 ATTR_PACK_CAST(&ab, uint32_t, vs.f_objcount);
844 ATTR_PACK_CAST(&ab, uint32_t, vs.f_filecount);
846 ATTR_PACK_CAST(&ab, uint32_t, vs.f_dircount);
848 ATTR_PACK_CAST(&ab, uint32_t, vs.f_maxobjcount);
852 attrlist_pack_string(&ab, vs.f_vol_name, 0);
862 vs.f_capabilities.capabilities[VOL_CAPABILITIES_INTERFACES] |= VOL_CAP_INT_EXTENDED_SECURITY;
864 vs.f_capabilities.capabilities[VOL_CAPABILITIES_INTERFACES] &= ~VOL_CAP_INT_EXTENDED_SECURITY;
866 vs.f_capabilities.valid[VOL_CAPABILITIES_INTERFACES] |= VOL_CAP_INT_EXTENDED_SECURITY;
867 ATTR_PACK(&ab, vs.f_capabilities);
872 vs.f_attributes.validattr.commonattr |= VFS_DFLT_ATTR_CMN;
873 vs.f_attributes.validattr.volattr |= VFS_DFLT_ATTR_VOL;
874 vs.f_attributes.validattr.dirattr |= VFS_DFLT_ATTR_DIR;
875 vs.f_attributes.validattr.fileattr |= VFS_DFLT_ATTR_FILE;
878 vs.f_attributes.validattr.commonattr |= (ATTR_CMN_EXTENDED_SECURITY | ATTR_CMN_UUID | ATTR_CMN_GRPUUID);
880 vs.f_attributes.validattr.commonattr &= ~(ATTR_CMN_EXTENDED_SECURITY | ATTR_CMN_UUID | ATTR_CMN_GRPUUID);
881 vs.f_attributes.nativeattr.commonattr &= ~(ATTR_CMN_EXTENDED_SECURITY | ATTR_CMN_UUID | ATTR_CMN_GRPUUID);
883 ATTR_PACK(&ab, vs.f_attributes);
904 if (vs.f_vol_name != NULL)
905 kfree(vs.f_vol_name, MAXPATHLEN);
1853 struct vfs_attr vs;
1855 VFSATTR_INIT(&vs);
1857 vs.f_vol_name = volname; /* References the setattrlist buffer directly */
1858 VFSATTR_WANTED(&vs, f_vol_name);
1861 error = mac_mount_check_setattr(ctx, vp->v_mount, &vs);
1866 if ((error = vfs_setattr(vp->v_mount, &vs, ctx)) != 0) {
1871 if (!VFSATTR_ALL_SUPPORTED(&vs)) {