Lines Matching defs:hfsmp

54 static int cp_getxattr(cnode_t *, struct hfsmount *hfsmp, struct cprotect **);
58 static int cp_make_keys (struct cprotect **, struct hfsmount *hfsmp, cnid_t, int);
59 static int cp_restore_keys(struct cprotect *, struct hfsmount *hfsmp);
64 static int cp_wrap(int, struct hfsmount *hfsmp, cnid_t, struct cprotect**);
132 struct hfsmount *hfsmp = VFSTOHFS(mp);
149 if (hfsmp->hfs_running_cp_major_vers == 0) {
155 error = cp_getxattr(cp, hfsmp, &entry);
168 sub_error = cp_entry_create_keys (&entry, NULL, hfsmp, PROTECTION_CLASS_D, cp->c_fileid, cp->c_mode);
172 sub_error = cp_setxattr (cp, entry, hfsmp, cp->c_fileid, XATTR_CREATE);
213 cp_entry_create_keys(struct cprotect **entry_ptr, struct cnode *dcp, struct hfsmount *hfsmp,
271 error = cp_make_keys(&entry, hfsmp, fileid, entry->cp_pclass);
312 int cp_entry_gentempkeys(struct cprotect **entry_ptr, struct hfsmount *hfsmp) {
331 error = cp_make_keys (&entry, hfsmp, 0, target_class);
404 struct hfsmount *hfsmp = NULL;
417 hfsmp = VTOHFS(vp);
480 struct hfsmount *hfsmp = NULL;
509 hfsmp = VTOHFS(vp);
539 error = cp_restore_keys(entry, hfsmp);
546 error = cp_wrap(newclass, hfsmp, cp->c_fileid, &cp->c_cpentry);
581 struct hfsmount *hfsmp = NULL;
594 hfsmp = VTOHFS(vp);
624 error = cp_restore_keys(entry, hfsmp);
685 struct hfsmount *hfsmp = NULL;
739 hfsmp = VTOHFS(vp);
786 error = cp_restore_keys(entry, hfsmp);
868 cp_handle_relocate (struct cnode *cp, struct hfsmount *hfsmp) {
895 error = cp_restore_keys(entry, hfsmp);
916 cp_getrootxattr(struct hfsmount* hfsmp, struct cp_root_xattr *outxattr) {
938 error = hfs_getxattr_internal(NULL, &args, hfsmp, 1);
965 cp_setrootxattr(struct hfsmount *hfsmp, struct cp_root_xattr *newxattr)
983 sizeof(struct cp_root_xattr), &args, hfsmp, 1);
994 int cp_setxattr(struct cnode *cp, struct cprotect *entry, struct hfsmount *hfsmp, uint32_t fileid, int options)
1031 switch(hfsmp->hfs_running_cp_major_vers) {
1044 newxattr->xattr_major_version = OSSwapHostToLittleInt16 (hfsmp->hfs_running_cp_major_vers);
1051 error = hfs_setxattr_internal(arg_cp, (caddr_t)newxattr, attrsize, &args, hfsmp, target_fileid);
1068 newxattr->xattr_major_version = OSSwapHostToLittleInt16(hfsmp->hfs_running_cp_major_vers);
1075 error = hfs_setxattr_internal(arg_cp, (caddr_t)newxattr, attrsize, &args, hfsmp, target_fileid);
1122 struct hfsmount *hfsmp = NULL;
1132 hfsmp = VFSTOHFS(mp);
1138 *level = hfsmp->hfs_running_cp_major_vers;
1154 struct hfsmount *hfsmp = NULL;
1156 hfsmp = vfs_fsprivate(mp);
1157 err = cp_getrootxattr (hfsmp, &xattr);
1160 hfsmp->hfs_running_cp_major_vers = xattr.major_version;
1219 cp_getxattr(struct cnode *cp, struct hfsmount *hfsmp, struct cprotect **outentry)
1236 switch (hfsmp->hfs_running_cp_major_vers) {
1263 if (xattr->xattr_major_version != hfsmp->hfs_running_cp_major_vers ) {
1265 xattr->xattr_major_version, hfsmp->hfs_running_cp_major_vers);
1327 if (xattr->xattr_major_version != hfsmp->hfs_running_cp_major_vers) {
1329 xattr->xattr_major_version, hfsmp->hfs_running_cp_major_vers);
1392 cp_make_keys(struct cprotect **entry_arg, struct hfsmount *hfsmp, cnid_t fileid, int default_pclass)
1422 error = cp_wrap(target_pclass, hfsmp, fileid, entry_arg);
1434 if (hfsmp->hfs_running_cp_major_vers == CP_NEW_MAJOR_VERS) {
1453 cp_restore_keys(struct cprotect *entry, struct hfsmount *hfsmp)
1465 if (hfsmp->hfs_running_cp_major_vers == CP_NEW_MAJOR_VERS) {
1643 cp_wrap(int class, struct hfsmount *hfsmp, cnid_t fileid, struct cprotect **entry_ptr)
1681 (hfsmp->hfs_running_cp_major_vers == CP_PREV_MAJOR_VERS)) {