Lines Matching defs:vs
642 struct vfs_attr vs;
656 VFSATTR_INIT(&vs);
657 vs.f_vol_name = NULL;
670 bzero(&vs, sizeof (vs));
689 if ((error = getvolattrlist_setupvfsattr(alp, &vs, &fixedsize, is_64bit)) != 0) {
693 if (vs.f_active != 0) {
695 if (VFSATTR_IS_ACTIVE(&vs, f_vol_name)) {
696 vs.f_vol_name = (char *) kalloc(MAXPATHLEN);
697 if (vs.f_vol_name == NULL) {
705 error = mac_mount_check_getattr(ctx, mnt, &vs);
709 VFS_DEBUG(ctx, vp, "ATTRLIST - calling to get %016llx with supported %016llx", vs.f_active, vs.f_supported);
710 if ((error = vfs_getattr(mnt, &vs, ctx)) != 0) {
718 if (!VFSATTR_ALL_SUPPORTED(&vs)) {
720 if (VFSATTR_IS_ACTIVE(&vs, f_fssubtype)
721 && !VFSATTR_IS_SUPPORTED(&vs, f_fssubtype))
722 VFSATTR_RETURN(&vs, f_fssubtype, 0);
729 if (VFSATTR_IS_ACTIVE(&vs, f_signature)
730 && !VFSATTR_IS_SUPPORTED(&vs, f_signature))
731 VFSATTR_RETURN(&vs, f_signature, 0x4244);
734 if (VFSATTR_IS_ACTIVE(&vs, f_bsize)
735 && !VFSATTR_IS_SUPPORTED(&vs, f_bsize))
736 VFSATTR_RETURN(&vs, f_bsize, mnt->mnt_devblocksize);
739 if (VFSATTR_IS_ACTIVE(&vs, f_attributes)
740 && !VFSATTR_IS_SUPPORTED(&vs, f_attributes)) {
741 vol_attributes_attr_t *attrp = &vs.f_attributes;
754 VFSATTR_SET_SUPPORTED(&vs, f_attributes);
758 if (VFSATTR_IS_ACTIVE(&vs, f_capabilities)) {
760 if (!VFSATTR_IS_SUPPORTED(&vs, f_capabilities)) {
761 vs.f_capabilities.capabilities[VOL_CAPABILITIES_FORMAT] = 0;
762 vs.f_capabilities.capabilities[VOL_CAPABILITIES_INTERFACES] = VOL_CAP_INT_ATTRLIST;
763 vs.f_capabilities.capabilities[VOL_CAPABILITIES_RESERVED1] = 0;
764 vs.f_capabilities.capabilities[VOL_CAPABILITIES_RESERVED2] = 0;
766 vs.f_capabilities.valid[VOL_CAPABILITIES_FORMAT] = 0;
767 vs.f_capabilities.valid[VOL_CAPABILITIES_INTERFACES] = VOL_CAP_INT_ATTRLIST;
768 vs.f_capabilities.valid[VOL_CAPABILITIES_RESERVED1] = 0;
769 vs.f_capabilities.valid[VOL_CAPABILITIES_RESERVED2] = 0;
770 VFSATTR_SET_SUPPORTED(&vs, f_capabilities);
774 vs.f_capabilities.capabilities[VOL_CAPABILITIES_INTERFACES] |= VOL_CAP_INT_ATTRLIST;
775 vs.f_capabilities.valid[VOL_CAPABILITIES_INTERFACES] |= VOL_CAP_INT_ATTRLIST;
780 if (!VFSATTR_ALL_SUPPORTED(&vs)) {
784 getvolattrlist_fixupattrs(&ab.valid, &vs);
787 vs.f_supported = vs.f_active;
790 getvolattrlist_fixupattrs((attribute_set_t *)&alp->commonattr, &vs);
858 vs.f_vol_name[MAXPATHLEN-1] = '\0'; /* Ensure nul-termination */
859 varsize += roundup(strlen(vs.f_vol_name) + 1, 4);
938 ATTR_PACK_TIME(ab, vs.f_create_time, is_64bit);
942 ATTR_PACK_TIME(ab, vs.f_modify_time, is_64bit);
947 ATTR_PACK_TIME(ab, vs.f_modify_time, is_64bit);
950 ATTR_PACK_TIME(ab, vs.f_access_time, is_64bit);
954 ATTR_PACK_TIME(ab, vs.f_backup_time, is_64bit);
1056 ATTR_PACK_CAST(&ab, uint32_t, vs.f_signature);
1060 ATTR_PACK_CAST(&ab, off_t, vs.f_bsize * vs.f_blocks);
1064 ATTR_PACK_CAST(&ab, off_t, vs.f_bsize * vs.f_bfree);
1068 ATTR_PACK_CAST(&ab, off_t, vs.f_bsize * vs.f_bavail);
1072 ATTR_PACK_CAST(&ab, off_t, vs.f_bsize);
1076 ATTR_PACK_CAST(&ab, off_t, vs.f_bsize); /* not strictly true */
1080 ATTR_PACK_CAST(&ab, uint32_t, vs.f_iosize);
1084 ATTR_PACK_CAST(&ab, uint32_t, vs.f_objcount);
1088 ATTR_PACK_CAST(&ab, uint32_t, vs.f_filecount);
1092 ATTR_PACK_CAST(&ab, uint32_t, vs.f_dircount);
1096 ATTR_PACK_CAST(&ab, uint32_t, vs.f_maxobjcount);
1104 attrlist_pack_string(&ab, vs.f_vol_name, 0);
1122 vs.f_capabilities.capabilities[VOL_CAPABILITIES_INTERFACES] |= VOL_CAP_INT_EXTENDED_SECURITY;
1124 vs.f_capabilities.capabilities[VOL_CAPABILITIES_INTERFACES] &= ~VOL_CAP_INT_EXTENDED_SECURITY;
1126 vs.f_capabilities.valid[VOL_CAPABILITIES_INTERFACES] |= VOL_CAP_INT_EXTENDED_SECURITY;
1127 ATTR_PACK(&ab, vs.f_capabilities);
1131 ATTR_PACK(&ab, vs.f_uuid);
1137 vs.f_attributes.validattr.commonattr |= VFS_DFLT_ATTR_CMN;
1138 vs.f_attributes.validattr.volattr |= VFS_DFLT_ATTR_VOL;
1139 vs.f_attributes.validattr.dirattr |= VFS_DFLT_ATTR_DIR;
1140 vs.f_attributes.validattr.fileattr |= VFS_DFLT_ATTR_FILE;
1143 vs.f_attributes.validattr.commonattr |= (ATTR_CMN_EXTENDED_SECURITY | ATTR_CMN_UUID | ATTR_CMN_GRPUUID);
1145 vs.f_attributes.validattr.commonattr &= ~(ATTR_CMN_EXTENDED_SECURITY | ATTR_CMN_UUID | ATTR_CMN_GRPUUID);
1146 vs.f_attributes.nativeattr.commonattr &= ~(ATTR_CMN_EXTENDED_SECURITY | ATTR_CMN_UUID | ATTR_CMN_GRPUUID);
1148 ATTR_PACK(&ab, vs.f_attributes);
1180 if (vs.f_vol_name != NULL)
1181 kfree(vs.f_vol_name, MAXPATHLEN);
2390 struct vfs_attr vs;
2392 VFSATTR_INIT(&vs);
2394 vs.f_vol_name = volname; /* References the setattrlist buffer directly */
2395 VFSATTR_WANTED(&vs, f_vol_name);
2398 error = mac_mount_check_setattr(ctx, vp->v_mount, &vs);
2403 if ((error = vfs_setattr(vp->v_mount, &vs, ctx)) != 0) {
2408 if (!VFSATTR_ALL_SUPPORTED(&vs)) {